Date: Sat, 24 May 2014 10:41:38 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266611 - in stable/10/cddl/contrib/opensolaris: cmd/zpool lib/libzfs/common Message-ID: <201405241041.s4OAfcLm022472@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sat May 24 10:41:37 2014 New Revision: 266611 URL: http://svnweb.freebsd.org/changeset/base/266611 Log: MFC r265821: Comment out some pointless device open/close around reading device IDs. FreeBSD ZFS port unlike OpenSolaris does not use device IDs, and does not implement respective devid_*() fuctions. It is pointless to open devices just to close them back immediately. Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat May 24 10:37:56 2014 (r266610) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat May 24 10:41:37 2014 (r266611) @@ -512,6 +512,7 @@ make_leaf_vdev(const char *arg, uint64_t verify(nvlist_add_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK, (uint64_t)wholedisk) == 0); +#ifdef have_devid /* * For a whole disk, defer getting its devid until after labeling it. */ @@ -546,6 +547,7 @@ make_leaf_vdev(const char *arg, uint64_t (void) close(fd); } +#endif return (vdev); } Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sat May 24 10:37:56 2014 (r266610) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Sat May 24 10:41:37 2014 (r266611) @@ -94,6 +94,7 @@ typedef struct pool_list { static char * get_devid(const char *path) { +#ifdef have_devid int fd; ddi_devid_t devid; char *minor, *ret; @@ -113,6 +114,9 @@ get_devid(const char *path) (void) close(fd); return (ret); +#else + return (NULL); +#endif } Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sat May 24 10:37:56 2014 (r266610) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sat May 24 10:41:37 2014 (r266611) @@ -3324,6 +3324,7 @@ devid_to_path(char *devid_str) static char * path_to_devid(const char *path) { +#ifdef have_devid int fd; ddi_devid_t devid; char *minor, *ret; @@ -3343,6 +3344,9 @@ path_to_devid(const char *path) (void) close(fd); return (ret); +#else + return (NULL); +#endif } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405241041.s4OAfcLm022472>