aboutsummaryrefslogtreecommitdiffstats
path: root/cmds-receive.c
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2013-09-04 23:22:27 +0800
committerChris Mason <chris.mason@fusionio.com>2013-10-16 08:20:41 -0400
commit58941418859366f6cd6c902ccb70664d44e9fed6 (patch)
tree581a87710143dcc0e9c4d0202dc89a94e8f26ccf /cmds-receive.c
parent92319d74d4799c9b3b32080a59cb3f999931a681 (diff)
downloadbtrfs-progs-58941418859366f6cd6c902ccb70664d44e9fed6.tar.gz
btrfs-progs-58941418859366f6cd6c902ccb70664d44e9fed6.tar.xz
btrfs-progs-58941418859366f6cd6c902ccb70664d44e9fed6.zip
Btrfs-progs: fix magic return value in cmds-receive.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-receive.c')
-rw-r--r--cmds-receive.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds-receive.c b/cmds-receive.c
index 1630f64..2b880c0 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -951,13 +951,13 @@ int cmd_receive(int argc, char **argv)
receive_fd = open(fromfile, O_RDONLY | O_NOATIME);
if (receive_fd < 0) {
fprintf(stderr, "ERROR: failed to open %s\n", fromfile);
- return -errno;
+ return 1;
}
}
ret = do_receive(&r, tomnt, receive_fd);
- return ret;
+ return !!ret;
}
const char * const cmd_receive_usage[] = {