aboutsummaryrefslogtreecommitdiff
path: root/module/os/freebsd/zfs/spa_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/os/freebsd/zfs/spa_os.c')
-rw-r--r--module/os/freebsd/zfs/spa_os.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/os/freebsd/zfs/spa_os.c b/module/os/freebsd/zfs/spa_os.c
index 6ebb4c285edd..1b9f1a4ec9dc 100644
--- a/module/os/freebsd/zfs/spa_os.c
+++ b/module/os/freebsd/zfs/spa_os.c
@@ -6,7 +6,7 @@
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
+ * or https://opensource.org/licenses/CDDL-1.0.
* See the License for the specific language governing permissions
* and limitations under the License.
*
@@ -58,7 +58,6 @@
#include <sys/fs/zfs.h>
#include <sys/arc.h>
#include <sys/callb.h>
-#include <sys/spa_boot.h>
#include <sys/zfs_ioctl.h>
#include <sys/dsl_scan.h>
#include <sys/dmu_send.h>
@@ -95,6 +94,8 @@ spa_generate_rootconf(const char *name)
for (i = 0; i < count; i++) {
uint64_t txg;
+ if (configs[i] == NULL)
+ continue;
txg = fnvlist_lookup_uint64(configs[i], ZPOOL_CONFIG_POOL_TXG);
if (txg > best_txg) {
best_txg = txg;
@@ -183,7 +184,7 @@ spa_import_rootpool(const char *name, bool checkpointrewind)
spa_t *spa;
vdev_t *rvd;
nvlist_t *config, *nvtop;
- char *pname;
+ const char *pname;
int error;
/*
@@ -250,7 +251,7 @@ spa_import_rootpool(const char *name, bool checkpointrewind)
mutex_exit(&spa_namespace_lock);
fnvlist_free(config);
cmn_err(CE_NOTE, "Can not parse the config for pool '%s'",
- pname);
+ name);
return (error);
}