Lines Matching defs:menu
127 * need pool name, menu.lst has entries from our pool only
598 * Description: Appends an entry for a BE into the menu.lst.
600 * be_name - pointer to name of BE to add boot menu entry for.
602 * boot_pool - Used if the pool containing the grub menu is
671 "the default BE in the grub menu.\n"), be_root_pool);
690 * Iterate through menu first to make sure the BE doesn't already
691 * have an entry in the menu.
693 * Additionally while iterating through the menu, if we have an
695 * track of that BE's menu entry. We will then use the lines from
802 * If an entry for this BE was already in the menu, then if
816 "entry '%s' in boot menu.\n"), be_name);
828 "to open menu.lst file %s\n"), menu_file);
895 * Description: Removes a BE's entry from a menu.lst file.
898 * the menu.lst file.
901 * the pool containing the boot menu. If this is
916 char menu[MAXPATHLEN];
970 "the default BE in the grub menu.\n"), be_root_pool);
975 /* Get path to boot menu */
976 (void) strlcpy(menu, pool_mntpnt, sizeof (menu));
982 (void) strlcat(menu, BE_GRUB_MENU, sizeof (menu));
984 (void) strlcat(menu, BE_SPARC_MENU, sizeof (menu));
986 /* Get handle to boot menu file */
987 if ((ret = be_open_menu(be_root_pool, menu, &menu_fp, "r",
998 /* Grab the stats of the original menu file */
999 if (stat(menu, &sb) != 0) {
1002 "failed to stat file %s: %s\n"), menu, strerror(err));
1007 /* Create a tmp file for the modified menu.lst */
1008 tmp_menu_len = strlen(menu) + 7;
1015 (void) strlcpy(tmp_menu, menu, tmp_menu_len);
1190 /* Copy the modified menu.lst into place */
1191 if (rename(tmp_menu, menu) != 0) {
1195 tmp_menu, menu, strerror(err));
1204 * adjust the default value in the menu.lst. If the
1219 * menu.lst file. This may be overkill, but to
1224 /* Get handle to boot menu file */
1225 if ((menu_fp = fopen(menu, "r")) == NULL) {
1228 "failed to open menu.lst (%s): %s\n"),
1229 menu, strerror(err));
1234 /* Create a tmp file for the modified menu.lst */
1235 tmp_menu_len = strlen(menu) + 7;
1244 (void) strlcpy(tmp_menu, menu, tmp_menu_len);
1294 /* Copy the modified menu.lst into place */
1295 if (rename(tmp_menu, menu) != 0) {
1299 tmp_menu, menu, strerror(err));
1310 if (chmod(menu, sb.st_mode) != 0) {
1313 "failed to chmod %s: %s\n"), menu, strerror(err));
1317 if (chown(menu, sb.st_uid, sb.st_gid) != 0) {
1320 "failed to chown %s: %s\n"), menu, strerror(err));
1352 * the grub menu. If no default entry is found with a valid bootfs
1356 * grub menu can be found.
1419 "the default BE in the grub menu.\n"));
1503 * menu and the root pool where the path to the grub menu exists.
1504 * The code takes this and finds the BE's entry in the grub menu
1511 * grub menu can be found.
1580 "the default BE in the grub menu.\n"), be_root_pool);
1599 /* Grab the stats of the original menu file */
1608 /* Create a tmp file for the modified menu.lst */
1660 "to find entry for %s in the grub menu\n"),
1739 * an existing entry in the grub menu to the new name of the BE.
1743 * be_root_pool - The pool which contains the grub menu
1745 * the pool containing the boot menu. If this is
1805 "the default BE in the grub menu.\n"));
1837 /* Grab the stat of the original menu file */
1847 /* Create tmp file for modified menu.lst */
2024 * menu.
2027 * be_root_pool - The pool which contains the boot menu
2079 "the default BE in the grub menu.\n"), be_root_pool);
3102 return (gettext("Missing boot menu file."));
3104 return (gettext("Invalid path for menu.lst file"));
3865 * This function is used if no menu.lst file exists. In
3869 * pool - The name of the pool the menu.lst file is on
3923 * The grub menu is missing so we need to create it
3961 * The menu file doesn't exist so we need to create a
4009 * This function is used it open the menu.lst file. If this
4014 * pool - The name of the pool the menu.lst file is on
4019 * mode - the original mode to be used for opening the menu.lst
4021 * create_menu - If this is true and the menu.lst file does not
4046 be_print_err(gettext("be_open_menu: menu.lst "
4052 be_print_err(gettext("WARNING: menu.lst "
4054 "a new menu.lst file\n"), menu_file);
4067 "to open menu.lst file %s\n"), menu_file);