Btrfs-progs: record errno for ioctl DEFRAG_RANGE

In order to sparse exact error message, we need to record errno here.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
This commit is contained in:
Liu Bo 2013-04-16 16:40:52 +08:00 committed by David Sterba
parent f1637bd8eb
commit 617769147f

View File

@ -431,6 +431,7 @@ static int cmd_defrag(int argc, char **argv)
close(fd);
break;
}
e = errno;
}
if (ret) {
fprintf(stderr, "ERROR: defrag failed on %s - %s\n",