diff options
| author | Toomas Soome <tsoome@me.com> | 2021-04-03 11:57:13 +0300 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2021-04-05 20:34:48 +0300 |
| commit | b4adc50c2ffdb6ae8e81d8be3c37ed01066fe920 (patch) | |
| tree | a82256d626824d68b171ecaae74bfd814662753b /usr/src | |
| parent | 867228adfb0b4bbab1ff33e31ec607f5671c9047 (diff) | |
| download | illumos-joyent-b4adc50c2ffdb6ae8e81d8be3c37ed01066fe920.tar.gz | |
13693 loader: we should support pools without features
Reviewed by: Yuri Pankov <yuripv@yuripv.dev>
Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Approved by: Robert Mustacchi <rm@fingolfin.org>
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/boot/Makefile.version | 2 | ||||
| -rw-r--r-- | usr/src/boot/lib/libstand/zfs/zfsimpl.c | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version index 656a8a3d08..88ac6f56a0 100644 --- a/usr/src/boot/Makefile.version +++ b/usr/src/boot/Makefile.version @@ -34,4 +34,4 @@ LOADER_VERSION = 1.1 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes. # The version is processed from left to right, the version number can only # be increased. -BOOT_VERSION = $(LOADER_VERSION)-2021.03.16.1 +BOOT_VERSION = $(LOADER_VERSION)-2021.04.03.1 diff --git a/usr/src/boot/lib/libstand/zfs/zfsimpl.c b/usr/src/boot/lib/libstand/zfs/zfsimpl.c index 9ceb9b9794..e83a8a3983 100644 --- a/usr/src/boot/lib/libstand/zfs/zfsimpl.c +++ b/usr/src/boot/lib/libstand/zfs/zfsimpl.c @@ -175,10 +175,21 @@ nvlist_check_features_for_read(nvlist_t *nvl) nv_string_t *nvp_name; int rc; + /* + * We may have all features disabled. + */ 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 */ |
