Lines Matching refs:target_zone

211 char *target_zone;  variable
401 if (target_zone != NULL) in zerror()
402 (void) fprintf(stderr, "zone '%s': ", target_zone); in zerror()
881 strcmp(ze->zone_name, target_zone) == 0) { in crosscheck_zonepaths()
922 target_zone, path, ze->zone_name, rpath); in crosscheck_zonepaths()
1117 if ((res = zone_get_state(target_zone, &state)) != Z_OK) { in validate_zonepath()
1119 zperror2(target_zone, gettext("could not get state")); in validate_zonepath()
1185 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) { in invoke_brand_handler()
1225 if (sanity_check(target_zone, CMD_READY, B_FALSE, B_FALSE, B_FALSE) in ready_func()
1232 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) { in ready_func()
1301 if (sanity_check(target_zone, CMD_BOOT, B_FALSE, B_FALSE, force) in boot_func()
1307 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) { in boot_func()
1375 if (target_zone == NULL) { in list_func()
1462 assert(strcmp(zent.zname, target_zone) == 0); in list_func()
1465 } else if ((zentp = lookup_running_zone(target_zone)) != NULL) { in list_func()
1468 } else if (lookup_zone_info(target_zone, ZONE_ID_UNDEFINED, in list_func()
1479 if (zone_id == GLOBAL_ZONEID && target_zone != NULL && in list_func()
1480 strcmp(target_zone, GLOBAL_ZONENAME) != 0) in list_func()
1849 if (sanity_check(target_zone, CMD_HALT, B_FALSE, B_FALSE, B_FALSE) in halt_func()
1860 return ((zonecfg_call_zoneadmd(target_zone, &zarg, locale, in halt_func()
1913 if (sanity_check(target_zone, CMD_SHUTDOWN, B_TRUE, B_FALSE, B_FALSE) in shutdown_func()
1917 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != Z_OK) in shutdown_func()
1921 if (sanity_check(target_zone, CMD_BOOT, B_FALSE, B_FALSE, in shutdown_func()
1926 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, in shutdown_func()
1977 if (sanity_check(target_zone, CMD_REBOOT, B_TRUE, B_FALSE, B_FALSE) in reboot_func()
1984 return ((zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) == 0) in reboot_func()
2038 target_zone, zonepath); in verify_brand()
2712 target_zid = getzoneidbyname(target_zone); in verify_handle()
2722 } else if (strcmp(dl_owner_zname, target_zone) == 0) in verify_handle()
2797 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) { in verify_details()
2815 if ((err = zone_get_zonepath(target_zone, checkpath, in verify_details()
2818 zperror2(target_zone, gettext("could not get zone path")); in verify_details()
2848 execname, target_zone); in verify_details()
2872 if (sanity_check(target_zone, CMD_VERIFY, B_FALSE, B_FALSE, B_FALSE) in verify_func()
2931 if (target_zone == NULL) { in install_func()
2941 if ((err = zone_get_zonepath(target_zone, zonepath, in install_func()
2944 zperror2(target_zone, gettext("could not get zone path")); in install_func()
2955 target_zone, zonepath) != Z_OK) { in install_func()
2962 target_zone, zonepath) != Z_OK) { in install_func()
3038 if (sanity_check(target_zone, CMD_INSTALL, B_FALSE, B_TRUE, in install_func()
3044 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in install_func()
3049 err = zone_set_state(target_zone, ZONE_STATE_INCOMPLETE); in install_func()
3052 zperror2(target_zone, gettext("could not set state")); in install_func()
3065 zonecfg_release_lock_file(target_zone, lockfd); in install_func()
3076 if ((err = zone_set_state(target_zone, ZONE_STATE_INSTALLED)) != Z_OK) { in install_func()
3078 zperror2(target_zone, gettext("could not set state")); in install_func()
3090 (void) zone_set_state(target_zone, in install_func()
3107 zperror2(target_zone, in install_func()
3109 } else if ((temp_err = zone_set_state(target_zone, in install_func()
3112 zperror2(target_zone, gettext("could not set state")); in install_func()
3117 zonecfg_release_lock_file(target_zone, lockfd); in install_func()
3123 zone_dochandle_t t_handle, char *target_zone) in warn_dev_match() argument
3131 zperror2(target_zone, gettext("could not enumerate devices")); in warn_dev_match()
3245 zone_dochandle_t t_handle, char *target_zone) in warn_fs_match() argument
3253 zperror2(target_zone, in warn_fs_match()
3289 zone_dochandle_t t_handle, char *target_zone) in warn_ip_match() argument
3297 zperror2(target_zone, in warn_ip_match()
3368 target_zone = source; in warn_dataset_match()
3385 valid_brand_clone(char *source_zone, char *target_zone) in valid_brand_clone() argument
3400 "types.\n"), execname, source_zone, target_zone); in valid_brand_clone()
3413 validate_clone(char *source_zone, char *target_zone) in validate_clone() argument
3423 if ((err = zonecfg_get_handle(target_zone, t_handle)) != Z_OK) { in validate_clone()
3442 err = valid_brand_clone(source_zone, target_zone); in validate_clone()
3447 warn_fs_match(s_handle, source_zone, t_handle, target_zone); in validate_clone()
3450 warn_ip_match(s_handle, source_zone, t_handle, target_zone); in validate_clone()
3453 warn_dev_match(s_handle, source_zone, t_handle, target_zone); in validate_clone()
3456 warn_dataset_match(s_handle, source_zone, t_handle, target_zone); in validate_clone()
3601 if (sanity_check(target_zone, CMD_CLONE, B_FALSE, B_TRUE, in clone_func()
3665 if (validate_clone(source_zone, target_zone) != Z_OK) in clone_func()
3668 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in clone_func()
3682 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath))) in clone_func()
3685 zperror2(target_zone, gettext("could not get zone path")); in clone_func()
3698 if (get_hook(bh, cmdbuf, sizeof (cmdbuf), brand_get_clone, target_zone, in clone_func()
3707 target_zone, zonepath) != Z_OK) { in clone_func()
3734 brand_get_validatesnap, target_zone, zonepath) != Z_OK) { in clone_func()
3756 if ((err = zone_set_state(target_zone, ZONE_STATE_INCOMPLETE)) in clone_func()
3759 zperror2(target_zone, gettext("could not set state")); in clone_func()
3829 err = zone_set_state(target_zone, ZONE_STATE_INSTALLED); in clone_func()
3832 zperror2(target_zone, gettext("could not set state")); in clone_func()
3836 zonecfg_release_lock_file(target_zone, lockfd); in clone_func()
4007 if (sanity_check(target_zone, CMD_MOVE, B_FALSE, B_TRUE, B_FALSE) in move_func()
4021 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath))) in move_func()
4024 zperror2(target_zone, gettext("could not get zone path")); in move_func()
4087 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) { in move_func()
4093 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in move_func()
4189 zonecfg_release_lock_file(target_zone, lockfd); in move_func()
4280 zonecfg_release_lock_file(target_zone, lockfd); in move_func()
4332 if (sanity_check(target_zone, CMD_DETACH, B_FALSE, B_TRUE, in detach_func()
4342 if (target_zone == NULL) { in detach_func()
4347 if (strcmp(target_zone, GLOBAL_ZONENAME) == 0) { in detach_func()
4354 if ((err = zone_get_zonepath(target_zone, zonepath, sizeof (zonepath))) in detach_func()
4357 zperror2(target_zone, gettext("could not get zone path")); in detach_func()
4367 if (get_hook(bh, cmdbuf, sizeof (cmdbuf), brand_get_detach, target_zone, in detach_func()
4375 target_zone, zonepath) != Z_OK) { in detach_func()
4391 if (execute && zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in detach_func()
4405 zonecfg_release_lock_file(target_zone, lockfd); in detach_func()
4424 zonecfg_release_lock_file(target_zone, lockfd); in detach_func()
4461 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) { in detach_func()
4481 if (execute && (err = zone_set_state(target_zone, in detach_func()
4490 zonecfg_release_lock_file(target_zone, lockfd); in detach_func()
4713 if (sanity_check(target_zone, CMD_ATTACH, B_FALSE, in attach_func()
4720 if ((err = zone_get_zonepath(target_zone, zonepath, in attach_func()
4723 zperror2(target_zone, in attach_func()
4733 target_zone = "-"; in attach_func()
4749 if (get_hook(bh, cmdbuf, sizeof (cmdbuf), brand_get_attach, target_zone, in attach_func()
4757 target_zone, zonepath) != Z_OK) { in attach_func()
4774 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in attach_func()
4795 zonecfg_release_lock_file(target_zone, in attach_func()
4825 zonecfg_release_lock_file(target_zone, lockfd); in attach_func()
4832 } else if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) { in attach_func()
4842 (err = zone_set_state(target_zone, ZONE_STATE_INSTALLED)) != Z_OK) { in attach_func()
4848 zonecfg_release_lock_file(target_zone, lockfd); in attach_func()
4856 if ((err = zone_set_state(target_zone, in attach_func()
4936 if (sanity_check(target_zone, CMD_UNINSTALL, B_FALSE, B_TRUE, in uninstall_func()
4949 cmd_to_str(CMD_UNINSTALL), target_zone); in uninstall_func()
4961 if ((err = zone_get_zonepath(target_zone, zonepath, in uninstall_func()
4964 zperror2(target_zone, gettext("could not get zone path")); in uninstall_func()
4978 target_zone, zonepath) != Z_OK) { in uninstall_func()
4986 target_zone, zonepath) != Z_OK) { in uninstall_func()
5003 if ((err = zone_get_rootpath(target_zone, rootpath, in uninstall_func()
5006 zperror2(target_zone, gettext("could not get root " in uninstall_func()
5016 if (zonecfg_ping_zoneadmd(target_zone) == Z_OK) { in uninstall_func()
5020 (void) zonecfg_call_zoneadmd(target_zone, &zarg, locale, in uninstall_func()
5024 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in uninstall_func()
5036 zonecfg_release_lock_file(target_zone, lockfd); in uninstall_func()
5046 zonecfg_release_lock_file(target_zone, lockfd); in uninstall_func()
5052 err = zone_set_state(target_zone, ZONE_STATE_INCOMPLETE); in uninstall_func()
5055 zperror2(target_zone, gettext("could not set state")); in uninstall_func()
5072 zonecfg_release_lock_file(target_zone, lockfd); in uninstall_func()
5086 zperror2(target_zone, gettext("cleaning up zonepath " in uninstall_func()
5092 err = zone_set_state(target_zone, ZONE_STATE_CONFIGURED); in uninstall_func()
5095 zperror2(target_zone, gettext("could not reset state")); in uninstall_func()
5098 zonecfg_release_lock_file(target_zone, lockfd); in uninstall_func()
5127 if (sanity_check(target_zone, CMD_MOUNT, B_FALSE, B_FALSE, force) in mount_func()
5135 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) { in mount_func()
5150 if (sanity_check(target_zone, CMD_UNMOUNT, B_FALSE, B_FALSE, B_FALSE) in unmount_func()
5155 if (zonecfg_call_zoneadmd(target_zone, &zarg, locale, B_TRUE) != 0) { in unmount_func()
5197 if (sanity_check(target_zone, CMD_MARK, B_FALSE, B_TRUE, B_FALSE) in mark_func()
5207 if (zonecfg_grab_lock_file(target_zone, &lockfd) != Z_OK) { in mark_func()
5213 err = zone_set_state(target_zone, state); in mark_func()
5216 zperror2(target_zone, gettext("could not set state")); in mark_func()
5218 zonecfg_release_lock_file(target_zone, lockfd); in mark_func()
5382 target_zone == NULL || strcmp(target_zone, GLOBAL_ZONENAME) != 0) in apply_func()
5408 if ((err = zonecfg_get_handle(target_zone, handle)) != Z_OK) { in apply_func()
5416 if ((err = zonecfg_apply_rctls(target_zone, handle)) != Z_OK) { in apply_func()
5512 if (sanity_check(target_zone, CMD_SYSBOOT, B_FALSE, B_TRUE, B_FALSE) != in sysboot_func()
5523 if ((err = zonecfg_get_handle(target_zone, zone_handle)) != Z_OK) { in sysboot_func()
5543 target_zone, zonepath); in sysboot_func()
5686 target_zone = NULL; in main()
5709 target_zone = optarg; in main()
5741 target_zone = newtarget; in main()
5744 if (target_zone != NULL && zone_get_id(target_zone, &zid) != 0) { in main()
5746 zperror(target_zone, B_TRUE); in main()
5755 zonecfg_init_lock_file(target_zone, &zone_lock_env); in main()
5768 if ((target_zone != NULL) && in main()
5769 (strcmp(target_zone, GLOBAL_ZONENAME) != 0)) { in main()
5770 if (zone_get_brand(target_zone, target_brand, in main()