summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2013-04-16 16:40:52 +0800
committerDavid Sterba <dsterba@suse.cz>2013-04-23 18:56:27 +0200
commit617769147f96bcd05aa9a5c8534b29d00fdd8b90 (patch)
treee28a278b17bc12a1e15a8a3f71c66820ded696ec
parentf1637bd8ebb69c576d280eb250896cb328207716 (diff)
downloadbtrfs-progs-617769147f96bcd05aa9a5c8534b29d00fdd8b90.tar.gz
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>
-rw-r--r--cmds-filesystem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index f3d3130..f41a72a 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -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",