summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/cmd/boot/bootadm/bootadm_loader.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/cmd/boot/bootadm/bootadm_loader.c b/usr/src/cmd/boot/bootadm/bootadm_loader.c
index 2d15fdbc42..a9dde19132 100644
--- a/usr/src/cmd/boot/bootadm/bootadm_loader.c
+++ b/usr/src/cmd/boot/bootadm/bootadm_loader.c
@@ -766,6 +766,11 @@ bam_mount_be(menu_entry_t *entry, char **dir)
if (strcmp(be_node->be_root_ds, entry->me_bootfs) == 0)
break;
+ if (be_node == NULL) {
+ ret = BE_ERR_BE_NOENT;
+ goto out;
+ }
+
if (nvlist_add_string(be_attrs, BE_ATTR_ORIG_BE_NAME,
be_node->be_node_name) != 0) {
ret = BE_ERR_NOMEM;
@@ -843,7 +848,8 @@ list_menu_entry(menu_entry_t *entry, char *setting)
(void) rmdir(dir);
free(dir);
}
- bam_error(_("%s is not mounted\n"), entry->me_title);
+ bam_error(_("%s is not mounted: %s\n"), entry->me_title,
+ be_err_to_str(mounted));
return (BAM_ERROR);
}