forked from Mirrors/btrfs-progs
btrfs-progs: inspect: set return value of error case
In case of open_file_or_dir() failed, ret is not set to right value, and the function will return unwanted value(ret of sprintf). Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>master
parent
97a9818716
commit
b570afae4d
|
@ -243,6 +243,7 @@ static int cmd_inspect_logical_resolve(int argc, char **argv)
|
|||
if (path_fd < 0) {
|
||||
fprintf(stderr, "ERROR: can't access "
|
||||
"'%s'\n", full_path);
|
||||
ret = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue