Closes a file currently open in direct file mode.
#include <dfs.h> int dfs_close ( int fildes );
(IN) Specifies the file handle returned from a prior successful call to dfs_sopen or dfs_creat. After a file is closed, the file handle is no longer valid and should not be reused.
If successful, returns 0. Otherwise, returns a nonzero error code:
Calling dfs_close causes the file to be closed (the handle becomes invalid). If dfs_close determines that this was the last valid handle (no other opens outstanding for the file), the Direct File Mode flag is reset, allowing a subsequent open file call to be either open (normal mode), or dfs_sopen (direct mode). Remember, if a file is in direct mode, any programs with normal mode opens into the file are able to read the file but not write to it (see Input and Output).