Date: Fri, 21 Jun 2013 15:30:47 +0000 (UTC) From: Steven Hartland <smh@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252059 - head/cddl/contrib/opensolaris/cmd/zpool Message-ID: <201306211530.r5LFUlfn029510@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: smh Date: Fri Jun 21 15:30:46 2013 New Revision: 252059 URL: http://svnweb.freebsd.org/changeset/base/252059 Log: Fixed ZFS zpool freeze (debug command) not processing due to invalid ioctl call syntax. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Jun 21 15:30:18 2013 (r252058) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Jun 21 15:30:46 2013 (r252059) @@ -5344,10 +5344,9 @@ main(int argc, char **argv) * 'freeze' is a vile debugging abomination, so we treat * it as such. */ - char buf[16384]; - int fd = open(ZFS_DEV, O_RDWR); - (void) strcpy((void *)buf, argv[2]); - return (!!ioctl(fd, ZFS_IOC_POOL_FREEZE, buf)); + zfs_cmd_t zc = { 0 }; + (void) strlcpy(zc.zc_name, argv[2], sizeof (zc.zc_name)); + return (!!zfs_ioctl(g_zfs, ZFS_IOC_POOL_FREEZE, &zc)); } else { (void) fprintf(stderr, gettext("unrecognized " "command '%s'\n"), cmdname);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306211530.r5LFUlfn029510>