MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Device Information Library Functions
                              dipromproplookupbytes(3DEVINFO)



NAME
     dipromproplookupbytes,         dipromproplookupints,
     dipromproplookupstrings - search for a PROM property

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

     int dipromproplookupbytes(dipromhandlet ph, dinodet node,
          const char *propname, uchart **propdata);


     int dipromproplookupints(dipromhandlet ph, dinodet node,
          const char *propname, int **propdata);


     int dipromproplookupstrings(dipromhandlet ph, dinodet node,
          const char *propname, char **propdata);


PARAMETERS
     node         Handle to device node in  snapshot  created  by
                  diinit(3DEVINFO).


     ph           Handle returned by diprominit(3DEVINFO).


     propdata    For dipromproplookupbytes(), the address of
                  a pointer to an array of unsigned characters.

                  For dipromproplookupints(), the address  of
                  a pointer to an integer.

                  For dipromproplookupstrings(), the  address
                  of pointer to a buffer.


     propname    The name of the property being searched.


DESCRIPTION
     These functions return the value of a  known  PROM  property
     name  and  value  type  and  update the propdata pointer to
     reference memory  that  contains  the  property  value.  All
     memory  allocated  by  these  functions  is  managed  by the
     library and must not be freed by the caller.

RETURN VALUES
     If the property is found, the number of entries in propdata
     is  returned.  If  the  property  is  a  boolean  type, 0 is



SunOS 5.11           Last change: 1 Dec 1998                    1






Device Information Library Functions
                              dipromproplookupbytes(3DEVINFO)



     returned and the existence of this  property  indicates  the
     value is true. Otherwise, -1 is returned and errno is set to
     indicate the error.


     For dipromproplookupbytes(), the number  of  entries  is
     the  number  of  unsigned characters contained in the buffer
     pointed to by propdata.


     For dipromproplookupints(), the number of entries is the
     number  of  integers  contained  in the buffer pointed to by
     propdata.


     For dipromproplookupstrings(), the number of entries  is
     the  number  of  null-terminated  strings  contained  in the
     buffer. The strings are stored in a concatenated  format  in
     the buffer.

ERORS
     These functions will fail if::

     EINVAL    Invalid argument.


     ENXIO     The property does not exist.


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



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Evolving                    
    
     MT-Level                     Safe                        
    


SEE ALSO
     diinit(3DEVINFO),              diprompropnext(3DEVINFO),
     libdevinfo(3LIB), attributes(5), openprom(7D)


     Writing Device Drivers




SunOS 5.11           Last change: 1 Dec 1998                    2






Device Information Library Functions
                              dipromproplookupbytes(3DEVINFO)






















































SunOS 5.11           Last change: 1 Dec 1998                    3






OpenSolaris man pages main menu

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