Lines Matching defs:target_zone

207 char *target_zone;
393 if (target_zone != NULL)
394 (void) fprintf(stderr, "zone '%s': ", target_zone);
873 strcmp(ze->zone_name, target_zone) == 0) {
914 target_zone, path, ze->zone_name, rpath);
1086 if ((res = zone_get_state(target_zone, &state)) != Z_OK) {
1088 zperror2(target_zone, gettext("could not get state"));
1154 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
1194 if (sanity_check(target_zone, CMD_READY, B_FALSE, B_FALSE, B_FALSE)
1201 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) {
1270 if (sanity_check(target_zone, CMD_BOOT, B_FALSE, B_FALSE, force)
1276 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) {
1344 if (target_zone == NULL) {
1427 * id for target_zone, which in a non-global zone should
1431 assert(strcmp(zent.zname, target_zone) == 0);
1434 } else if ((zentp = lookup_running_zone(target_zone)) != NULL) {
1437 } else if (lookup_zone_info(target_zone, ZONE_ID_UNDEFINED,
1445 * only if we're in the global zone, and target_zone is specified
1448 if (zone_id == GLOBAL_ZONEID && target_zone != NULL &&
1449 strcmp(target_zone, GLOBAL_ZONENAME) != 0)
1813 if (sanity_check(target_zone, CMD_HALT, B_FALSE, B_FALSE, B_FALSE)
1824 return ((zonecfg_call_zoneadmd(target_zone, &zarg, locale,
1872 if (sanity_check(target_zone, CMD_REBOOT, B_TRUE, B_FALSE, B_FALSE)
1879 return ((zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) == 0)
1933 target_zone, zonepath);
2607 target_zid = getzoneidbyname(target_zone);
2617 } else if (strcmp(dl_owner_zname, target_zone) == 0)
2692 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
2710 if ((err = zone_get_zonepath(target_zone, checkpath,
2713 zperror2(target_zone, gettext("could not get zone path"));
2743 execname, target_zone);
2767 if (sanity_check(target_zone, CMD_VERIFY, B_FALSE, B_FALSE, B_FALSE)
2826 if (target_zone == NULL) {
2836 if ((err = zone_get_zonepath(target_zone, zonepath,
2839 zperror2(target_zone, gettext("could not get zone path"));
2850 target_zone, zonepath) != Z_OK) {
2857 target_zone, zonepath) != Z_OK) {
2933 if (sanity_check(target_zone, CMD_INSTALL, B_FALSE, B_TRUE,
2939 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
2944 err = zone_set_state(target_zone, ZONE_STATE_INCOMPLETE);
2947 zperror2(target_zone, gettext("could not set state"));
2960 zonecfg_release_lock_file(target_zone, lockfd);
2971 if ((err = zone_set_state(target_zone, ZONE_STATE_INSTALLED)) != Z_OK) {
2973 zperror2(target_zone, gettext("could not set state"));
2985 (void) zone_set_state(target_zone,
3002 zperror2(target_zone,
3004 } else if ((temp_err = zone_set_state(target_zone,
3007 zperror2(target_zone, gettext("could not set state"));
3012 zonecfg_release_lock_file(target_zone, lockfd);
3018 zone_dochandle_t t_handle, char *target_zone)
3026 zperror2(target_zone, gettext("could not enumerate devices"));
3140 zone_dochandle_t t_handle, char *target_zone)
3148 zperror2(target_zone,
3184 zone_dochandle_t t_handle, char *target_zone)
3192 zperror2(target_zone,
3263 target_zone = source;
3280 valid_brand_clone(char *source_zone, char *target_zone)
3295 "types.\n"), execname, source_zone, target_zone);
3308 validate_clone(char *source_zone, char *target_zone)
3318 if ((err = zonecfg_get_handle(target_zone, t_handle)) != Z_OK) {
3337 err = valid_brand_clone(source_zone, target_zone);
3342 warn_fs_match(s_handle, source_zone, t_handle, target_zone);
3345 warn_ip_match(s_handle, source_zone, t_handle, target_zone);
3348 warn_dev_match(s_handle, source_zone, t_handle, target_zone);
3351 warn_dataset_match(s_handle, source_zone, t_handle, target_zone);
3496 if (sanity_check(target_zone, CMD_CLONE, B_FALSE, B_TRUE,
3560 if (validate_clone(source_zone, target_zone) != Z_OK)
3563 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
3577 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
3580 zperror2(target_zone, gettext("could not get zone path"));
3593 if (get_hook(bh, cmdbuf, sizeof (cmdbuf), brand_get_clone, target_zone,
3602 target_zone, zonepath) != Z_OK) {
3629 brand_get_validatesnap, target_zone, zonepath) != Z_OK) {
3651 if ((err = zone_set_state(target_zone, ZONE_STATE_INCOMPLETE))
3654 zperror2(target_zone, gettext("could not set state"));
3724 err = zone_set_state(target_zone, ZONE_STATE_INSTALLED);
3727 zperror2(target_zone, gettext("could not set state"));
3731 zonecfg_release_lock_file(target_zone, lockfd);
3902 if (sanity_check(target_zone, CMD_MOVE, B_FALSE, B_TRUE, B_FALSE)
3916 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
3919 zperror2(target_zone, gettext("could not get zone path"));
3982 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
3988 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
4084 zonecfg_release_lock_file(target_zone, lockfd);
4175 zonecfg_release_lock_file(target_zone, lockfd);
4227 if (sanity_check(target_zone, CMD_DETACH, B_FALSE, B_TRUE,
4237 if (target_zone == NULL) {
4242 if (strcmp(target_zone, GLOBAL_ZONENAME) == 0) {
4249 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath)))
4252 zperror2(target_zone, gettext("could not get zone path"));
4262 if (get_hook(bh, cmdbuf, sizeof (cmdbuf), brand_get_detach, target_zone,
4270 target_zone, zonepath) != Z_OK) {
4286 if (execute && zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
4300 zonecfg_release_lock_file(target_zone, lockfd);
4319 zonecfg_release_lock_file(target_zone, lockfd);
4356 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
4376 if (execute && (err = zone_set_state(target_zone,
4385 zonecfg_release_lock_file(target_zone, lockfd);
4608 if (sanity_check(target_zone, CMD_ATTACH, B_FALSE,
4615 if ((err = zone_get_zonepath(target_zone, zonepath,
4618 zperror2(target_zone,
4628 target_zone = "-";
4644 if (get_hook(bh, cmdbuf, sizeof (cmdbuf), brand_get_attach, target_zone,
4652 target_zone, zonepath) != Z_OK) {
4669 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
4690 zonecfg_release_lock_file(target_zone,
4720 zonecfg_release_lock_file(target_zone, lockfd);
4727 } else if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
4737 (err = zone_set_state(target_zone, ZONE_STATE_INSTALLED)) != Z_OK) {
4743 zonecfg_release_lock_file(target_zone, lockfd);
4751 if ((err = zone_set_state(target_zone,
4831 if (sanity_check(target_zone, CMD_UNINSTALL, B_FALSE, B_TRUE,
4844 cmd_to_str(CMD_UNINSTALL), target_zone);
4856 if ((err = zone_get_zonepath(target_zone, zonepath,
4859 zperror2(target_zone, gettext("could not get zone path"));
4873 target_zone, zonepath) != Z_OK) {
4881 target_zone, zonepath) != Z_OK) {
4898 if ((err = zone_get_rootpath(target_zone, rootpath,
4901 zperror2(target_zone, gettext("could not get root "
4911 if (zonecfg_ping_zoneadmd(target_zone) == Z_OK) {
4915 (void) zonecfg_call_zoneadmd(target_zone, &zarg, locale,
4919 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
4931 zonecfg_release_lock_file(target_zone, lockfd);
4941 zonecfg_release_lock_file(target_zone, lockfd);
4947 err = zone_set_state(target_zone, ZONE_STATE_INCOMPLETE);
4950 zperror2(target_zone, gettext("could not set state"));
4967 zonecfg_release_lock_file(target_zone, lockfd);
4981 zperror2(target_zone, gettext("cleaning up zonepath "
4987 err = zone_set_state(target_zone, ZONE_STATE_CONFIGURED);
4990 zperror2(target_zone, gettext("could not reset state"));
4993 zonecfg_release_lock_file(target_zone, lockfd);
5022 if (sanity_check(target_zone, CMD_MOUNT, B_FALSE, B_FALSE, force)
5030 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) {
5045 if (sanity_check(target_zone, CMD_UNMOUNT, B_FALSE, B_FALSE, B_FALSE)
5050 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) {
5092 if (sanity_check(target_zone, CMD_MARK, B_FALSE, B_TRUE, B_FALSE)
5102 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) {
5108 err = zone_set_state(target_zone, state);
5111 zperror2(target_zone, gettext("could not set state"));
5113 zonecfg_release_lock_file(target_zone, lockfd);
5277 target_zone == NULL || strcmp(target_zone, GLOBAL_ZONENAME) != 0)
5303 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) {
5311 if ((err = zonecfg_apply_rctls(target_zone, handle)) != Z_OK) {
5407 if (sanity_check(target_zone, CMD_SYSBOOT, B_FALSE, B_TRUE, B_FALSE) !=
5418 if ((err = zonecfg_get_handle(target_zone, zone_handle)) != Z_OK) {
5438 target_zone, zonepath);
5581 target_zone = NULL;
5604 target_zone = optarg;
5636 target_zone = newtarget;
5639 if (target_zone != NULL && zone_get_id(target_zone, &zid) != 0) {
5641 zperror(target_zone, B_TRUE);
5650 zonecfg_init_lock_file(target_zone, &zone_lock_env);
5663 if ((target_zone != NULL) &&
5664 (strcmp(target_zone, GLOBAL_ZONENAME) != 0)) {
5665 if (zone_get_brand(target_zone, target_brand,