mirror of
https://github.com/ceph/ceph
synced 2025-03-06 08:20:12 +00:00
cephfs: should give a value before use cpp_strerror
Signed-off-by:song baisen <song.baisen@zte.com.cn>
This commit is contained in:
parent
45a15914c2
commit
501e825416
@ -194,6 +194,7 @@ int init_options(int argc, char **argv, int *fd, char **path, int *cmd,
|
||||
|
||||
*fd = open(argv[1], O_RDONLY);
|
||||
if (*fd < 0) {
|
||||
*fd = -errno;
|
||||
cerr << "error opening path: " << cpp_strerror(*fd) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user