Lines Matching refs:zent

423 zone_print(zone_entry_t *zent, boolean_t verbose, boolean_t parsable)  in zone_print()  argument
429 if (zent->zname[0] == '\0') in zone_print()
432 if (zent->ziptype == ZS_EXCLUSIVE) in zone_print()
448 (void) printf("%s\n", zent->zname); in zone_print()
451 if (zent->zid == ZONE_ID_UNDEFINED) in zone_print()
454 (void) printf("%lu", zent->zid); in zone_print()
455 (void) printf(":%s:%s:", zent->zname, zent->zstate_str); in zone_print()
456 cp = zent->zroot; in zone_print()
461 (void) printf("%s:%s:%s:%s\n", cp, zent->zuuid, zent->zbrand, in zone_print()
465 if (zent->zstate_str != NULL) { in zone_print()
466 if (zent->zid == ZONE_ID_UNDEFINED) in zone_print()
469 (void) printf("%*lu", ZONEID_WIDTH, zent->zid); in zone_print()
470 (void) printf(" %-16s %-10s %-30s %-8s %-6s\n", zent->zname, in zone_print()
471 zent->zstate_str, zent->zroot, zent->zbrand, ip_type_str); in zone_print()
476 lookup_zone_info(const char *zone_name, zoneid_t zid, zone_entry_t *zent) in lookup_zone_info() argument
483 (void) strlcpy(zent->zname, zone_name, sizeof (zent->zname)); in lookup_zone_info()
484 (void) strlcpy(zent->zroot, "???", sizeof (zent->zroot)); in lookup_zone_info()
485 (void) strlcpy(zent->zbrand, "???", sizeof (zent->zbrand)); in lookup_zone_info()
486 zent->zstate_str = "???"; in lookup_zone_info()
488 zent->zid = zid; in lookup_zone_info()
492 uuid_unparse(uuid, zent->zuuid); in lookup_zone_info()
494 zent->zuuid[0] = '\0'; in lookup_zone_info()
503 if (is_system_labeled() && zent->zid != ZONE_ID_UNDEFINED) { in lookup_zone_info()
504 if (zone_getattr(zent->zid, ZONE_ATTR_ROOT, zent->zroot, in lookup_zone_info()
505 sizeof (zent->zroot)) == -1) { in lookup_zone_info()
506 zperror2(zent->zname, in lookup_zone_info()
510 cp = zent->zroot + strlen(zent->zroot) - 5; in lookup_zone_info()
511 if (cp > zent->zroot && strcmp(cp, "/root") == 0) in lookup_zone_info()
514 if ((err = zone_get_zonepath(zent->zname, root, in lookup_zone_info()
517 zperror2(zent->zname, in lookup_zone_info()
521 (void) strlcpy(zent->zroot, root, sizeof (zent->zroot)); in lookup_zone_info()
524 if ((err = zone_get_state(zent->zname, &zent->zstate_num)) != Z_OK) { in lookup_zone_info()
526 zperror2(zent->zname, gettext("could not get state")); in lookup_zone_info()
529 zent->zstate_str = zone_state_str(zent->zstate_num); in lookup_zone_info()
540 (void) strlcpy(zent->zbrand, default_brand, in lookup_zone_info()
541 sizeof (zent->zbrand)); in lookup_zone_info()
542 } else if (zone_get_brand(zent->zname, zent->zbrand, in lookup_zone_info()
543 sizeof (zent->zbrand)) != Z_OK) { in lookup_zone_info()
544 zperror2(zent->zname, gettext("could not get brand name")); in lookup_zone_info()
553 zent->ziptype = ZS_SHARED; in lookup_zone_info()
567 if (zent->zstate_num == ZONE_STATE_RUNNING && in lookup_zone_info()
574 zent->ziptype = ZS_EXCLUSIVE; in lookup_zone_info()
576 zent->ziptype = ZS_SHARED; in lookup_zone_info()
582 zperror2(zent->zname, gettext("could not init handle")); in lookup_zone_info()
585 if ((err = zonecfg_get_handle(zent->zname, handle)) != Z_OK) { in lookup_zone_info()
586 zperror2(zent->zname, gettext("could not get handle")); in lookup_zone_info()
591 if ((err = zonecfg_get_iptype(handle, &zent->ziptype)) != Z_OK) { in lookup_zone_info()
592 zperror2(zent->zname, gettext("could not get ip-type")); in lookup_zone_info()
721 zone_entry_t zent; in zone_print_list() local
757 if (lookup_zone_info(name, ZONE_ID_UNDEFINED, &zent) != Z_OK) { in zone_print_list()
762 if (zent.zstate_num >= min_state) in zone_print_list()
763 zone_print(&zent, verbose, parsable); in zone_print_list()
1374 zone_entry_t *zentp, zent; in list_func() local
1428 fake_up_local_zone(zone_id, &zent); in list_func()
1430 zone_print(&zent, verbose, parsable); in list_func()
1465 fake_up_local_zone(zone_id, &zent); in list_func()
1472 assert(strcmp(zent.zname, target_zone) == 0); in list_func()
1473 zone_print(&zent, verbose, parsable); in list_func()
1479 &zent) == Z_OK) { in list_func()
1480 zone_print(&zent, verbose, parsable); in list_func()
1629 zone_entry_t *zent; in sanity_check() local
1700 zent = lookup_running_zone(zone); in sanity_check()
1702 zent = NULL; in sanity_check()
1706 zent = lookup_running_zone(kernzone); in sanity_check()
1708 zent = NULL; in sanity_check()
1716 if (zent == NULL) { in sanity_check()
1723 if (unsafe_when_running && zent != NULL) { in sanity_check()
1725 if ((err = zone_get_state(zent->zname, in sanity_check()
1726 &zent->zstate_num)) != Z_OK) { in sanity_check()
1728 zperror2(zent->zname, in sanity_check()
1731 zent->zstate_str = "ready/running"; in sanity_check()
1733 zent->zstate_str = in sanity_check()
1734 zone_state_str(zent->zstate_num); in sanity_check()
1737 cmd_to_str(cmd_num), zent->zstate_str); in sanity_check()
3563 zone_entry_t *zent; in clone_func() local
3640 zent = lookup_running_zone(source_zone); in clone_func()
3641 if (zent != NULL) { in clone_func()
3643 if ((err = zone_get_state(zent->zname, in clone_func()
3644 &zent->zstate_num)) != Z_OK) { in clone_func()
3646 zperror2(zent->zname, gettext("could not get " in clone_func()
3649 zent->zstate_str = "ready/running"; in clone_func()
3651 zent->zstate_str = in clone_func()
3652 zone_state_str(zent->zstate_num); in clone_func()
3655 cmd_to_str(CMD_CLONE), zent->zstate_str); in clone_func()