Lines Matching defs:entry

188 #define	OPT_ENTRY_NUM	"entry"
632 * -m list_setting [entry] [value] -- list_setting
988 int entry;
999 * in the default entry.
1011 entry = atoi(which);
1013 for (ent = mp->entries; ((ent != NULL) && (ent->entryNum != entry));
1018 bam_error(_("no matching entry found\n"));
1037 bam_error(_("no matching entry found\n"));
2345 * directory was removed: create the entry without further checkings.
2914 /* Best effort stale entry removal */
3574 bam_print("%s: Updating descriptor entry [%d]\n", func,
4546 BAM_DPRINTF(("%s: new boot entry alloced\n", fcn));
4552 BAM_DPRINTF(("%s: (first) new boot entry created\n", fcn));
4561 BAM_DPRINTF(("%s: new boot entry linked in\n", fcn));
4607 kernel_parser(entry_t *entry, char *cmd, char *arg, int linenum)
4611 assert(entry);
4624 entry->flags |= BAM_ENTRY_DBOOT | BAM_ENTRY_32BIT;
4628 entry->flags |= BAM_ENTRY_DBOOT;
4633 entry->flags |= BAM_ENTRY_DBOOT | BAM_ENTRY_64BIT;
4638 entry->flags |= BAM_ENTRY_DBOOT | BAM_ENTRY_FAILSAFE;
4643 entry->flags |= BAM_ENTRY_DBOOT | BAM_ENTRY_FAILSAFE
4649 entry->flags |= BAM_ENTRY_DBOOT | BAM_ENTRY_FAILSAFE
4653 entry->flags |= BAM_ENTRY_MULTIBOOT;
4658 entry->flags |= BAM_ENTRY_MULTIBOOT | BAM_ENTRY_FAILSAFE;
4661 entry->flags |= BAM_ENTRY_HV;
4662 } else if (!(entry->flags & (BAM_ENTRY_BOOTADM|BAM_ENTRY_LU))) {
4667 entry->flags |= BAM_ENTRY_DBOOT | BAM_ENTRY_32BIT;
4670 entry->flags |= BAM_ENTRY_DBOOT | BAM_ENTRY_64BIT;
4672 BAM_DPRINTF(("%s: is UNKNOWN kernel entry: %s\n", fcn, arg));
4682 module_parser(entry_t *entry, char *cmd, char *arg, int linenum)
4686 assert(entry);
4707 } else if (!(entry->flags & BAM_ENTRY_BOOTADM) &&
4708 !(entry->flags & BAM_ENTRY_LU)) {
4729 * header gets the right entry# after title has
4826 BAM_DPRINTF(("%s: is bootadm(1M) entry: %s\n",
4832 BAM_DPRINTF(("%s: is LU entry: %s\n",
4839 * For header comments, the entry# is "fixed up"
4877 /* record default, old default, and entry line ranges */
4935 * If not a booting entry, nothing else to fix for this
4936 * entry
4942 * Record the position of the default entry.
4955 * Now fixup the entry number
5005 int line, entry, len, n;
5015 /* Note: GRUB boot entry number starts with 0 */
5017 entry = ENTRY_INIT;
5028 line_parser(mp, buf, &line, &entry);
5042 selector(menu_t *mp, char *opt, int *entry, char **title)
5054 if (entry)
5055 *entry = ENTRY_INIT;
5067 if (entry && strcmp(opt_dup, OPT_ENTRY_NUM) == 0) {
5071 bam_error(_("invalid boot entry number: %s\n"), eq + 1);
5075 *entry = entryNum;
5092 * If invoked with a title or entry #, all
5093 * lines in *every* matching entry are listed
5099 int entry = ENTRY_INIT;
5116 if (selector(mp, opt, &entry, &title) != BAM_SUCCESS) {
5119 assert((entry != ENTRY_INIT) ^ (title != NULL));
5135 if (entry != ENTRY_INIT && lp->entryNum == entry) {
5142 * We set the entry value here so that all lines
5143 * in entry get printed. If we subsequently match
5150 entry = lp->entryNum;
5157 bam_error(_("no matching entry found\n"));
5238 BAM_DPRINTF(("%s: findroot added: line#: %d: entry#: %d\n",
5287 * Check entry number and make sure it's a modifiable entry.
5290 * + We can modify a bootadm-created entry
5291 * + We can modify a libbe-created entry
5301 /* free the entry content */
5321 BAM_DPRINTF(("%s: freeing entry: %d\n", fcn, tmp->entryNum));
5331 bam_error(_("no matching bootadm entry found\n"));
5336 * Now that we have deleted an entry, update
5337 * the entry numbering and the default cmd.
8363 bam_add_line(menu_t *mp, entry_t *entry, line_t *prev, line_t *lp)
8368 assert(entry);
8382 if (entry->end == prev) {
8383 BAM_DPRINTF(("%s: last line in entry\n", fcn));
8384 entry->end = lp;
8394 * look for matching bootadm entry with specified parameters
8420 /* find matching entry */
8424 /* first line of entry must be bootadm comment */
8513 * Check for matching module entry (failsafe or normal).
8567 * directboot. Look for a multiboot entry. A multiboot
8568 * entry will not have a findroot line.
8573 BAM_DPRINTF(("%s: upgrading entry from dboot to "
8578 BAM_DPRINTF(("%s: found entry with matching findroot: %s\n",
8583 BAM_DPRINTF(("%s: boot entry not found in menu. Creating "
8584 "new entry, findroot = %s\n", fcn, findroot));
8589 /* replace title of existing entry and update findroot line */
8792 int entry;
8840 /* add the entry for normal Solaris */
8844 entry = update_boot_entry(mp, title, grubsign, grubroot,
8848 BAM_DPRINTF(("%s: updated boot entry bam_zfs=%d, "
8850 if ((entry != BAM_ERROR) && (bam_is_hv == BAM_HV_PRESENT)) {
8856 BAM_DPRINTF(("%s: updated HV entry bam_zfs=%d, "
8860 entry = update_boot_entry(mp, title, grubsign, grubroot,
8864 BAM_DPRINTF(("%s: updated MULTIBOOT entry grubsign = %s\n",
8869 * Add the entry for failsafe archive. On a bfu'd system, the
8879 * Using $ISADIR as the default line, we have an entry which works
8904 BAM_DPRINTF(("%s: updated FAILSAFE entry "
8910 INJECT_ERROR1("UPDATE_ENTRY_ERROR", entry = BAM_ERROR);
8911 if (entry == BAM_ERROR) {
8912 bam_error(_("failed to add boot entry with title=%s, grub "
8920 ret = set_global(mp, menu_cmds[DEFAULT_CMD], entry);
8923 bam_error(_("failed to set GRUB menu default to %d\n"), entry);
8934 int entry = 0; /* default is 0 */
8948 entry = s_strtol(lp->arg);
8950 (void) snprintf(linebuf, sizeof (linebuf), "#%s%d", which, entry);
8960 int entry;
8972 entry = s_strtol(str);
8973 (void) set_global(mp, menu_cmds[DEFAULT_CMD], entry);
8975 BAM_DPRINTF(("%s: restored default to entryNum: %d\n", fcn, entry));
8985 * NULL delete temp entry, if present
8986 * entry=<n> switches default entry to <n>
8987 * else treated as boot-args and setup a temperary menu entry
8998 int entry;
9026 /* If no option, delete exiting reboot menu entry */
9031 NULL, NULL, 0, &entry);
9033 BAM_DPRINTF(("%s: transient entry not found\n", fcn));
9036 (void) delete_boot_entry(mp, entry, DBE_PRINTERR);
9044 /* if entry= is specified, set the default entry */
9045 if (strncmp(opt, "entry=", strlen("entry=")) == 0) {
9046 int entryNum = s_strtol(opt + strlen("entry="));
9047 BAM_DPRINTF(("%s: opt has entry=: %s\n", fcn, opt));
9048 if (selector(mp, opt, &entry, NULL) == BAM_SUCCESS) {
9049 /* this is entry=# option */
9050 ret = set_global(mp, menu_cmds[DEFAULT_CMD], entry);
9052 "set_default ret=%d\n", fcn, entry, ret));
9062 * add a new menu entry based on opt and make it the default
9113 /* add an entry for Solaris reboot */
9235 entry = add_boot_entry(mp, REBOOT_TITLE, signbuf, kernbuf,
9237 INJECT_ERROR1("REBOOT_ADD_BOOT_ENTRY", entry = BAM_ERROR);
9238 if (entry == BAM_ERROR) {
9245 ret = set_global(mp, menu_cmds[DEFAULT_CMD], entry);
9249 "to %d failed\n"), entry);
9276 bam_error(_("invalid boot entry number: %s\n"), prefix);
9331 * We are changing an existing entry. Retain any prefix whitespace,
9432 BAM_DPRINTF(("%s: no module/archive line for entry: "
9439 BAM_DPRINTF(("%s: no module/archive line for entry: %d\n",
9472 * Title for an entry to set properties that once went in bootenv.rc.
9527 * If a user changed the default entry to a non-bootadm controlled
9539 bam_error(_("Default /boot/grub/menu.lst entry is not "
9558 bam_error(_("no kernel line found in entry %d\n"),
9571 BAM_DPRINTF(("%s: no RC entry, nothing to report\n",
9603 * First, check if we're resetting an entry to the default.
9609 /* No previous entry, it's already the default */
9616 * Check if we can delete the entry. If we're resetting the
9619 * default, we can restore the old default and delete the entry.
9694 * of the case where there was no previous entry.
9703 "\"/\".\nCannot generate GRUB menu entry with "
9714 "\"/\".\nCannot generate GRUB menu entry with "
9726 "\"/\".\nCannot generate GRUB menu entry with "
9780 bam_error(_("failed to add boot entry: %s\n"),
9797 * There was already an bootenv entry which we need to edit.
9981 bam_print(_("no %s entry found\n"), globalcmd);