fstat.c
This routine will return information concerning a file or network
connection. If the file descriptor is associated with a network
connection, the current implementation of fstat()
will return a
mode set to S_IFSOCK
. In a later version, this routine will map the
status of a network connection to an external handler routine.
If the file descriptor is associated with a node under a filesystem, the fstat() routine will map to the fstat() function taken from the node handler table.
This routine validates that the struct stat pointer is not NULL so that the return location is valid.
The struct stat is then initialized to all zeros.
rtems_file_descriptor_type() is then used to determine if the file descriptor is associated with a network connection. If it is, network status processing is performed. In the current implementation, the file descriptor type processing needs to be improved. It currently just drops into the normal processing for file system nodes.
If the file descriptor is associated with a node under a filesystem, the following steps are performed:
Copyright © 1988-2003 OAR Corporation