06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Return Value<br />

The following differences exist for local file systems (pHILE+, MS-DOS,<br />

and CD-ROM):<br />

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

= mtime<br />

The status information word st_mode consists of 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 />

2-36 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

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

Saved successfully!

Ooh no, something went wrong!