Mercurial > illumos > illumos-gate
changeset 10711:f3a7a77cc1a6
6878665 bootenv rc entry in menu.lst is not aware of ZFS root
author | Gangadhar Mylapuram <Gangadhar.M@Sun.COM> |
---|---|
date | Mon, 05 Oct 2009 00:02:26 -0700 |
parents | b9f4a7af952b |
children | b2deecb4af71 |
files | usr/src/cmd/boot/bootadm/bootadm.c |
diffstat | 1 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/boot/bootadm/bootadm.c Sat Oct 03 12:16:34 2009 -0700 +++ b/usr/src/cmd/boot/bootadm/bootadm.c Mon Oct 05 00:02:26 2009 -0700 @@ -8967,9 +8967,23 @@ strchr(signbuf, ')') == NULL); if (optnum == KERNEL_CMD) { - BAM_DPRINTF((D_GET_SET_KERNEL_NEW_KERN, fcn, new_path)); - entryNum = add_boot_entry(mp, BOOTENV_RC_TITLE, - signbuf, new_path, NULL, NULL, NULL); + if (strcmp(fstype, "zfs") == 0) { + new_str_len = strlen(new_path) + + strlen(ZFS_BOOT) + 8; + new_arg = s_calloc(1, new_str_len); + (void) snprintf(new_arg, new_str_len, "%s %s", + new_path, ZFS_BOOT); + BAM_DPRINTF((D_GET_SET_KERNEL_NEW_KERN, fcn, + new_arg)); + entryNum = add_boot_entry(mp, BOOTENV_RC_TITLE, + signbuf, new_arg, NULL, NULL, NULL); + free(new_arg); + } else { + BAM_DPRINTF((D_GET_SET_KERNEL_NEW_KERN, fcn, + new_path)); + entryNum = add_boot_entry(mp, BOOTENV_RC_TITLE, + signbuf, new_path, NULL, NULL, NULL); + } } else { new_str_len = strlen(path) + 8; if (strcmp(fstype, "zfs") == 0) {