--- a/usr/src/cmd/zpool/zpool_main.c Tue Jan 22 15:57:26 2008 -0800
+++ b/usr/src/cmd/zpool/zpool_main.c Tue Jan 22 16:04:42 2008 -0800
@@ -560,8 +560,6 @@
int ret = 1;
char *altroot = NULL;
char *mountpoint = NULL;
- nvlist_t **child;
- uint_t children;
nvlist_t *props = NULL;
char *propval;
@@ -647,9 +645,7 @@
return (1);
/* make_root_vdev() allows 0 toplevel children if there are spares */
- verify(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN,
- &child, &children) == 0);
- if (children == 0) {
+ if (!zfs_allocatable_devs(nvroot)) {
(void) fprintf(stderr, gettext("invalid vdev "
"specification: at least one toplevel vdev must be "
"specified\n"));