Lines Matching defs:rootpath
989 valid_mount_path(zlog_t *zlogp, const char *rootpath, const char *spec,
1008 * Join rootpath and dir. Make sure abspath ends with '/', this
1015 "%s%s/", rootpath, dir) >= sizeof (abspath)) {
1017 rootpath, dir);
1022 * Starting with rootpath, verify the mount path one component
1025 slashp = &abspath[strlen(rootpath)];
1192 mount_one(zlog_t *zlogp, struct zone_fstab *fsptr, const char *rootpath,
1200 if ((rv = valid_mount_path(zlogp, rootpath, fsptr->zone_fs_special,
1203 rootpath, fsptr->zone_fs_dir);
1207 if (make_one_dir(zlogp, rootpath, fsptr->zone_fs_dir,
1221 if ((rv = valid_mount_path(zlogp, rootpath,
1226 rootpath, fsptr->zone_fs_dir);
1231 (void) snprintf(path, sizeof (path), "%s%s", rootpath,
1356 build_mounted_pre_var(zlog_t *zlogp, char *rootpath,
1369 resolve_lofs(zlogp, rootpath, rootlen);
1401 strcmp(fromdir, rootpath) != 0) {
1427 if (domount(zlogp, MNTTYPE_LOFS, "", rootpath, tmp) != 0)
1429 (void) strlcpy(rootpath, tmp, rootlen);
1435 build_mounted_post_var(zlog_t *zlogp, zone_mnt_t mount_cmd, char *rootpath,
1471 rootpath, *cpp);
1674 char rootpath[MAXPATHLEN];
1699 if (zone_get_rootpath(zone_name, rootpath, sizeof (rootpath)) != Z_OK) {
1762 * get mounted relative to rootpath, which is usually
1765 * updates rootpath to be <zonepath>/lu/a so we'll mount all
1793 rootpath, sizeof (rootpath), zonepath, luroot, sizeof (luroot)))
1801 size_t slen = strlen(rootpath) - 2;
1806 * so strip the trailing '/a' from the rootpath.
1808 assert(strcmp(&rootpath[slen], "/a") == 0);
1809 rootpath[slen] = '\0';
1810 if (mount_one(zlogp, &fs_ptr[i], rootpath, mount_cmd)
1813 rootpath[slen] = '/';
1816 if (mount_one(zlogp, &fs_ptr[i], rootpath, mount_cmd) != 0)
1820 !build_mounted_post_var(zlogp, mount_cmd, rootpath, luroot))
1827 tsol_mounts(zlogp, zone_name, rootpath) != 0)
2901 char rootpath[MAXPATHLEN];
2928 if (zone_get_devroot(zone_name, rootpath,
2929 sizeof (rootpath)) != Z_OK) {
2936 (void) snprintf(path, sizeof (path), "%s%s", rootpath,
3706 validate_rootds_label(zlog_t *zlogp, char *rootpath, m_label_t *zone_sl)
3731 if ((zhp = zfs_path_to_zhandle(hdl, rootpath,
3734 rootpath);
3764 "property for root dataset at '%s'\n", rootpath);
3774 "property on root dataset at '%s'\n", rootpath);
3797 tsol_mounts(zlog_t *zlogp, char *zone_name, char *rootpath)
3819 (void) make_one_dir(zlogp, rootpath, "/export/home",
3915 autofs_fstab.zone_fs_special, rootpath);
3981 "%s/zone/%s/export/home", rootpath, zid_name);
4033 MAXPATHLEN, "%s/export/home", rootpath);
4308 duplicate_zone_root(zlog_t *zlogp, const char *rootpath)
4329 rlen = strlen(rootpath);
4341 if (strncmp(rootpath, zroot, zlen) == 0 &&
4343 (rootpath[zlen] == '\0' || rootpath[zlen] == '/')) {
4350 rootpath, zonename);
4364 duplicate_reachable_path(zlog_t *zlogp, const char *rootpath)
4369 if (stat64(rootpath, &rst) == -1) {
4370 zerror(zlogp, B_TRUE, "can't stat %s", rootpath);
4385 rootpath, mnp->mnt_mountp);
4759 char rootpath[MAXPATHLEN];
4774 if (zone_get_rootpath(zone_name, rootpath, sizeof (rootpath)) != Z_OK) {
4779 resolve_lofs(zlogp, rootpath, sizeof (rootpath));
4822 if (validate_rootds_label(zlogp, rootpath, zlabel) != 0)
4834 if (duplicate_zone_root(zlogp, rootpath))
4836 if (duplicate_reachable_path(zlogp, rootpath))
4840 root_to_lu(zlogp, rootpath, sizeof (rootpath), B_TRUE);
4851 if (mkdir(rootpath, 0755) != 0 && errno != EEXIST) {
4852 zerror(zlogp, B_TRUE, "cannot create %s", rootpath);
4855 if (domount(zlogp, "tmpfs", "", "swap", rootpath) != 0)
4894 if ((zoneid = zone_create(kzone, rootpath, privs, rctlbuf,
4898 if (zonecfg_find_mounts(rootpath, NULL, NULL) < 1) {
4901 "a subdirectory of %s", rootpath);
4906 "subdirectories of %s:", rootpath);
4907 (void) zonecfg_find_mounts(rootpath,