Print this page
9250 remove xpv related code from bootadm

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/boot/bootadm/bootadm.h
          +++ new/usr/src/cmd/boot/bootadm/bootadm.h
↓ open down ↓ 79 lines elided ↑ open up ↑
  80   80  } entry_t;
  81   81  
  82   82  /* For flags value in entry_t */
  83   83  #define BAM_ENTRY_BOOTADM       0x01    /* entry created by bootadm */
  84   84  #define BAM_ENTRY_LU            0x02    /* entry created by Live Upgrade */
  85   85  #define BAM_ENTRY_CHAINLOADER   0x04    /* chainloader entry; do not disturb */
  86   86  #define BAM_ENTRY_ROOT          0x08    /* entry has a root line */
  87   87  #define BAM_ENTRY_FAILSAFE      0x10    /* failsafe entry  */
  88   88  #define BAM_ENTRY_DBOOT         0x20    /* Is dboot (normal or failsafe) */
  89   89  #define BAM_ENTRY_32BIT         0x40    /* Is a 32-bit entry */
  90      -#define BAM_ENTRY_HV            0x80    /* Is a hypervisor entry */
  91   90  #define BAM_ENTRY_FINDROOT      0x100   /* entry has a findroot line */
  92   91  #define BAM_ENTRY_MULTIBOOT     0x200   /* is multiboot (normal or failsafe) */
  93   92  #define BAM_ENTRY_64BIT         0x400   /* Is a 64-bit entry */
  94   93  
  95   94  #define BAM_ENTRY_UPGFSKERNEL   0x800   /* Upgrade failsafe kernel entry */
  96   95  #define BAM_ENTRY_UPGFSMODULE   0x1000  /* Upgrade failsafe module entry */
  97   96  
  98   97  #define BAM_ENTRY_LIBBE         0x2000  /* entry created by libbe */
  99   98  
 100   99  typedef struct {
↓ open down ↓ 2 lines elided ↑ open up ↑
 103  102          line_t  *curdefault;    /* line containing default */
 104  103          line_t  *olddefault;    /* old default line (commented) */
 105  104          line_t  *old_rc_default;        /* old default line for bootenv.rc */
 106  105          entry_t *entries;       /* os entries */
 107  106  } menu_t;
 108  107  
 109  108  typedef enum {
 110  109          BAM_ERROR = -1, /* Must be negative. add_boot_entry() depends on it */
 111  110          BAM_SUCCESS = 0,
 112  111          BAM_WRITE = 2,
 113      -        BAM_MSG,        /* Used by upgrade_menu() */
 114      -        BAM_NOCHANGE    /* Used by cvt_to_hyper()/cvt_to_metal() */
      112 +        BAM_MSG         /* Used by upgrade_menu() */
 115  113  } error_t;
 116  114  
 117  115  /*
 118  116   * Menu related
 119  117   * menu_cmd_t and menu_cmds must be kept in sync
 120  118   *
 121  119   * The *_DOLLAR_CMD values must be 1 greater than the
 122  120   * respective [KERNEL|MODULE]_CMD values.
 123  121   */
 124  122  typedef enum {
↓ open down ↓ 15 lines elided ↑ open up ↑
 140  138  
 141  139  extern char *menu_cmds[];
 142  140  
 143  141  /* For multi- or direct-boot */
 144  142  typedef enum {
 145  143          BAM_DIRECT_NOT_SET,
 146  144          BAM_DIRECT_MULTIBOOT,
 147  145          BAM_DIRECT_DBOOT
 148  146  } direct_or_multi_t;
 149  147  
 150      -/* Is there a hypervisor present? */
 151      -typedef enum {
 152      -        BAM_HV_UNKNOWN,
 153      -        BAM_HV_NO,
 154      -        BAM_HV_PRESENT
 155      -} hv_t;
 156      -
 157  148  /* Is there findroot capability present ? */
 158  149  typedef enum {
 159  150          BAM_FINDROOT_UNKNOWN,
 160  151          BAM_FINDROOT_ABSENT,
 161  152          BAM_FINDROOT_PRESENT
 162  153  } findroot_t;
 163  154  
 164  155  typedef enum {
 165  156          OPT_ABSENT = 0,         /* No option */
 166  157          OPT_REQ,                /* option required */
↓ open down ↓ 11 lines elided ↑ open up ↑
 178  169          ZFS_MNT_ERROR = -1,
 179  170          LEGACY_MOUNTED = 1,
 180  171          LEGACY_ALREADY,
 181  172          ZFS_MOUNTED,
 182  173          ZFS_ALREADY
 183  174  } zfs_mnted_t;
 184  175  
 185  176  extern int bam_verbose;
 186  177  extern int bam_force;
 187  178  extern direct_or_multi_t bam_direct;
 188      -extern hv_t bam_is_hv;
 189  179  extern findroot_t bam_is_findroot;
 190  180  extern int bam_debug;
 191  181  
 192  182  extern void bam_add_line(menu_t *mp, entry_t *entry, line_t *prev, line_t *lp);
 193  183  extern void update_numbering(menu_t *mp);
 194  184  extern error_t set_global(menu_t *, char *, int);
 195  185  extern error_t upgrade_menu(menu_t *, char *, char *);
 196      -extern error_t cvt_to_hyper(menu_t *, char *, char *);
 197      -extern error_t cvt_to_metal(menu_t *, char *, char *);
 198  186  extern error_t check_subcmd_and_options(char *, char *, subcmd_defn_t *,
 199  187      error_t (**fp)());
 200  188  extern char *mount_top_dataset(char *pool, zfs_mnted_t *mnted);
 201  189  extern void elide_trailing_slash(const char *, char *, size_t);
 202  190  extern int umount_top_dataset(char *, zfs_mnted_t, char *);
 203  191  extern void *s_calloc(size_t, size_t);
 204  192  extern void *s_realloc(void *, size_t);
 205  193  extern char *s_fgets(char *buf, int n, FILE *fp);
 206  194  extern void bam_error(char *format, ...);
 207  195  extern void bam_exit(int);
↓ open down ↓ 37 lines elided ↑ open up ↑
 245  233  #define BAM_OLD_RC_DEF  "BOOTADM RC SAVED DEFAULT: "
 246  234  
 247  235  /*
 248  236   * menu.lst comment created by libbe
 249  237   */
 250  238  #define BAM_LIBBE_FTR   "============ End of LIBBE entry ============="
 251  239  
 252  240  /* Title used for failsafe entries */
 253  241  #define FAILSAFE_TITLE  "Solaris failsafe"
 254  242  
 255      -/* Title used for hv entries */
 256      -#define NEW_HV_ENTRY    "Solaris xVM"
 257      -
 258  243  /* ZFS boot option */
 259  244  #define ZFS_BOOT        "-B $ZFS-BOOTFS"
 260  245  
 261  246  /* multiboot */
 262  247  #define MULTI_BOOT      "/platform/i86pc/multiboot"
 263  248  #define MULTI_BOOT_FAILSAFE     "/boot/multiboot"
 264  249  #define MULTI_BOOT_FAILSAFE_UNIX        "kernel/unix"
 265  250  #define MULTI_BOOT_FAILSAFE_LINE        "/boot/multiboot kernel/unix -s"
 266  251  
 267  252  /* directboot kernels */
↓ open down ↓ 4 lines elided ↑ open up ↑
 272  257  #define DIRECT_BOOT_FAILSAFE_64 "/boot/platform/i86pc/kernel/amd64/unix"
 273  258  #define DIRECT_BOOT_FAILSAFE_KERNEL \
 274  259          "/boot/platform/i86pc/kernel/$ISADIR/unix"
 275  260  #define DIRECT_BOOT_FAILSAFE_LINE       DIRECT_BOOT_FAILSAFE_KERNEL " -s"
 276  261  #define DIRECT_BOOT_KERNEL_ZFS  DIRECT_BOOT_KERNEL " " ZFS_BOOT
 277  262  #define DIRECT_BOOT_PREFIX      "/platform/i86pc/"
 278  263  #define KERNEL_PREFIX   "/platform/i86pc/"
 279  264  #define AMD_UNIX_SPACE  "/amd64/unix "
 280  265  #define UNIX_SPACE      "/unix "
 281  266  
 282      -/* xVM kernels */
 283      -#define XEN_KERNEL_SUBSTR "xen.gz"
 284      -
 285  267  /* Boot archives */
 286  268  #define ARCHIVE_PREFIX          "/platform/"
 287  269  #define ARCHIVE_SUFFIX          "/boot_archive"
 288  270  #define CACHEDIR_SUFFIX         "/archive_cache"
 289  271  #define UPDATEDIR_SUFFIX        "/updates"
 290  272  #define DIRECT_BOOT_ARCHIVE     "/platform/i86pc/$ISADIR/boot_archive"
 291  273  #define DIRECT_BOOT_ARCHIVE_32  "/platform/i86pc/boot_archive"
 292  274  #define DIRECT_BOOT_ARCHIVE_64  "/platform/i86pc/amd64/boot_archive"
 293  275  #define MULTIBOOT_ARCHIVE       DIRECT_BOOT_ARCHIVE_32
 294  276  #define FAILSAFE_ARCHIVE        "/boot/$ISADIR/x86.miniroot-safe"
 295  277  #define FAILSAFE_ARCHIVE_32     "/boot/x86.miniroot-safe"
 296  278  #define FAILSAFE_ARCHIVE_64     "/boot/amd64/x86.miniroot-safe"
 297  279  #define CACHEDIR_32             "/platform/i86pc/archive_cache"
 298  280  #define CACHEDIR_64             "/platform/i86pc/amd64/archive_cache"
 299  281  #define UPDATEDIR_32            "/platform/i86pc/updates"
 300  282  #define UPDATEDIR_64            "/platform/i86pc/amd64/updates"
 301  283  
 302      -/* Hypervisors */
 303      -#define XEN_64                  "/boot/amd64/xen.gz"
 304      -#define XEN_MENU                "/boot/$ISADIR/xen.gz"
 305      -#define HYPERVISOR_KERNEL       "/platform/i86xpv/kernel/$ISADIR/unix"
 306      -#define XEN_KERNEL_MODULE_LINE  HYPERVISOR_KERNEL " " HYPERVISOR_KERNEL
 307      -#define XEN_KERNEL_MODULE_LINE_ZFS      \
 308      -        HYPERVISOR_KERNEL " " HYPERVISOR_KERNEL " " ZFS_BOOT
 309      -
 310  284  /* Helpers */
 311  285  #define MKISOFS_PATH            "/usr/bin/mkisofs"
 312  286  #define DD_PATH_USR             "/usr/bin/dd"
 313  287  #define LOCKFS_PATH             "/usr/sbin/lockfs"
 314  288  
 315  289  /* A first guess at the number of entries in a menu */
 316  290  #define BAM_ENTRY_NUM           10
 317  291  
 318  292  /* toggle for whether delete_boot_entry prints an error message or not */
 319  293  #define DBE_PRINTERR            0
↓ open down ↓ 33 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX