Fix 'zfs list <path>' handling. If the path was found, the 'ret' variable was
uninitialized. PR: kern/155940 Submitted by: KOIE Hidetaka <koie@suri.co.jp> MFC after: 1 week
This commit is contained in:
parent
649fde88ff
commit
73aab6768c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220575
@ -734,12 +734,13 @@ zfs_path_to_zhandle(libzfs_handle_t *hdl, char *path, zfs_type_t argtype)
|
||||
{
|
||||
struct statfs sfs;
|
||||
|
||||
if (statfs(path, &sfs) != 0) {
|
||||
ret = statfs(path, &sfs);
|
||||
if (ret == 0)
|
||||
statfs2mnttab(&sfs, &entry);
|
||||
else {
|
||||
(void) fprintf(stderr, "%s: %s\n", path,
|
||||
strerror(errno));
|
||||
ret = -1;
|
||||
}
|
||||
statfs2mnttab(&sfs, &entry);
|
||||
}
|
||||
#endif /* sun */
|
||||
if (ret != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user