sys_stat64 [fs/stat.c]
Obtains information about a file. This is a LFS version of sys_stat. Arguments
eax | 195
ebx | Pointer to a null-terminated string specifying the filename.
ecx | Pointer to a stat64 structure which will be filled with return information:
`struc stat64 { .st_dev rq 1 .__pad0 rb 4 .__st_ino rd 1 .st_mode rd 1 .st_nlink rd 1 .st_uid rd 1 .st_gid rd 1 .st_rdev rq 1 .__pad3 rb 4 .st_size rq 1 .st_blksize rd 1 .st_blocks rq 1 .st_atime rd 1 .st_atime_nsec rd 1 .st_mtime rd 1 .st_mtime_nsec rd 1 .st_ctime rd 1 .st_ctime_nsec rd 1 .st_ino rq 1 }`
`stat members: st_dev` `Device on which this file resides.` `__pad0` `Padding.` `__st_ino` `*to be documented*` `st_mode` `File permissions mask which may consist of the following values: S_ISUID - set user ID on execution S_ISGID - set group ID on execution S_ISVTX - on directories, restricted deletion flag S_IRWXU - owner has read, write and execute permission S_IRUSR - owner has read permission S_IWUSR - owner has write permission S_IXUSR - owner has execute permission S_IRWXG - group has read, write and execute permission S_IRGRP - group has read permission S_IWGRP - group has write permission S_IXGRP - group has execute permission S_IRWXO - others have read, write and execute permission S_IROTH - others have read permission S_IWOTH - others have write permission S_IXOTH - others have execute permission The set-group-ID bit (S_ISGID) has several special uses. For a directory it indicates that BSD semantics is to be used for that directory: files created there inherit their group ID from the directory, not from the effective group ID of the creating process, and directories created there will also get the S_ISGID bit set. For a file that does not have the group execution bit (S_IXGRP) set, the set-group-ID bit indicates mandatory file/record locking. The `sticky' bit (S_ISVTX) on a directory means that a file in that directory can be renamed or deleted only by the owner of the file, by the owner of the directory, and by a privileged process.` `st_nlink` `Number of links to the file.` `st_uid` `User ID of file owner.` `st_gid` `Group ID of group owner.` `st_rdev` `Device that this file (inode) represents.` `__pad3` `Padding.` `st_size` `Size of the file (if it is a regular file or a symbolic link) in bytes. The size of a symlink is the length of the pathname it contains, without a trailing null byte.` `st_blksize` `"Preferred" blocksize for efficient file system I/O. (Writing to a file in smaller chunks may cause an inefficient read-modify-rewrite.)` `st_blocks` `Number of blocks allocated to the file, 512-byte units.` `st_atime` `Last access time. Changed by file accesses. (depends on the file system)` `st_atime_nsec` `Last access time in nanoseconds.` `st_mtime` `Changed by file modifications. (depends on the file system)` `st_mtime_nsec` `Last modification time in nanoseconds.` `st_ctime` `Changed by writing or by setting inode information.` `st_ctime_nsec` `Creation time in nanoseconds.` `st_ino` `Inode number.`
Return values If the system call succeeds the return value is 0. If the system call fails the return value is one of the following errno values:
`-ENOENT` | `A component of the pathname does not exist, or the path is an empty string.`
`-ENOMEM` | `Out of memory (i.e. kernel memory).`
`-ENOTDIR` | `A component of the path is not a directory.`
`-ELOOP` | `Too many symbolic links encountered while traversing the path.`
`-EFAULT` | `Bad address.`
`-EACCES` | `Permission denied.`
`-ENAMETOOLONG` | `File name too long.`
Remarks n/a Compatibility n/a