svcadm(1M)을 검색하려면 섹션에서 1M 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
pool_create(3pool)
Pool Configuration Manipulation Library Functions pool_associate(3POOL)
NAME
pool_associate, pool_create, pool_destroy, pool_dissociate, pool_info,
pool_query_pool_resources - resource pool manipulation functions
SYNOPSIS
cc [ flag... ] file... -lpool [ library... ]
#include <pool.h>
int pool_associate(pool_conf_t *conf, pool_t *pool,
pool_resource_t *resource);
pool_t *pool_create(pool_conf_t *conf, const char *name);
int pool_destroy(pool_conf_t *conf, pool_t *pool);
int pool_dissociate(pool_conf_t *conf, pool_t *pool,
pool_resource_t *resource);
const char *pool_info(pool_conf_t *conf, pool_t *pool,
int flags);
pool_resource_t **pool_query_pool_resources(pool_conf_t *conf,
pool_t *pool, uint_t *nelem, pool_value_t **properties);
DESCRIPTION
These functions provide mechanisms for constructing and modifying pools
entries within a target pools configuration. The conf argument for each
function refers to the target configuration to which the operation
applies.
Every pool is associated with a single resource of type "pset". "pset"
is the only supported resource type.
The pool_associate() function associates the specified pset with pool.
A pset can be associated with multiple pools at the same time. The pset
that was formerly associated with this pool is no longer associated
with the pool. The new association replaces the earlier one. The pool
named pool_default may not have its pset association changed.
The pool_create() function creates a new pool with the supplied name
with its default properties initialized, and associated with the
default pset.
The pool_destroy() function destroys the given pool. The pool's associ‐
ated pset is not modified.
The pool_dissociate() function removes the association between the
given pset and pool. On successful completion, the pool is associated
with pset_default.
The pool_info() function returns a string describing the given pool.
The string is allocated with malloc(3C). The caller is responsible for
freeing the returned string. If the flags option is non-zero, the
string returned also describes the associated pset of the pool.
The functions which modify the configuration will fail if used on pools
or psets created by the pset_create(2) system call. For manipulating
such psets, see pset_create(2), and psrset(8).
The pool_query_pool_resources() function returns a null-terminated
array of resources currently associated with the pool that match the
given list of properties. The return value must be freed by the caller.
The nelem argument is set to be the length of the array returned.
RETURN VALUES
Upon successful completion, pool_create() returns a new initialized
pool. Otherwise it returns NULL and pool_error(3POOL) returns the pool-
specific error value.
Upon successful completion, pool_associate(), pool_destroy(), and
pool_dissociate() return 0. Otherwise, they return -1 and pool_error()
returns the pool-specific error value.
Upon successful completion, pool_info() returns a string describing the
given pool. Otherwise it returns NULL and pool_error() returns the
pool-specific error value.
Upon successful completion, pool_query_pool_resources() returns a null-
terminated array of resources. Otherwise it returns NULL and
pool_error() returns the pool-specific error value.
ERRORS
The pool_create() function will fail if:
POE_BADPARAM The supplied configuration's status is not
POF_VALID or name is already in use.
POE_SYSTEM A system error has occurred. Check the system error
code for more details.
POE_INVALID_CONF The pool element could not be created because the
configuration would be invalid.
POE_PUTPROP The name of the pool starts with "SYS", which is a
reserved namespace.
The pool_destroy() function will fail if:
POE_BADPARAM The supplied configuration's status is not POF_VALID.
POE_SYSTEM A system error has occurred. Check the system error
code for more details. A system error code of ENOTSUP
will be set if attempting to destroy a pool created by
pset_create(2) or psrset(8).
The pool_associate() function will fail if:
POE_BADPARAM The supplied configuration's status is not POF_VALID or
the parameters are supplied from a different configura‐
tion.
The target pool is "pool_default", which can only be
associated with "pool_default".
POE_SYSTEM A system error has occurred. Check the system error
code for more details. A system error code of ENOTSUP
will be set if attempting to change the association of
a pool or pset created by pset_create(2) or psrset(8).
The pool_disassociate() function will fail if:
POE_BADPARAM The supplied configuration's status is not POF_VALID or
the parameters are supplied from a different configura‐
tion.
POE_SYSTEM A system error has occurred. Check the system error
code for more details. A system error code of ENOTSUP
will be set if attempting to change the association of
a pool created by pset_create(2) or psrset(8).
The pool_info() function will fail if:
POE_BADPARAM The supplied configuration's status is not
POF_VALID or the flags parameter is neither 0 or 1.
POE_INVALID_CONF The configuration is invalid.
POE_SYSTEM A system error has occurred. Check the system error
code for more details.
The pool_query_pool_resources() function will fail if:
POE_BADPARAM The supplied configuration's status is not
POF_VALID.
POE_INVALID_CONF The configuration is invalid.
POE_SYSTEM A system error has occurred. Check the system error
code for more details.
USAGE
Pool names are unique across pools in a given configuration file. It is
an error to attempt to create a pool with a name that is currently used
by another pool within the same configuration.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ CSIEnabled _ Interface StabilityUncommitted _ MT-Level‐
Safe
SEE ALSO
pset_create(2), libpool(3LIB), pool_error(3POOL), attributes(7)
Oracle Solaris 11.4 2 Feb 2015 pool_associate(3POOL)