RTEMS Logo

RTEMS 4.6.4 On-Line Library


Configuration Space Manager cfg_readdir - Reads a directory

PREV UP NEXT Bookshelf New Chapters

3.4.13: cfg_readdir - Reads a directory

CALLING SEQUENCE:

#include <sys/types.h>
#include <dirent.h>

struct dirent *cfg_readdir(
  DIR   *dirp
);

STATUS CODES:

EBADF
Invalid file descriptor

DESCRIPTION:

The cfg_readdir() function returns a pointer to a structure dirent representing the next directory entry from the directory stream pointed to by dirp. On end-of-file, NULL is returned.

The cfg_readdir() function may (or may not) return entries for . or .. Your program should tolerate reading dot and dot-dot but not require them.

The data pointed to be cfg_readdir() may be overwritten by another call to readdir() for the same directory stream. It will not be overwritten by a call for another directory.

NOTES:

If ptr is not a pointer returned by malloc(), calloc(), or realloc() or has been deallocated with free() or realloc(), the results are not portable and are probably disastrous.

This function is not defined in the POSIX specification. It is an extension provided by this implementation.


PREV UP NEXT Bookshelf New Chapters

Copyright © 1988-2004 OAR Corporation