MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Pool Configuration Manipulation Library Functions
                                         poolgetproperty(3POL)



NAME
     poolgetproperty,   poolputproperty,    poolrmproperty,
     poolwalkproperties  - resource pool element property mani-
     pulation

SYNOPSIS
     cc [ flag... ] file... -lpool [ library... ]
     #include 

     poolvalueclasst poolgetproperty(poolconft *conf,
          const poolelemt *elem, const char *name,
          poolvaluet *property);


     int poolputproperty(poolconft *conf, poolelemt *elem,
          const char *name, const poolvaluet *value);


     int poolrmproperty(poolconft *conf, poolelemt *elem,
          const char *name);


     int poolwalkproperties(poolconft *conf, poolelemt *elem,
          void *arg, int (*callback)(poolconft *, poolelemt *,
          const char *, poolvaluet *, void *));


DESCRIPTION
     The various pool types are converted to the common pool ele-
     ment  type  (poolelemt)  before  property  manipulation. A
     poolvaluet is an opaque  type  that  contains  a  property
     value of one of the following types:

     POCUINT      unsigned 64-bit integer


     POCINT       signed 64-bit integer


     POCDOUBLE    signed double-precision floating point value


     POCBOL      boolean value: 0 is false, non-zero is true


     POCSTRING    null-terminated string of characters



     The conf argument for each function  refers  to  the  target
     configuration to which the operation applies.



SunOS 5.11          Last change: 23 Sep 2003                    1






Pool Configuration Manipulation Library Functions
                                         poolgetproperty(3POL)



     The poolgetproperty() function attempts  to  retrieve  the
     value  of  the  named property from the element. If the pro-
     perty is not found or an error occurs, the  value  POCINVAL
     is  returned  to  indicate  error. Otherwise the type of the
     value retrieved is returned.


     The poolputproperty() function attempts to set  the  named
     property  on the element to the specified value.  Attempting
     to set a property that does not currently exist on the  ele-
     ment  will  cause the property with the given name and value
     to be created on the element and will not cause an error. An
     attempt  to  overwrite  an existing property with a new pro-
     perty of a different type is an error.


     The poolrmproperty() function attempts to remove the named
     property  from  the element.  If the property does not exist
     or is not removable, -1 is  returned  and  poolerror(3POL)
     reporst an error of POEPUTPROP.


     The poolwalkproperties() function invokes callback on  all
     properties  defined  for  the given element. The callback is
     called with the element itself, the name  of  the  property,
     the  value  of  the property, and the caller-provided opaque
     argument.


     A number of special properties are reserved for internal use
     and cannot be set or removed. Attempting to do so will fail.
     These properties are documented on the libpool(3LIB)  manual
     page.

RETURN VALUES
     Upon successful completion, poolgetproperty() returns  the
     type  of  the  property.  Otherwise it returns POCINVAL and
     poolerror() returns the pool-specific error value.


     Upon     successful     completion,     poolputproperty(),
     poolrmproperty(),  and  poolwalkproperties()  return  0.
     Otherwise they return -1 and poolerror() returns the  pool-
     specific error value.

ERORS
     The poolgetproperty() function will fail if:

     POEBADPARAM    The supplied configuration's status  is  not
                     POFVALID,  the  supplied conf does not con-
                     tain the supplied elem, or the  property  is



SunOS 5.11          Last change: 23 Sep 2003                    2






Pool Configuration Manipulation Library Functions
                                         poolgetproperty(3POL)



                     restricted  and  cannot  be  accessed by the
                     library.


     POESYSTEM      A system error has occurred. Check the  sys-
                     tem error code for more details.



     The poolputproperty() function will fail if:

     POEBADPARAM        The supplied configuration's  status  is
                         not  POFVALID,  the  supplied conf does
                         not contain the supplied elem, the  pro-
                         perty name is not in the correct format,
                         or the property already exists  and  the
                         supplied  type does not match the exist-
                         ing type.


     POESYSTEM          A system error has occurred.  Check  the
                         system error code for more details.


     POEPUTPROP         The property name is reserved by libpool
                         and not available for use.


     POEINVALIDCONF    The configuration is invalid.



     The poolrmproperty() function will fail if:

     POEBADPARAM    The supplied configuration's status  is  not
                     POFVALID,  the  supplied conf does not con-
                     tain the supplied elem, or the  property  is
                     reserved by libpool and cannot be removed.


     POESYSTEM      A system error has occurred. Check the  sys-
                     tem error code for more details.


     POEPUTPROP     The property name is reserved by libpool and
                     not available for use.



     The poolwalkproperties() function will fail if:




SunOS 5.11          Last change: 23 Sep 2003                    3






Pool Configuration Manipulation Library Functions
                                         poolgetproperty(3POL)



     POEBADPARAM    The supplied configuration's status  is  not
                     POFVALID.


     POESYSTEM      A system error has occurred. Check the  sys-
                     tem error code for more details.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     CSI                          Enabled                     
    
     Interface Stability          Unstable                    
    
     MT-Level                     Safe                        
    


SEE ALSO
     libpool(3LIB), poolerror(3POL), attributes(5)



























SunOS 5.11          Last change: 23 Sep 2003                    4






Pool Configuration Manipulation Library Functions
                                         poolgetproperty(3POL)






















































SunOS 5.11          Last change: 23 Sep 2003                    5






OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™