diff --git a/sbin/bectl/bectl_list.c b/sbin/bectl/bectl_list.c index f0cc4d60f5e8..bb98093b1d60 100644 --- a/sbin/bectl/bectl_list.c +++ b/sbin/bectl/bectl_list.c @@ -175,7 +175,7 @@ print_info(const char *name, nvlist_t *dsprops, struct printc *pc) const char *oname; char *dsname, *propstr; int active_colsz; - boolean_t active_now, active_reboot; + boolean_t active_now, active_reboot, mounted; dsname = NULL; originprops = NULL; @@ -228,7 +228,10 @@ print_info(const char *name, nvlist_t *dsprops, struct printc *pc) active_colsz--; } print_padding(NULL, active_colsz, pc); - if (nvlist_lookup_string(dsprops, "mountpoint", &propstr) == 0){ + if (nvlist_lookup_boolean_value(dsprops, "mounted", &mounted) != 0) + mounted = false; + if (mounted && nvlist_lookup_string(dsprops, "mountpoint", + &propstr) == 0) { printf("%s", propstr); print_padding(propstr, pc->mount_colsz, pc); } else {