return (B_FALSE);
}
+#if defined(__sun__) || defined(__sun)
/*
* Inspect the configuration to determine if any of the devices contain
* an EFI label.
}
return (B_FALSE);
}
+#endif
boolean_t
zpool_is_bootable(zpool_handle_t *zhp)
return (zfs_error(hdl, EZFS_BADVERSION, msg));
}
+#if defined(__sun__) || defined(__sun)
if (zpool_is_bootable(zhp) && nvlist_lookup_nvlist_array(nvroot,
ZPOOL_CONFIG_SPARES, &spares, &nspares) == 0) {
uint64_t s;
}
}
}
+#endif
if (zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL) <
SPA_VERSION_L2CACHE &&
&child, &count) != 0)
return (EZFS_INVALCONFIG);
+#if defined(__sun__) || defined(__sun)
/*
* root pool can not have EFI labeled disks and can only have
* a single top-level vdev.
if (strcmp(type, VDEV_TYPE_ROOT) != 0 || count != 1 ||
pool_uses_efi(vdev_root))
return (EZFS_POOL_INVALARG);
+#endif
(void) vdev_get_physpaths(child[0], physpath, phypath_size, &rsz,
B_FALSE);
(void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN,
"cannot attach %s to %s"), new_disk, old_disk);
+#if defined(__sun__) || defined(__sun)
/*
* If this is a root pool, make sure that we're not attaching an
* EFI labeled device.
"EFI labeled devices are not supported on root pools."));
return (zfs_error(hdl, EZFS_POOL_NOTSUP, msg));
}
+#endif
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
if ((tgt = zpool_find_vdev(zhp, old_disk, &avail_spare, &l2cache,
if (zhp) {
nvlist_t *nvroot;
+#if defined(__sun__) || defined(__sun)
if (zpool_is_bootable(zhp)) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"EFI labeled devices are not supported on root "
"pools."));
return (zfs_error(hdl, EZFS_POOL_NOTSUP, errbuf));
}
+#endif
verify(nvlist_lookup_nvlist(zhp->zpool_config,
ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0);