static void
zfs_mark_vdev(uint64_t pool_guid, nvlist_t *vd, er_timeval_t *loaded)
{
- uint64_t vdev_guid;
+ uint64_t vdev_guid = 0;
uint_t c, children;
nvlist_t **child;
zfs_case_t *zcp;
- int ret;
- ret = nvlist_lookup_uint64(vd, ZPOOL_CONFIG_GUID, &vdev_guid);
- assert(ret == 0);
+ (void) nvlist_lookup_uint64(vd, ZPOOL_CONFIG_GUID, &vdev_guid);
/*
* Mark any cases associated with this (pool, vdev) pair.
}
ret = nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &vd);
- assert(ret == 0);
+ if (ret) {
+ zpool_close(zhp);
+ return (-1);
+ }
zfs_mark_vdev(pool_guid, vd, &loaded);
int ret = 0;
zpool_handle_t *zhp;
char *name;
- uint64_t state;
uint64_t version;
name = fnvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME);
- state = fnvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE);
version = fnvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION);
if (!SPA_VERSION_IS_SUPPORTED(version)) {