Go to main content

man pages section 3: Extended Library Functions, Volume 4

Exit Print View

Updated: Thursday, June 13, 2019
 
 

zs_property_string(3ZONESTAT)

Name

zs_property, zs_property_type, zs_property_string, zs_property_double, zs_property_uint64, zs_property_int64, zs_property_uint, zs_property_int - libzonestat property value accessor methods

Synopsis

cc [ flag ... ] file... -lzonestat [ libary ... ]
#include <zonestat.h>

data_type_t zs_property_type(zs_property_t property);
char *zs_property_string(zs_property_t property);
double zs_property_double(zs_property_t property);
uint64_t zs_property_uint64(zs_property_t property);
int64_t zs_property_int64(zs_property_t property);
uint_t zs_property_uint(zs_property_t property);
int zs_property_int(zs_property_t property);

Description

These functions retrieve the values from zs_property_t objects.

The zs_property_type() function returns a value from the data_type_t enumeration defined in sys/nvpair.h, which is one of:

Value
Datatype
DATA_TYPE_STRING
char *
DATA_TYPE_UINT64
uint64_t
DATA_TYPE_INT64
int64_t
DATA_TYPE_UINT32
uint_t
DATA_TYPE_INT32
int
DATA_TYPE_DOUBLE
double

The zs_property_string() function returns a char * pointing to a string. Callers must copy this string in order to retain it after freeing the zs_usage_t object from which this property was obtained.

The zs_property_uint64(), zs_property_int64(), zs_property_uint(), zs_property_int(), and zs_property_double() functions return the value contained in the property object.

Return Values

See Description.

Errors

If a zs_property_*() function is called with a property of the wrong type, the function will abort with abort(3C).

Examples

See zs_pset_zone(3ZONESTAT).

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Safe

See Also

zonestat(1), abort(3C), libpool(3LIB), libzonestat(3LIB), zs_open(3ZONESTAT), zs_pset(3ZONESTAT), zs_pset_zone(3ZONESTAT), zs_resource(3ZONESTAT), zs_usage(3ZONESTAT), zs_zone(3ZONESTAT), attributes(7), resource-controls(7), pooladm(8), psrset(8), rcapadm(8), swap(8), zoneadm(8), zonestatd(8)