Home | History | Annotate | Download | only in pending

Lines Matching refs:st

60       struct stat st;
64 if (lstat(toys.optargs[1], &st) == -1) return;
65 nolink = !S_ISLNK(st.st_mode);
66 if (!nolink && (stat(toys.optargs[1], &st) == -1)) return;
68 if (id == 0) toys.exitval = !S_ISBLK(st.st_mode); // b
69 else if (id == 1) toys.exitval = !S_ISCHR(st.st_mode); // c
70 else if (id == 2) toys.exitval = !S_ISDIR(st.st_mode); // d
72 else if (id == 4) toys.exitval = !S_ISREG(st.st_mode); // f
73 else if (id == 5) toys.exitval = !(st.st_mode & S_ISGID); // g
75 else if (id == 8) toys.exitval = !S_ISFIFO(st.st_mode); // p
76 else if (id == 9) toys.exitval = !S_ISSOCK(st.st_mode); // S
77 else if (id == 10) toys.exitval = st.st_size == 0; // s
78 else toys.exitval = !(st.st_mode & S_ISUID); // u