loader: we should support pools without features
nvlist_check_features_for_read() does return error when there are no features for read. MFC after: 5 days
This commit is contained in:
parent
6d3f54fd09
commit
d36341f7b8
@ -191,8 +191,16 @@ nvlist_check_features_for_read(nvlist_t *nvl)
|
||||
|
||||
rc = nvlist_find(nvl, ZPOOL_CONFIG_FEATURES_FOR_READ,
|
||||
DATA_TYPE_NVLIST, NULL, &features, NULL);
|
||||
if (rc != 0)
|
||||
return (rc);
|
||||
switch (rc) {
|
||||
case 0:
|
||||
break; /* Continue with checks */
|
||||
|
||||
case ENOENT:
|
||||
return (0); /* All features are disabled */
|
||||
|
||||
default:
|
||||
return (rc); /* Error while reading nvlist */
|
||||
}
|
||||
|
||||
data = (nvs_data_t *)features->nv_data;
|
||||
nvp = &data->nvl_pair; /* first pair in nvlist */
|
||||
|
Loading…
Reference in New Issue
Block a user