Lines Matching defs:root

163 #define	DEFAULT_DEV_UID		0	/* user root */
174 "root", /* ROOT_CMD */
275 static int is_ufs(char *root);
790 * An alternate platform requires an alternate root
902 bam_error(_("you must be root to run this command\n"));
1063 * if bam_alt_root is set, the stage files are used from alt root.
1065 * are read from pool bootfs unless alt root is set.
1067 * use arguments as targets, stage files are from alt or current root
1094 bam_error(_("alternate root %s not in mnttab\n"),
1145 * if altroot was set, we got be name and be root, only need
1147 * if no altroot, need to find be name and root from pool.
1222 bam_error(_("alternate root %s not in mnttab\n"), "/");
1340 * not the OS root
1343 bam_error(_("root <%s> on PCFS is not supported\n"), bam_root);
1352 BAM_DPRINTF(("%s: menu root is %s\n", fcn, menu_root));
1408 BAM_DPRINTF(("%s: cleaned menu root is <%s>\n", fcn, clean_menu_root));
1519 BAM_DPRINTF(("%s: writing menu to clean-menu-root: <%s>\n",
1542 error_t (*f)(char *root, char *opt);
1657 * In this case, root is readonly and /var/run may not exist.
1737 list_archive(char *root, char *opt)
1743 assert(root);
1747 if (read_list(root, flistp) != BAM_SUCCESS) {
1766 list2file(char *root, char *tmp, char *final, line_t *start)
1780 (void) snprintf(path, sizeof (path), "%s%s", root, final);
1800 * otherwise ask the system for uid/gid of root/sys.
1827 (void) snprintf(tmpfile, sizeof (tmpfile), "%s%s", root, tmp);
2485 set_cache_dir(char *root, int what)
2491 "%s%s%s%s%s", root, ARCHIVE_PREFIX, get_machine(), what == FILE64 ?
2525 set_update_dir(char *root, int what)
2540 sizeof (get_updatedir(what)), "%s%s%s/amd64%s", root,
2544 sizeof (get_updatedir(what)), "%s%s%s%s", root,
2570 is_valid_archive(char *root, int what)
2579 "%s%s%s/amd64%s", root, ARCHIVE_PREFIX, get_machine(),
2583 root, ARCHIVE_PREFIX, get_machine(), ARCHIVE_SUFFIX);
2610 ret = snprintf(timestamp_path, sizeof (timestamp_path), "%s%s", root,
2661 check_flags_and_files(char *root)
2671 ret = is_valid_archive(root, FILE64);
2677 ret = is_valid_archive(root, what);
2694 sizeof (get_cachedir(FILE64)), "%s%s%s/%s", root,
2720 if (set_cache_dir(root, what) != 0)
2725 if (set_update_dir(root, what) != 0)
2747 read_one_list(char *root, filelist_t *flistp, char *filelist)
2754 (void) snprintf(path, sizeof (path), "%s%s", root, filelist);
2777 read_list(char *root, filelist_t *flistp)
2790 n = snprintf(path, sizeof (path), "%s%s", root, EXTRACT_BOOT_FILELIST);
2809 if (strlen(root) > 1)
2810 rootarglen += strlen(root) + strlen("-R ");
2818 if (strlen(root) > 1) {
2820 "-R %s", root);
2843 rval = read_one_list(root, flistp, BOOT_FILE_LIST);
2846 (void) read_one_list(root, flistp, ETC_FILE_LIST);
2858 getoldstat(char *root)
2865 (void) snprintf(path, sizeof (path), "%s%s", root, FILE_STAT);
2934 * been deleted from the root filesystem. This is needed for
2939 check4stale(char *root)
2969 root, file);
3004 walk_list(char *root, filelist_t *flistp)
3016 (void) snprintf(path, sizeof (path), "%s%s", root, lp->line);
3038 update_timestamp(char *root)
3043 (void) snprintf(timestamp_path, sizeof (timestamp_path), "%s%s", root,
3061 savenew(char *root)
3079 (void) snprintf(path, sizeof (path), "%s%s", root, FILE_STAT_TMP);
3098 (void) snprintf(path2, sizeof (path2), "%s%s", root, FILE_STAT);
3134 update_required(char *root)
3151 ret = check_flags_and_files(root);
3161 (void) snprintf(path, sizeof (path), "%s%s", root, FILE_STAT);
3168 getoldstat(root);
3172 * present on the root filesystem.
3174 check4stale(root);
3179 if (read_list(root, flistp) != BAM_SUCCESS) {
3197 ret = walk_list(root, &flist);
3231 flushfs(char *root)
3236 LOCKFS_PATH, root);
3300 is_be(char *root)
3309 if (!is_zfs(root))
3317 if ((zhp = zfs_path_to_zhandle(hdl, root,
3673 mkisofs_archive(char *root, int what)
3682 "%s%s%s/amd64/archive-new-%d", root, ARCHIVE_PREFIX,
3686 root, ARCHIVE_PREFIX, get_machine(), getpid());
3693 "%s%s%s/amd64%s", root, ARCHIVE_PREFIX, get_machine(),
3697 "%s%s%s%s", root, ARCHIVE_PREFIX, get_machine(),
3707 "%s/platform/%s/lib/fs/hsfs/bootblk", root, get_machine());
3762 root);
3767 create_ramdisk(char *root)
3779 ret = mkisofs_archive(root, what);
3794 (void) snprintf(path, sizeof (path), "%s/%s", root, CREATE_RAMDISK);
3804 len = strlen(path) + strlen(root) + 10; /* room for space + -R */
3810 assert(strlen(root) > 1);
3812 path, bam_platform, root);
3815 } else if (strlen(root) > 1) {
3816 (void) snprintf(cmdline, len, "%s -R %s", path, root);
3844 is_ramdisk(char *root)
3856 * - create it on a ramdisk which is the root filesystem
3874 (void) strlcpy(mntpt, root, sizeof (mntpt));
3875 if (strcmp(root, "/") != 0) {
3890 bam_error(_("alternate root %s not in mnttab\n"),
3910 is_boot_archive(char *root)
3920 (void) snprintf(path, sizeof (path), "%s/%s", root, CREATE_RAMDISK);
3927 "instance: %s\n", fcn, root));
3932 fcn, root));
3946 is_grub(const char *root)
3968 (void) snprintf(path, sizeof (path), "%s%s", root, GRUB_STAGE2);
3981 is_zfs(char *root)
3987 ret = statvfs(root, &vfs);
3990 bam_error(_("statvfs failed for %s: %s\n"), root,
3996 BAM_DPRINTF(("%s: is a ZFS filesystem: %s\n", fcn, root));
3999 BAM_DPRINTF(("%s: is *NOT* a ZFS filesystem: %s\n", fcn, root));
4005 is_ufs(char *root)
4011 ret = statvfs(root, &vfs);
4014 bam_error(_("statvfs failed for %s: %s\n"), root,
4020 BAM_DPRINTF(("%s: is a UFS filesystem: %s\n", fcn, root));
4023 BAM_DPRINTF(("%s: is *NOT* a UFS filesystem: %s\n", fcn, root));
4029 is_pcfs(char *root)
4035 ret = statvfs(root, &vfs);
4038 bam_error(_("statvfs failed for %s: %s\n"), root,
4044 BAM_DPRINTF(("%s: is a PCFS filesystem: %s\n", fcn, root));
4048 fcn, root));
4054 is_readonly(char *root)
4067 root, BOOTADM_RDONLY_TEST, getpid());
4076 BAM_DPRINTF(("%s: is a READONLY filesystem: %s\n", fcn, root));
4080 root, strerror(error));
4086 BAM_DPRINTF(("%s: is a RDWR filesystem: %s\n", fcn, root));
4091 update_archive(char *root, char *opt)
4095 assert(root);
4102 * Never update non-BE root in update_all
4104 if (!is_be(root) && bam_update_all)
4107 * root must belong to a boot archive based OS,
4109 if (!is_boot_archive(root)) {
4116 "instance\n"), root);
4125 if (bam_smf_check && !bam_root_readonly && !is_zfs(root))
4131 if (is_ramdisk(root))
4135 * root must be writable. This check applies to alternate
4136 * root (-R option); bam_root_readonly applies to '/' only.
4139 if (!bam_smf_check && !bam_check && is_readonly(root)) {
4147 ret = update_required(root);
4160 "skipping archives update\n"), root);
4170 ret = create_ramdisk(root);
4178 savenew(root);
4179 update_timestamp(root);
4412 update_all(char *root, char *opt)
4421 assert(root);
4424 if (bam_rootlen != 1 || *root != '/') {
4425 elide_trailing_slash(root, multibt, sizeof (multibt));
4426 bam_error(_("an alternate root (%s) cannot be used with this "
4432 * First update archive for current root
4434 if (update_archive(root, opt) != BAM_SUCCESS)
4442 * for all mounted Newboot root filesystems
4470 * We put a trailing slash to be consistent with root = "/"
5542 bam_error(_("create_diskmap command failed for OS root: %s.\n"),
7008 /* Make sure the list exists and is owned by root */
7130 bam_error(_("NULL fstype found for OS root %s\n"), osroot);
8326 "root: %s\n"), menu_root);
8397 * - Else, match on root/findroot, kernel, and module.
8399 * root line is considered a match.
8407 char *root,
8445 lp = lp->next; /* advance to root line */
8468 INJECT_ERROR1("FIND_BOOT_ENTRY_NULL_ROOT", root = NULL);
8469 if (root == NULL) {
8470 BAM_DPRINTF(("%s: no match, line has root, we "
8474 /* root cmd found, try match */
8475 if (strcmp(lp->arg, root) != 0) {
8476 BAM_DPRINTF(("%s: no match root: %s, %s\n",
8477 fcn, root, lp->arg));
8480 BAM_DPRINTF(("%s: matched root: %s\n", fcn, root));
8487 /* no root command, see if root is optional */
8489 BAM_DPRINTF(("%s: root NOT optional\n", fcn));
8492 BAM_DPRINTF(("%s: root IS optional\n", fcn));
8550 update_boot_entry(menu_t *mp, char *title, char *findroot, char *root,
8562 ent = find_boot_entry(mp, NULL, kernel, findroot, root, module,
8570 ent = find_boot_entry(mp, NULL, "multiboot", NULL, root,
8574 "multiboot: root = %s\n", fcn, root));
8601 lp = lp->next; /* root line */
8603 /* if no root or findroot command, create a new line_t */
8731 * and menu_root will tell us if root is optional.
8820 bam_error(_("failed to get grubsign for root: %s, device %s\n"),
9021 bam_error(_("an alternate root (%s) cannot be used with this "
9100 * There is no alternate root while doing reboot with args
9107 bam_error(_("the root filesystem is not a dboot Solaris "
9987 menu_write(char *root, menu_t *mp)
9991 BAM_DPRINTF(("%s: entered menu_write() for root: <%s>\n", fcn, root));
9992 return (list2file(root, MENU_TMP, GRUB_MENU, mp->start));
10351 ucode_install(char *root)