Index: sys/kern/vfs_mount.c =================================================================== --- sys/kern/vfs_mount.c +++ sys/kern/vfs_mount.c @@ -2562,10 +2562,18 @@ return; sbuf_printf(sb, " %s=\"", what); TAILQ_FOREACH(opt, opts, link) { - if (opt->name[0] == '\0' || (opt->len > 0 && *(char *)opt->value == '\0')) + if (opt->name[0] == '\0') continue; devctl_safe_quote_sb(sb, opt->name); - if (opt->len > 0) { + /* + * Only print the option values for those options that are known + * to be ascii strings. Many others are, but we cannot assume + * that here. + */ + if (opt->len > 1 && + (strcmp(opt->name, "fstype") == 0 || + strcmp(opt->name, "fspath") == 0 || + strcmp(opt->name, "from") == 0)) { sbuf_putc(sb, '='); devctl_safe_quote_sb(sb, opt->value); }