Lines Matching defs:rootpath

988 valid_mount_path(zlog_t *zlogp, const char *rootpath, const char *spec,
1007 * Join rootpath and dir. Make sure abspath ends with '/', this
1014 "%s%s/", rootpath, dir) >= sizeof (abspath)) {
1016 rootpath, dir);
1021 * Starting with rootpath, verify the mount path one component
1024 slashp = &abspath[strlen(rootpath)];
1191 mount_one(zlog_t *zlogp, struct zone_fstab *fsptr, const char *rootpath,
1199 if ((rv = valid_mount_path(zlogp, rootpath, fsptr->zone_fs_special,
1202 rootpath, fsptr->zone_fs_dir);
1206 if (make_one_dir(zlogp, rootpath, fsptr->zone_fs_dir,
1220 if ((rv = valid_mount_path(zlogp, rootpath,
1225 rootpath, fsptr->zone_fs_dir);
1230 (void) snprintf(path, sizeof (path), "%s%s", rootpath,
1355 build_mounted_pre_var(zlog_t *zlogp, char *rootpath,
1368 resolve_lofs(zlogp, rootpath, rootlen);
1400 strcmp(fromdir, rootpath) != 0) {
1426 if (domount(zlogp, MNTTYPE_LOFS, "", rootpath, tmp) != 0)
1428 (void) strlcpy(rootpath, tmp, rootlen);
1434 build_mounted_post_var(zlog_t *zlogp, zone_mnt_t mount_cmd, char *rootpath,
1470 rootpath, *cpp);
1673 char rootpath[MAXPATHLEN];
1698 if (zone_get_rootpath(zone_name, rootpath, sizeof (rootpath)) != Z_OK) {
1761 * get mounted relative to rootpath, which is usually
1764 * updates rootpath to be <zonepath>/lu/a so we'll mount all
1792 rootpath, sizeof (rootpath), zonepath, luroot, sizeof (luroot)))
1800 size_t slen = strlen(rootpath) - 2;
1805 * so strip the trailing '/a' from the rootpath.
1807 assert(strcmp(&rootpath[slen], "/a") == 0);
1808 rootpath[slen] = '\0';
1809 if (mount_one(zlogp, &fs_ptr[i], rootpath, mount_cmd)
1812 rootpath[slen] = '/';
1815 if (mount_one(zlogp, &fs_ptr[i], rootpath, mount_cmd) != 0)
1819 !build_mounted_post_var(zlogp, mount_cmd, rootpath, luroot))
1826 tsol_mounts(zlogp, zone_name, rootpath) != 0)
2900 char rootpath[MAXPATHLEN];
2927 if (zone_get_devroot(zone_name, rootpath,
2928 sizeof (rootpath)) != Z_OK) {
2935 (void) snprintf(path, sizeof (path), "%s%s", rootpath,
3705 validate_rootds_label(zlog_t *zlogp, char *rootpath, m_label_t *zone_sl)
3730 if ((zhp = zfs_path_to_zhandle(hdl, rootpath,
3733 rootpath);
3763 "property for root dataset at '%s'\n", rootpath);
3773 "property on root dataset at '%s'\n", rootpath);
3796 tsol_mounts(zlog_t *zlogp, char *zone_name, char *rootpath)
3818 (void) make_one_dir(zlogp, rootpath, "/export/home",
3914 autofs_fstab.zone_fs_special, rootpath);
3980 "%s/zone/%s/export/home", rootpath, zid_name);
4032 MAXPATHLEN, "%s/export/home", rootpath);
4307 duplicate_zone_root(zlog_t *zlogp, const char *rootpath)
4328 rlen = strlen(rootpath);
4340 if (strncmp(rootpath, zroot, zlen) == 0 &&
4342 (rootpath[zlen] == '\0' || rootpath[zlen] == '/')) {
4349 rootpath, zonename);
4363 duplicate_reachable_path(zlog_t *zlogp, const char *rootpath)
4368 if (stat64(rootpath, &rst) == -1) {
4369 zerror(zlogp, B_TRUE, "can't stat %s", rootpath);
4384 rootpath, mnp->mnt_mountp);
4665 char rootpath[MAXPATHLEN];
4680 if (zone_get_rootpath(zone_name, rootpath, sizeof (rootpath)) != Z_OK) {
4685 resolve_lofs(zlogp, rootpath, sizeof (rootpath));
4728 if (validate_rootds_label(zlogp, rootpath, zlabel) != 0)
4740 if (duplicate_zone_root(zlogp, rootpath))
4742 if (duplicate_reachable_path(zlogp, rootpath))
4746 root_to_lu(zlogp, rootpath, sizeof (rootpath), B_TRUE);
4757 if (mkdir(rootpath, 0755) != 0 && errno != EEXIST) {
4758 zerror(zlogp, B_TRUE, "cannot create %s", rootpath);
4761 if (domount(zlogp, "tmpfs", "", "swap", rootpath) != 0)
4800 if ((zoneid = zone_create(kzone, rootpath, privs, rctlbuf,
4804 if (zonecfg_find_mounts(rootpath, NULL, NULL) < 1) {
4807 "a subdirectory of %s", rootpath);
4812 "subdirectories of %s:", rootpath);
4813 (void) zonecfg_find_mounts(rootpath,