summaryrefslogtreecommitdiff
path: root/cmds-inspect.c
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2013-09-04 23:22:24 +0800
committerChris Mason <chris.mason@fusionio.com>2013-10-16 08:20:41 -0400
commit7d16b6ca8f1d8bdc1e8de462f733e891ef77b78c (patch)
tree522def34f68f26870d248fc7db4e340317622d65 /cmds-inspect.c
parentc0a7cbf03c71b773740263da31ed7028071e516a (diff)
Btrfs-progs: fix magic return value in cmds-inspect.c
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'cmds-inspect.c')
-rw-r--r--cmds-inspect.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmds-inspect.c b/cmds-inspect.c
index 9101470..bdebf7d 100644
--- a/cmds-inspect.c
+++ b/cmds-inspect.c
@@ -44,7 +44,7 @@ static int __ino_to_path_fd(u64 inum, int fd, int verbose, const char *prepend)
fspath = malloc(4096);
if (!fspath)
- return 1;
+ return -ENOMEM;
memset(fspath, 0, sizeof(*fspath));
ipa.inum = inum;
@@ -78,7 +78,7 @@ static int __ino_to_path_fd(u64 inum, int fd, int verbose, const char *prepend)
out:
free(fspath);
- return ret;
+ return !!ret;
}
static const char * const cmd_inode_resolve_usage[] = {
@@ -117,13 +117,13 @@ static int cmd_inode_resolve(int argc, char **argv)
fd = open_file_or_dir(argv[optind+1], &dirstream);
if (fd < 0) {
fprintf(stderr, "ERROR: can't access '%s'\n", argv[optind+1]);
- return 12;
+ return 1;
}
ret = __ino_to_path_fd(atoll(argv[optind]), fd, verbose,
argv[optind+1]);
close_file_or_dir(fd, dirstream);
- return ret;
+ return !!ret;
}
@@ -256,7 +256,7 @@ static int cmd_logical_resolve(int argc, char **argv)
out:
close_file_or_dir(fd, dirstream);
free(inodes);
- return ret;
+ return !!ret;
}
static const char * const cmd_subvolid_resolve_usage[] = {