Lines Matching refs:buf

45   struct semid_ds *buf;  member
52 struct msqid_ds buf; in show_msg_id() local
55 if ((ret = msgctl(TT.id, IPC_STAT, &buf)) < 0) { in show_msg_id()
60 #define ipcperm buf.msg_perm in show_msg_id()
66 (long) buf.msg_cbytes, (long) buf.msg_qbytes, in show_msg_id()
67 (long) buf.msg_qnum, buf.msg_lspid, buf.msg_lrpid); in show_msg_id()
70 buf.msg_stime ? ctime(&buf.msg_stime) : "Not set", in show_msg_id()
71 buf.msg_rtime ? ctime(&buf.msg_rtime) : "Not set", in show_msg_id()
72 buf.msg_ctime ? ctime(&buf.msg_ctime) : "Not set"); in show_msg_id()
78 struct semid_ds buf; in show_sem_id() local
82 n.buf = &buf; in show_sem_id()
88 #define ipcperm buf.sem_perm in show_sem_id()
97 (long) buf.sem_nsems, in show_sem_id()
98 buf.sem_otime ? ctime(&buf.sem_otime) : "Not set"); in show_sem_id()
101 ctime(&buf.sem_ctime), in show_sem_id()
105 for (i = 0; i < buf.sem_nsems; i++) { in show_sem_id()
120 struct shmid_ds buf; in show_shm_id() local
123 if ((ret = shmctl(TT.id, IPC_STAT, &buf)) < 0) { in show_shm_id()
128 #define ipcperm buf.shm_perm in show_shm_id()
137 (long) buf.shm_segsz, buf.shm_lpid, buf.shm_cpid, in show_shm_id()
138 (long) buf.shm_nattch); in show_shm_id()
140 buf.shm_atime ? ctime(&buf.shm_atime) : "Not set"); in show_shm_id()
142 buf.shm_dtime ? ctime(&buf.shm_dtime) : "Not set"); in show_shm_id()
143 printf("change_time=%-26.24s\n\n", ctime(&buf.shm_ctime)); in show_shm_id()
151 struct shmid_ds buf; in shm_array() local
209 if ((shmid = shmctl(i, SHM_STAT, &buf)) < 0 ) continue; in shm_array()
211 if ((pw = getpwuid(buf.shm_perm.uid))) in shm_array()
213 else printf("%-10d %-10.10d", shmid, buf.shm_perm.uid); in shm_array()
214 printf(" %-20.16s", buf.shm_atime in shm_array()
215 ? ctime(&buf.shm_atime) + 4 : "Not set"); in shm_array()
216 printf(" %-20.16s", buf.shm_dtime in shm_array()
217 ? ctime(&buf.shm_dtime) + 4 : "Not set"); in shm_array()
218 printf(" %-20.16s\n", buf.shm_ctime in shm_array()
219 ? ctime(&buf.shm_ctime) + 4 : "Not set"); in shm_array()
221 if ((pw = getpwuid(buf.shm_perm.uid))) in shm_array()
223 else printf("%-10d %-10.10d", shmid, buf.shm_perm.uid); in shm_array()
224 printf(" %-10d %-10d\n", buf.shm_cpid, buf.shm_lpid); in shm_array()
226 printf("%-10d %-10o", shmid, buf.shm_perm.mode & 0777); in shm_array()
227 if ((pw = getpwuid(buf.shm_perm.cuid))) printf(" %-10s", pw->pw_name); in shm_array()
228 else printf(" %-10d", buf.shm_perm.cuid); in shm_array()
229 if ((gr = getgrgid(buf.shm_perm.cgid))) printf(" %-10s", gr->gr_name); in shm_array()
230 else printf(" %-10d", buf.shm_perm.cgid); in shm_array()
231 if ((pw = getpwuid(buf.shm_perm.uid))) printf(" %-10s", pw->pw_name); in shm_array()
232 else printf(" %-10d", buf.shm_perm.uid); in shm_array()
233 if ((gr = getgrgid(buf.shm_perm.gid))) printf(" %-10s\n", gr->gr_name); in shm_array()
234 else printf(" %-10d\n", buf.shm_perm.gid); in shm_array()
236 printf("0x%08x ", buf.shm_perm.__key); in shm_array()
237 if ((pw = getpwuid(buf.shm_perm.uid))) in shm_array()
239 else printf("%-10d %-10.10d", shmid, buf.shm_perm.uid); in shm_array()
240 printf(" %-10o %-10lu %-10ld %-6s %-6s\n", buf.shm_perm.mode & 0777, in shm_array()
241 (unsigned long) buf.shm_segsz, in shm_array()
242 (long) buf.shm_nattch, in shm_array()
243 buf.shm_perm.mode & SHM_DEST ? "dest" : " ", in shm_array()
244 buf.shm_perm.mode & SHM_LOCKED ? "locked" : " "); in shm_array()
252 struct semid_ds buf; in sem_array() local
306 u.buf = &buf; in sem_array()
308 pw = getpwuid(buf.sem_perm.uid); in sem_array()
311 else printf("%-8d %-10d", semid, buf.sem_perm.uid); in sem_array()
313 printf(" %-26.24s", buf.sem_otime in sem_array()
314 ? ctime(&buf.sem_otime) : "Not set"); in sem_array()
315 printf(" %-26.24s\n", buf.sem_ctime in sem_array()
316 ? ctime(&buf.sem_ctime) : "Not set"); in sem_array()
318 printf("%-10d %-10o", semid, buf.sem_perm.mode & 0777); in sem_array()
319 if ((pw = getpwuid(buf.sem_perm.cuid))) printf(" %-10s", pw->pw_name); in sem_array()
320 else printf(" %-10d", buf.sem_perm.cuid); in sem_array()
321 if ((gr = getgrgid(buf.sem_perm.cgid))) printf(" %-10s", gr->gr_name); in sem_array()
322 else printf(" %-10d", buf.sem_perm.cgid); in sem_array()
323 if ((pw = getpwuid(buf.sem_perm.uid))) printf(" %-10s", pw->pw_name); in sem_array()
324 else printf(" %-10d", buf.sem_perm.uid); in sem_array()
325 if ((gr = getgrgid(buf.sem_perm.gid))) printf(" %-10s\n", gr->gr_name); in sem_array()
326 else printf(" %-10d\n", buf.sem_perm.gid); in sem_array()
328 printf("0x%08x ", buf.sem_perm.__key); in sem_array()
330 else printf("%-10d %-9d", semid, buf.sem_perm.uid); in sem_array()
331 printf(" %-10o %-10ld\n", buf.sem_perm.mode & 0777, in sem_array()
332 (long) buf.sem_nsems); in sem_array()
340 struct msqid_ds buf; in msg_array() local
387 if ((msqid = msgctl(i, MSG_STAT, &buf)) < 0 ) continue; in msg_array()
388 pw = getpwuid(buf.msg_perm.uid); in msg_array()
391 else printf("%-8d %-10d", msqid, buf.msg_perm.uid); in msg_array()
392 printf(" %-20.16s", buf.msg_stime in msg_array()
393 ? ctime(&buf.msg_stime) + 4 : "Not set"); in msg_array()
394 printf(" %-20.16s", buf.msg_rtime in msg_array()
395 ? ctime(&buf.msg_rtime) + 4 : "Not set"); in msg_array()
396 printf(" %-20.16s\n", buf.msg_ctime in msg_array()
397 ? ctime(&buf.msg_ctime) + 4 : "Not set"); in msg_array()
400 else printf("%-8d %-10d", msqid, buf.msg_perm.uid); in msg_array()
401 printf(" %5d %5d\n", buf.msg_lspid, buf.msg_lrpid); in msg_array()
403 printf("%-10d %-10o", msqid, buf.msg_perm.mode & 0777); in msg_array()
404 if ((pw = getpwuid(buf.msg_perm.cuid))) printf(" %-10s", pw->pw_name); in msg_array()
405 else printf(" %-10d", buf.msg_perm.cuid); in msg_array()
406 if ((gr = getgrgid(buf.msg_perm.cgid))) printf(" %-10s", gr->gr_name); in msg_array()
407 else printf(" %-10d", buf.msg_perm.cgid); in msg_array()
408 if ((pw = getpwuid(buf.msg_perm.uid))) printf(" %-10s", pw->pw_name); in msg_array()
409 else printf(" %-10d", buf.msg_perm.uid); in msg_array()
410 if ((gr = getgrgid(buf.msg_perm.gid))) printf(" %-10s\n", gr->gr_name); in msg_array()
411 else printf(" %-10d\n", buf.msg_perm.gid); in msg_array()
413 printf("0x%08x ", buf.msg_perm.__key); in msg_array()
415 else printf("%-10d %-10d", msqid, buf.msg_perm.uid); in msg_array()
416 printf(" %-10o %-12ld %-12ld\n", buf.msg_perm.mode & 0777, in msg_array()
417 (long) buf.msg_cbytes, (long) buf.msg_qnum); in msg_array()