Debugging with GDB: stat/fstat |
---|
Next: gettimeofday, Previous: unlink, Up: List of Supported Calls [Contents][Index]
int stat(const char *pathname, struct stat *buf); int fstat(int fd, struct stat *buf);
‘Fstat,pathnameptr/len,bufptr
’
‘Ffstat,fd,bufptr
’
On success, zero is returned. On error, -1 is returned.
EBADF
fd is not a valid open file.
ENOENT
A directory component in pathname does not exist or the path is an empty string.
ENOTDIR
A component of the path is not a directory.
EFAULT
pathnameptr is an invalid pointer value.
EACCES
No access to the file or the path of the file.
ENAMETOOLONG
pathname was too long.
EINTR
The call was interrupted by the user.