1GENDERS_GETATTR(3)                LIBGENDERS                GENDERS_GETATTR(3)
2
3
4

NAME

6       genders_getattr - get attributes from a genders file
7

SYNOPSIS

9       #include <genders.h>
10
11       int  genders_getattr(genders_t handle, char *attrs[], char *vals[], int
12       len, const char *node);
13

DESCRIPTION

15       genders_getattr() gets the attributes and values for the  node  pointed
16       to  by  node.  If node is NULL, attributes and values are retrieved for
17       the current node.  The attributes are  stored  in  the  attribute  list
18       pointed  to  by  attrs and the attribute values are stored in vals.  If
19       attribute values are not desired, vals can be set to NULL.  len  should
20       indicate  the  number  of  elements  that  can  be  stored  in both the
21       attribute list and attribute values list.
22
23       To avoid passing in a list that is not large enough to  store  all  the
24       attributes  and attribute values, genders_getmaxattrs(3) should be used
25       to determine the minimum number of elements attrs and  vals  should  be
26       able  to  store.   genders_attrlist_create(3)  and genders_vallist_cre‐
27       ate(3) could be used to create lists that are guaranteed  to  be  large
28       enough to store all attributes and attribute values.
29

RETURN VALUES

31       On  success,  the number of attributes stored in attrs is returned.  On
32       error, -1 is returned, and an error code is returned  in  handle.   The
33       error  code  can be retrieved via genders_errnum(3) , and a description
34       of the error code can  be  retrieved  via  genders_strerror(3).   Error
35       codes are defined in genders.h.
36

ERRORS

38       GENDERS_ERR_NULLHANDLE
39              The  handle  parameter is NULL.  The genders handle must be cre‐
40              ated with genders_handle_create(3).
41
42       GENDERS_ERR_NOTLOADED
43              genders_load_data(3) has not been called to load genders data.
44
45       GENDERS_ERR_OVERFLOW
46              The list pointed to by attrs or vals  is  not  large  enough  to
47              store all the attributes or attribute values.
48
49       GENDERS_ERR_PARAMETERS
50              An incorrect parameter has been passed in.
51
52       GENDERS_ERR_NULLPTR
53              A null pointer has been found in the list passed in.
54
55       GENDERS_ERR_NOTFOUND
56              The  node pointed to by node cannot be found in the genders file
57              or if node=NULL, the machine genders is running on is not listed
58              in the genders database.
59
60       GENDERS_ERR_MAGIC
61              handle  has an incorrect magic number.  handle does not point to
62              a genders handle or handle has been  destroyed  by  genders_han‐
63              dle_destroy(3).
64

FILES

66       /usr/include/genders.h
67

SEE ALSO

69       libgenders(3),   genders_handle_create(3),  genders_load_data(3),  gen‐
70       ders_getmaxattrs(3),  genders_attrlist_create(3),  genders_vallist_cre‐
71       ate(3), genders_errnum(3), genders_strerror(3)
72
73
74
75LLNL                              August 2003               GENDERS_GETATTR(3)
Impressum