RTEMS Logo

RTEMS 4.6.0 On-Line Library


Configuration Space Manager cfg_children - Get Node Entries

PREV UP NEXT Bookshelf New Chapters

3.4.10: cfg_children - Get Node Entries

CALLING SEQUENCE:

#include <cfg.h>

int cfg_children(
  CFG           *cfgp,
  int            options,
  CFGENT       **children
);

STATUS CODES:

A successful call to cfg_children() returns a value of zero and an unsuccessful call returns the errno.

EACCES
Search permission is denied for any component of a pathname
EBADF
The cfgp argument does not refer to an open configuration space.
ELOOP
A loop exists in symbolic links encountered during resolution of a pathname.
ENAMETOOLONG
The length of a pathname exceeds PATH_MAX, or a pathname component is longer than NAME_MAX while _POSIX_NO_TRUNC is in effect.
EINVAL
The specified value of the options argument is invalid.
ENOENT
The named node does not exist.
ENOMEM
Not enough memory is available to create the necessary structures.

DESCRIPTION:

The first cfg_children() call after a cfg_read() returns information about the first node without children under the node returned by cfg_read(). Subsequent calls to cfg_children() without the intervening cfg_read() shall return information about the remaining nodes without children under that same node.

If cfg_read() has not yet been called for the configuration traversal stream represented by cfgp, cfg_children() returns a pointer to the first entry in a list of the nodes represented by the pathnames argument to cfg_open().

In either case, the list is NULL-terminated, ordered by the user-specified comparison function, if any, and linked through the cfg_link field.

NOTES:

The _POSIX_CFG feature flag is defined to indicate this service is available.


PREV UP NEXT Bookshelf New Chapters

Copyright © 1988-2004 OAR Corporation