06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pHILE+ <strong>System</strong> <strong>Calls</strong> stat_f<br />

Return Value<br />

This structure cannot be packed. mode_t, ino_t, dev_t, nlink_t,<br />

uid_t, gid_t, off_t, and time_t are defined as unsigned long in<br />

. The following differences exist for local file systems<br />

(pHILE+, MS-DOS, and CD-ROM):<br />

rdev = dev, nlink = 1, uid = 0, gid = 0, atime = ctime<br />

= mtime<br />

The status information word st_mode contains the following bits:<br />

_IFMT 0170000 /* type of file */<br />

_IFIFO 0010000 /* fifo special */<br />

_IFCHR 0020000 /* character special */<br />

_IFDIR 0040000 /* directory */<br />

_IFBLK 0060000 /* block special */<br />

_IFREG 0100000 /* regular file */<br />

_IFLNK 0120000 /* symbolic link */<br />

_IFSOCK 0140000 /* socket */<br />

S_ISUID 0004000 /* set user ID on execution */<br />

S_ISGID 0002000 /* set group ID on execution */<br />

S_ISVTX 0001000 /* save swapped text even after use */<br />

S_IRUSR 0000400 /* read permission, owner */<br />

S_IWUSR 0000200 /* write permission, owner */<br />

S_IXUSR 0000100 /* execute/search permission, owner */<br />

S_IRGRP 0000040 /* read permission, group */<br />

S_IWGRP 0000020 /* write permission, group */<br />

S_IXGRP 0000010 /* execute/search permission, group */<br />

S_IROTH 0000004 /* read permission, other */<br />

S_IWOTH 0000002 /* write permission, other */<br />

S_IXOTH 0000001 /* execute/search permission, other */<br />

This system call returns 0 on success or an error code on failure.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 2-105<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!