In order to sparse exact error message, we need to record errno here.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
cmds-filesystem.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 2210020..3f386e2 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",
--
1.7.7
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html