From 152cc960a17dd9267d7daa33caf1045db27b8a7d Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Mon, 16 Mar 2020 05:53:10 +0000 Subject: [PATCH] Blacklist /dev/sequencer* devices --- lib/libzutil/os/freebsd/zutil_import_os.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libzutil/os/freebsd/zutil_import_os.c b/lib/libzutil/os/freebsd/zutil_import_os.c index ba97c1ae7a32..7272a1e0ef0a 100644 --- a/lib/libzutil/os/freebsd/zutil_import_os.c +++ b/lib/libzutil/os/freebsd/zutil_import_os.c @@ -90,6 +90,7 @@ update_vdev_config_dev_strs(nvlist_t *nv) */ static const char * const blacklist_devs[] = { "nfslock", + "sequencer", "zfs", }; #define BLACKLIST_DIR "/dev/" @@ -112,7 +113,9 @@ zpool_open_func(void *arg) if (strncmp(rn->rn_name, BLACKLIST_DIR, BLACKLIST_DIR_LEN) == 0) { char *name = rn->rn_name + BLACKLIST_DIR_LEN; for (i = 0; i < nitems(blacklist_devs); ++i) { - if (strcmp(name, blacklist_devs[i]) == 0) { + const char *badname = blacklist_devs[i]; + size_t len = strlen(badname); + if (strncmp(name, badname, len) == 0) { return; } }