gtpc2mjd | C/C++ Language Support User's Guide |
This type of function is specified as part of the file system device driver interface and is called by the close, fclose, and freopen functions to close a special file. Open files are also closed when a process ends.
Format
typedef int TPF_FSDD_CLOSE(const TPF_FSDD_FILEDATA *filedata);
Normal Return
Error Return
Programming Considerations
Examples
The following example is the close device driver interface function for the null file (/dev/null).
#include <c$spif.h> /* Device driver interface */ /**********************************************************************/ /* The null_close() function is a NOP. */ /**********************************************************************/ void null_close(const TPF_FSDD_FILEDATA *filedata) {}
Related Information