zfs command does not accept abs path to filesystem. Fix: uninitialized variable is referred. Patch attached with submission follows: How-To-Repeat: % zfs list tank NAME USED AVAIL REFER MOUNTPOINT tank 579G 721G 28.0K /tank % zfs list /tank % echo $? 1 %
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s).
Author: pjd Date: Tue Apr 12 20:31:33 2011 New Revision: 220575 URL: http://svn.freebsd.org/changeset/base/220575 Log: 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 Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Tue Apr 12 20:10:15 2011 (r220574) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Tue Apr 12 20:31:33 2011 (r220575) @@ -734,12 +734,13 @@ zfs_path_to_zhandle(libzfs_handle_t *hdl { 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) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Fix committed to HEAD, thanks!
Responsible Changed From-To: freebsd-fs->pjd I'll take this one.