Print this page
9250 remove xpv related code from bootadm

*** 40,50 **** #include <sys/multiboot.h> #include "bootadm.h" direct_or_multi_t bam_direct = BAM_DIRECT_NOT_SET; - hv_t bam_is_hv = BAM_HV_UNKNOWN; findroot_t bam_is_findroot = BAM_FINDROOT_UNKNOWN; static void get_findroot_cap(const char *osroot) { --- 40,49 ----
*** 202,218 **** } (void) munmap(image, 8192); (void) close(fd); INJECT_ERROR1("GET_CAP_MULTIBOOT", bam_direct = BAM_DIRECT_MULTIBOOT); ! if (bam_direct == BAM_DIRECT_DBOOT) { ! if (bam_is_hv == BAM_HV_PRESENT) { ! BAM_DPRINTF(("%s: is xVM system\n", fcn)); ! } else { ! BAM_DPRINTF(("%s: is *NOT* xVM system\n", fcn)); ! } ! } else { BAM_DPRINTF(("%s: is MULTIBOOT unix\n", fcn)); } /* Not a fatal error if this fails */ get_findroot_cap(osroot); --- 201,211 ---- } (void) munmap(image, 8192); (void) close(fd); INJECT_ERROR1("GET_CAP_MULTIBOOT", bam_direct = BAM_DIRECT_MULTIBOOT); ! if (bam_direct != BAM_DIRECT_DBOOT) { BAM_DPRINTF(("%s: is MULTIBOOT unix\n", fcn)); } /* Not a fatal error if this fails */ get_findroot_cap(osroot);
*** 810,850 **** BAM_DPRINTF(("%s: returning SUCCESS\n", fcn)); return (BAM_SUCCESS); } static error_t - bam_add_hv(menu_t *mp, char *grubsign, char *grubroot, int root_opt) - { - entry_t *entry; - const char *fcn = "bam_add_hv()"; - - bam_print(_("adding xVM entries...\n")); - - entry = find_matching_entry(mp->entries, grubsign, grubroot, root_opt); - while (entry != NULL) { - if (entry->flags & BAM_ENTRY_HV) { - BAM_DPRINTF(("%s: entry %d already converted to " - "xvm HV\n", fcn, entry->entryNum)); - return (BAM_SUCCESS); - } - entry = find_matching_entry(entry->next, grubsign, grubroot, - root_opt); - } - - (void) add_boot_entry(mp, NEW_HV_ENTRY, grubsign, XEN_MENU, - XEN_KERNEL_MODULE_LINE, DIRECT_BOOT_ARCHIVE, NULL); - - BAM_DPRINTF(("%s: added xVM HV entry via add_boot_entry()\n", fcn)); - - update_numbering(mp); - - BAM_DPRINTF(("%s: returning SUCCESS\n", fcn)); - - return (BAM_SUCCESS); - } - - static error_t bam_add_dboot( menu_t *mp, char *osroot, char *grubsign, char *grubroot, --- 803,812 ----
*** 933,953 **** char *osdev; char *grubsign; char *grubroot; int ret1; int ret2; - int ret3; const char *fcn = "upgrade_menu()"; assert(osroot); assert(menu_root); BAM_DPRINTF(("%s: entered. args: %s %s\n", fcn, osroot, menu_root)); /* ! * We only support upgrades. Xen may not be present ! * on smaller metaclusters so we don't check for that. */ if (bam_is_findroot != BAM_FINDROOT_PRESENT || bam_direct != BAM_DIRECT_DBOOT) { bam_error(_("automated downgrade of GRUB menu to older " "version not supported.\n")); --- 895,913 ---- char *osdev; char *grubsign; char *grubroot; int ret1; int ret2; const char *fcn = "upgrade_menu()"; assert(osroot); assert(menu_root); BAM_DPRINTF(("%s: entered. args: %s %s\n", fcn, osroot, menu_root)); /* ! * We only support upgrades. */ if (bam_is_findroot != BAM_FINDROOT_PRESENT || bam_direct != BAM_DIRECT_DBOOT) { bam_error(_("automated downgrade of GRUB menu to older " "version not supported.\n"));
*** 983,1008 **** grubroot, root_optional(osroot, menu_root)); INJECT_ERROR1("UPGRADE_ADD_FINDROOT", ret1 = BAM_ERROR); if (ret1 == BAM_ERROR) goto abort; ! if (bam_is_hv == BAM_HV_PRESENT) { ! ret2 = bam_add_hv(mp, grubsign, grubroot, ! root_optional(osroot, menu_root)); ! INJECT_ERROR1("UPGRADE_ADD_HV", ret2 = BAM_ERROR); if (ret2 == BAM_ERROR) goto abort; - } else - ret2 = BAM_SUCCESS; ! ret3 = bam_add_dboot(mp, osroot, grubsign, ! grubroot, root_optional(osroot, menu_root)); ! INJECT_ERROR1("UPGRADE_ADD_DBOOT", ret3 = BAM_ERROR); ! if (ret3 == BAM_ERROR) ! goto abort; ! ! if (ret1 == BAM_MSG || ret2 == BAM_MSG || ret3 == BAM_MSG) { bam_error(_("one or more GRUB menu entries were not " "automatically upgraded\nFor details on manually " "updating entries, see %s\n"), MENU_URL(osroot)); } else { bam_warn_hand_entries(mp, osroot); --- 943,959 ---- grubroot, root_optional(osroot, menu_root)); INJECT_ERROR1("UPGRADE_ADD_FINDROOT", ret1 = BAM_ERROR); if (ret1 == BAM_ERROR) goto abort; ! ret2 = bam_add_dboot(mp, osroot, grubsign, ! grubroot, root_optional(osroot, menu_root)); ! INJECT_ERROR1("UPGRADE_ADD_DBOOT", ret2 = BAM_ERROR); if (ret2 == BAM_ERROR) goto abort; ! if (ret1 == BAM_MSG || ret2 == BAM_MSG) { bam_error(_("one or more GRUB menu entries were not " "automatically upgraded\nFor details on manually " "updating entries, see %s\n"), MENU_URL(osroot)); } else { bam_warn_hand_entries(mp, osroot);