Lines Matching refs:mode
26 /* Produce a string representation of Unix mode bits like that used by ls(1).
28 void permstring(char *perms, mode_t mode)
36 if (mode & (1 << i))
43 if (mode & S_ISUID)
44 perms[3] = (mode & S_IXUSR) ? 's' : 'S';
46 if (mode & S_ISGID)
47 perms[6] = (mode & S_IXGRP) ? 's' : 'S';
50 if (mode & S_ISVTX)
51 perms[9] = (mode & S_IXOTH) ? 't' : 'T';
54 if (S_ISDIR(mode))
56 else if (S_ISLNK(mode))
58 else if (S_ISBLK(mode))
60 else if (S_ISCHR(mode))
62 else if (S_ISSOCK(mode))
64 else if (S_ISFIFO(mode))