tools/llvm: Do not build with symbols
[minix3.git] / minix / commands / ipcs / ipcs.c
blob126a18cc8712166037383d9f6353cd0b090c56b4
1 /* Original author unknown, may be "krishna balasub@cis.ohio-state.edu" */
2 /*
4 Modified Sat Oct 9 10:55:28 1993 for 0.99.13
6 Patches from Mike Jagdis (jaggy@purplet.demon.co.uk) applied Wed Feb
7 8 12:12:21 1995 by faith@cs.unc.edu to print numeric uids if no
8 passwd file entry.
10 Patch from arnolds@ifns.de (Heinz-Ado Arnolds) applied Mon Jul 1
11 19:30:41 1996 by janl@math.uio.no to add code missing in case PID:
12 clauses.
14 Patched to display the key field -- hy@picksys.com 12/18/96
16 1999-02-22 Arkadiusz Mi秌iewicz <misiek@pld.ORG.PL>
17 - added Native Language Support
21 #define __USE_MISC
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <errno.h>
26 #include <time.h>
27 #include <pwd.h>
28 #include <grp.h>
29 #include <unistd.h>
30 #include <stdarg.h>
31 #include <sys/types.h>
32 #include <sys/ipc.h>
33 #include <sys/shm.h>
34 #include <sys/sem.h>
36 /* remove _() stuff */
37 #define _(a) a
39 /*-------------------------------------------------------------------*/
40 /* SHM_DEST and SHM_LOCKED are defined in kernel headers,
41 but inside #ifdef __KERNEL__ ... #endif */
42 #ifndef SHM_DEST
43 /* shm_mode upper byte flags */
44 #define SHM_DEST 01000 /* segment will be destroyed on last detach */
45 #define SHM_LOCKED 02000 /* segment will not be swapped */
46 #endif
48 /* For older kernels the same holds for the defines below */
49 #ifndef MSG_STAT
50 #define MSG_STAT 11
51 #define MSG_INFO 12
52 #endif
54 #ifndef SHM_STAT
55 #define SHM_STAT 13
56 #define SHM_INFO 14
57 struct shm_info {
58 int used_ids;
59 ulong shm_tot; /* total allocated shm */
60 ulong shm_rss; /* total resident shm */
61 ulong shm_swp; /* total swapped shm */
62 ulong swap_attempts;
63 ulong swap_successes;
65 #endif
67 #ifndef SEM_STAT
68 #define SEM_STAT 18
69 #define SEM_INFO 19
70 #endif
72 /* Some versions of libc only define IPC_INFO when __USE_GNU is defined. */
73 #ifndef IPC_INFO
74 #define IPC_INFO 3
75 #endif
76 /*-------------------------------------------------------------------*/
78 /* The last arg of semctl is a union semun, but where is it defined?
79 X/OPEN tells us to define it ourselves, but until recently
80 Linux include files would also define it. */
81 #if defined (__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
82 /* union semun is defined by including <sys/sem.h> */
83 #else
84 /* according to X/OPEN we have to define it ourselves */
85 union semun {
86 int val;
87 struct semid_ds *buf;
88 unsigned short int *array;
89 struct seminfo *__buf;
91 #endif
93 /* X/OPEN (Jan 1987) does not define fields key, seq in struct ipc_perm;
94 libc 4/5 does not mention struct ipc_term at all, but includes
95 <linux/ipc.h>, which defines a struct ipc_perm with such fields.
96 glibc-1.09 has no support for sysv ipc.
97 glibc 2 uses __key, __seq */
98 #if defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
99 #define KEY __key
100 #else
101 #define KEY _key
102 #endif
104 #define LIMITS 1
105 #define STATUS 2
106 #define CREATOR 3
107 #define TIME 4
108 #define PID 5
110 void do_shm (char format);
111 void do_sem (char format);
112 void do_msg (char format);
113 void print_shm (int id);
114 void print_msg (int id);
115 void print_sem (int id);
117 static char *progname;
119 static void
120 usage(int rc) {
121 printf (_("usage : %s -asmq -tclup \n"), progname);
122 printf (_("\t%s [-s -m -q] -i id\n"), progname);
123 printf (_("\t%s -h for help.\n"), progname);
124 exit(rc);
127 static void
128 help (int rc) {
129 printf (_("%s provides information on ipc facilities for"
130 " which you have read access.\n"), progname);
131 printf (_("Resource Specification:\n\t-m : shared_mem\n\t-q : messages\n"));
132 printf (_("\t-s : semaphores\n\t-a : all (default)\n"));
133 printf (_("Output Format:\n\t-t : time\n\t-p : pid\n\t-c : creator\n"));
134 printf (_("\t-l : limits\n\t-u : summary\n"));
135 printf (_("-i id [-s -q -m] : details on resource identified by id\n"));
136 usage(rc);
140 main (int argc, char **argv) {
141 int opt, msg = 0, sem = 0, shm = 0, id=0, print=0;
142 char format = 0;
143 char options[] = "atcluphsmqi:";
145 progname = argv[0];
146 while ((opt = getopt (argc, argv, options)) != -1) {
147 switch (opt) {
148 case 'i':
149 id = atoi (optarg);
150 print = 1;
151 break;
152 case 'a':
153 msg = shm = sem = 1;
154 break;
155 case 'q':
156 msg = 1;
157 break;
158 case 's':
159 sem = 1;
160 break;
161 case 'm':
162 shm = 1;
163 break;
164 case 't':
165 format = TIME;
166 break;
167 case 'c':
168 format = CREATOR;
169 break;
170 case 'p':
171 format = PID;
172 break;
173 case 'l':
174 format = LIMITS;
175 break;
176 case 'u':
177 format = STATUS;
178 break;
179 case 'h':
180 help(EXIT_SUCCESS);
181 case '?':
182 usage(EXIT_SUCCESS);
186 if (print) {
187 if (shm)
188 print_shm (id);
189 else if (sem)
190 print_sem (id);
191 else if (msg)
192 print_msg (id);
193 else
194 usage (EXIT_FAILURE);
195 } else {
196 if ( !shm && !msg && !sem)
197 msg = sem = shm = 1;
198 printf ("\n");
200 if (shm) {
201 do_shm (format);
202 printf ("\n");
204 if (sem) {
205 do_sem (format);
206 printf ("\n");
208 if (msg) {
209 do_msg (format);
210 printf ("\n");
213 return EXIT_SUCCESS;
217 static void
218 print_perms (int id, struct ipc_perm *ipcp) {
219 struct passwd *pw;
220 struct group *gr;
222 printf ("%-10d %-10o", id, ipcp->mode & 0777);
224 if ((pw = getpwuid(ipcp->cuid)))
225 printf(" %-10s", pw->pw_name);
226 else
227 printf(" %-10d", ipcp->cuid);
228 if ((gr = getgrgid(ipcp->cgid)))
229 printf(" %-10s", gr->gr_name);
230 else
231 printf(" %-10d", ipcp->cgid);
233 if ((pw = getpwuid(ipcp->uid)))
234 printf(" %-10s", pw->pw_name);
235 else
236 printf(" %-10d", ipcp->uid);
237 if ((gr = getgrgid(ipcp->gid)))
238 printf(" %-10s\n", gr->gr_name);
239 else
240 printf(" %-10d\n", ipcp->gid);
244 void do_shm (char format)
246 int maxid, shmid, id;
247 struct shmid_ds shmseg;
248 struct shm_info shm_info;
249 struct shminfo shminfo;
250 struct ipc_perm *ipcp = &shmseg.shm_perm;
251 struct passwd *pw;
253 maxid = shmctl (0, SHM_INFO, (struct shmid_ds *) (void *) &shm_info);
254 if (maxid < 0 && errno == ENOSYS) {
255 printf (_("kernel not configured for shared memory\n"));
256 return;
259 switch (format) {
260 case LIMITS:
261 printf (_("------ Shared Memory Limits --------\n"));
262 if ((shmctl (0, IPC_INFO, (struct shmid_ds *) (void *) &shminfo)) < 0 )
263 return;
264 /* glibc 2.1.3 and all earlier libc's have ints as fields
265 of struct shminfo; glibc 2.1.91 has unsigned long; ach */
266 printf (_("max number of segments = %lu\n"),
267 (unsigned long) shminfo.shmmni);
268 printf (_("max seg size (kbytes) = %lu\n"),
269 (unsigned long) (shminfo.shmmax >> 10));
270 printf (_("max total shared memory (kbytes) = %lu\n"),
271 getpagesize() / 1024 * (unsigned long) shminfo.shmall);
272 printf (_("min seg size (bytes) = %lu\n"),
273 (unsigned long) shminfo.shmmin);
274 return;
276 case STATUS:
277 printf (_("------ Shared Memory Status --------\n"));
278 printf (_("segments allocated %d\n"), shm_info.used_ids);
279 printf (_("pages allocated %ld\n"), shm_info.shm_tot);
280 printf (_("pages resident %ld\n"), shm_info.shm_rss);
281 printf (_("pages swapped %ld\n"), shm_info.shm_swp);
282 printf (_("Swap performance: %ld attempts\t %ld successes\n"),
283 shm_info.swap_attempts, shm_info.swap_successes);
284 return;
286 case CREATOR:
287 printf (_("------ Shared Memory Segment Creators/Owners --------\n"));
288 printf ("%-10s %-10s %-10s %-10s %-10s %-10s\n",
289 _("shmid"),_("perms"),_("cuid"),_("cgid"),_("uid"),_("gid"));
290 break;
292 case TIME:
293 printf (_("------ Shared Memory Attach/Detach/Change Times --------\n"));
294 printf ("%-10s %-10s %-20s %-20s %-20s\n",
295 _("shmid"),_("owner"),_("attached"),_("detached"),
296 _("changed"));
297 break;
299 case PID:
300 printf (_("------ Shared Memory Creator/Last-op --------\n"));
301 printf ("%-10s %-10s %-10s %-10s\n",
302 _("shmid"),_("owner"),_("cpid"),_("lpid"));
303 break;
305 default:
306 printf (_("------ Shared Memory Segments --------\n"));
307 printf ("%-10s %-10s %-10s %-10s %-10s %-10s %-12s\n",
308 _("key"),_("shmid"),_("owner"),_("perms"),_("bytes"),
309 _("nattch"),_("status"));
310 break;
313 for (id = 0; id <= maxid; id++) {
314 shmid = shmctl (id, SHM_STAT, &shmseg);
315 if (shmid < 0)
316 continue;
317 if (format == CREATOR) {
318 print_perms (shmid, ipcp);
319 continue;
321 pw = getpwuid(ipcp->uid);
322 switch (format) {
323 case TIME:
324 if (pw)
325 printf ("%-10d %-10.10s", shmid, pw->pw_name);
326 else
327 printf ("%-10d %-10d", shmid, ipcp->uid);
328 /* ctime uses static buffer: use separate calls */
329 printf(" %-20.16s", shmseg.shm_atime
330 ? ctime(&shmseg.shm_atime) + 4 : _("Not set"));
331 printf(" %-20.16s", shmseg.shm_dtime
332 ? ctime(&shmseg.shm_dtime) + 4 : _("Not set"));
333 printf(" %-20.16s\n", shmseg.shm_ctime
334 ? ctime(&shmseg.shm_ctime) + 4 : _("Not set"));
335 break;
336 case PID:
337 if (pw)
338 printf ("%-10d %-10.10s", shmid, pw->pw_name);
339 else
340 printf ("%-10d %-10d", shmid, ipcp->uid);
341 printf (" %-10d %-10d\n",
342 shmseg.shm_cpid, shmseg.shm_lpid);
343 break;
345 default:
346 printf("0x%08x ",ipcp->KEY );
347 if (pw)
348 printf ("%-10d %-10.10s", shmid, pw->pw_name);
349 else
350 printf ("%-10d %-10d", shmid, ipcp->uid);
351 printf (" %-10o %-10lu %-10ld %-6s %-6s\n",
352 ipcp->mode & 0777,
354 * earlier: int, Austin has size_t
356 (unsigned long) shmseg.shm_segsz,
358 * glibc-2.1.3 and earlier has unsigned short;
359 * Austin has shmatt_t
361 (long) shmseg.shm_nattch,
362 ipcp->mode & SHM_DEST ? _("dest") : " ",
363 ipcp->mode & SHM_LOCKED ? _("locked") : " ");
364 break;
367 return;
371 void do_sem (char format)
373 int maxid, semid, id;
374 struct semid_ds semary;
375 struct seminfo seminfo;
376 struct ipc_perm *ipcp = &semary.sem_perm;
377 struct passwd *pw;
378 union semun arg;
380 arg.array = (unsigned short *) (void *) &seminfo;
381 maxid = semctl (0, 0, SEM_INFO, arg);
382 if (maxid < 0) {
383 printf (_("kernel not configured for semaphores\n"));
384 return;
387 switch (format) {
388 case LIMITS:
389 printf (_("------ Semaphore Limits --------\n"));
390 arg.array = (unsigned short *) (void *) &seminfo; /* damn union */
391 if ((semctl (0, 0, IPC_INFO, arg)) < 0 )
392 return;
393 printf (_("max number of arrays = %d\n"), seminfo.semmni);
394 printf (_("max semaphores per array = %d\n"), seminfo.semmsl);
395 printf (_("max semaphores system wide = %d\n"), seminfo.semmns);
396 printf (_("max ops per semop call = %d\n"), seminfo.semopm);
397 printf (_("semaphore max value = %d\n"), seminfo.semvmx);
398 return;
400 case STATUS:
401 printf (_("------ Semaphore Status --------\n"));
402 printf (_("used arrays = %d\n"), seminfo.semusz);
403 printf (_("allocated semaphores = %d\n"), seminfo.semaem);
404 return;
406 case CREATOR:
407 printf (_("------ Semaphore Arrays Creators/Owners --------\n"));
408 printf ("%-10s %-10s %-10s %-10s %-10s %-10s\n",
409 _("semid"),_("perms"),_("cuid"),_("cgid"),_("uid"),_("gid"));
410 break;
412 case TIME:
413 printf (_("------ Semaphore Operation/Change Times --------\n"));
414 printf ("%-8s %-10s %-26.24s %-26.24s\n",
415 _("semid"),_("owner"),_("last-op"),_("last-changed"));
416 break;
418 case PID:
419 break;
421 default:
422 printf (_("------ Semaphore Arrays --------\n"));
423 printf ("%-10s %-10s %-10s %-10s %-10s\n",
424 _("key"),_("semid"),_("owner"),_("perms"),_("nsems"));
425 break;
428 for (id = 0; id <= maxid; id++) {
429 arg.buf = (struct semid_ds *) &semary;
430 semid = semctl (id, 0, SEM_STAT, arg);
431 if (semid < 0)
432 continue;
433 if (format == CREATOR) {
434 print_perms (semid, ipcp);
435 continue;
437 pw = getpwuid(ipcp->uid);
438 switch (format) {
439 case TIME:
440 if (pw)
441 printf ("%-8d %-10.10s", semid, pw->pw_name);
442 else
443 printf ("%-8d %-10d", semid, ipcp->uid);
444 printf (" %-26.24s", semary.sem_otime
445 ? ctime(&semary.sem_otime) : _("Not set"));
446 printf (" %-26.24s\n", semary.sem_ctime
447 ? ctime(&semary.sem_ctime) : _("Not set"));
448 break;
449 case PID:
450 break;
452 default:
453 printf("0x%08x ", ipcp->KEY);
454 if (pw)
455 printf ("%-10d %-10.10s", semid, pw->pw_name);
456 else
457 printf ("%-10d %-10d", semid, ipcp->uid);
458 printf (" %-10o %-10ld\n",
459 ipcp->mode & 0777,
461 * glibc-2.1.3 and earlier has unsigned short;
462 * glibc-2.1.91 has variation between
463 * unsigned short and unsigned long
464 * Austin prescribes unsigned short.
466 (long) semary.sem_nsems);
467 break;
473 void do_msg (char format)
475 #if 0
476 int maxid, msqid, id;
477 struct msqid_ds msgque;
478 struct msginfo msginfo;
479 struct ipc_perm *ipcp = &msgque.msg_perm;
480 struct passwd *pw;
482 maxid = msgctl (0, MSG_INFO, (struct msqid_ds *) (void *) &msginfo);
483 if (maxid < 0) {
484 printf (_("kernel not configured for message queues\n"));
485 return;
488 switch (format) {
489 case LIMITS:
490 if ((msgctl (0, IPC_INFO, (struct msqid_ds *) (void *) &msginfo)) < 0 )
491 return;
492 printf (_("------ Messages: Limits --------\n"));
493 printf (_("max queues system wide = %d\n"), msginfo.msgmni);
494 printf (_("max size of message (bytes) = %d\n"), msginfo.msgmax);
495 printf (_("default max size of queue (bytes) = %d\n"), msginfo.msgmnb);
496 return;
498 case STATUS:
499 printf (_("------ Messages: Status --------\n"));
500 printf (_("allocated queues = %d\n"), msginfo.msgpool);
501 printf (_("used headers = %d\n"), msginfo.msgmap);
502 printf (_("used space = %d bytes\n"), msginfo.msgtql);
503 return;
505 case CREATOR:
506 printf (_("------ Message Queues: Creators/Owners --------\n"));
507 printf ("%-10s %-10s %-10s %-10s %-10s %-10s\n",
508 _("msqid"),_("perms"),_("cuid"),_("cgid"),_("uid"),_("gid"));
509 break;
511 case TIME:
512 printf (_("------ Message Queues Send/Recv/Change Times --------\n"));
513 printf ("%-8s %-10s %-20s %-20s %-20s\n",
514 _("msqid"),_("owner"),_("send"),_("recv"),_("change"));
515 break;
517 case PID:
518 printf (_("------ Message Queues PIDs --------\n"));
519 printf ("%-10s %-10s %-10s %-10s\n",
520 _("msqid"),_("owner"),_("lspid"),_("lrpid"));
521 break;
523 default:
524 printf (_("------ Message Queues --------\n"));
525 printf ("%-10s %-10s %-10s %-10s %-12s %-12s\n",
526 _("key"), _("msqid"), _("owner"), _("perms"),
527 _("used-bytes"), _("messages"));
528 break;
531 for (id = 0; id <= maxid; id++) {
532 msqid = msgctl (id, MSG_STAT, &msgque);
533 if (msqid < 0)
534 continue;
535 if (format == CREATOR) {
536 print_perms (msqid, ipcp);
537 continue;
539 pw = getpwuid(ipcp->uid);
540 switch (format) {
541 case TIME:
542 if (pw)
543 printf ("%-8d %-10.10s", msqid, pw->pw_name);
544 else
545 printf ("%-8d %-10d", msqid, ipcp->uid);
546 printf (" %-20.16s", msgque.msg_stime
547 ? ctime(&msgque.msg_stime) + 4 : _("Not set"));
548 printf (" %-20.16s", msgque.msg_rtime
549 ? ctime(&msgque.msg_rtime) + 4 : _("Not set"));
550 printf (" %-20.16s\n", msgque.msg_ctime
551 ? ctime(&msgque.msg_ctime) + 4 : _("Not set"));
552 break;
553 case PID:
554 if (pw)
555 printf ("%-8d %-10.10s", msqid, pw->pw_name);
556 else
557 printf ("%-8d %-10d", msqid, ipcp->uid);
558 printf (" %5d %5d\n",
559 msgque.msg_lspid, msgque.msg_lrpid);
560 break;
562 default:
563 printf( "0x%08x ",ipcp->KEY );
564 if (pw)
565 printf ("%-10d %-10.10s", msqid, pw->pw_name);
566 else
567 printf ("%-10d %-10d", msqid, ipcp->uid);
568 printf (" %-10o %-12ld %-12ld\n",
569 ipcp->mode & 0777,
571 * glibc-2.1.3 and earlier has unsigned short;
572 * glibc-2.1.91 has variation between
573 * unsigned short, unsigned long
574 * Austin has msgqnum_t
576 (long) msgque.msg_cbytes,
577 (long) msgque.msg_qnum);
578 break;
581 return;
582 #endif
586 void print_shm (int shmid)
588 struct shmid_ds shmds;
589 struct ipc_perm *ipcp = &shmds.shm_perm;
591 if (shmctl (shmid, IPC_STAT, &shmds) == -1)
592 err(EXIT_FAILURE, _("shmctl failed"));
594 printf (_("\nShared memory Segment shmid=%d\n"), shmid);
595 printf (_("uid=%d\tgid=%d\tcuid=%d\tcgid=%d\n"),
596 ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid);
597 printf (_("mode=%#o\taccess_perms=%#o\n"),
598 ipcp->mode, ipcp->mode & 0777);
599 printf (_("bytes=%ld\tlpid=%d\tcpid=%d\tnattch=%ld\n"),
600 (long) shmds.shm_segsz, shmds.shm_lpid, shmds.shm_cpid,
601 (long) shmds.shm_nattch);
602 printf (_("att_time=%-26.24s\n"),
603 shmds.shm_atime ? ctime (&shmds.shm_atime) : _("Not set"));
604 printf (_("det_time=%-26.24s\n"),
605 shmds.shm_dtime ? ctime (&shmds.shm_dtime) : _("Not set"));
606 printf (_("change_time=%-26.24s\n"), ctime (&shmds.shm_ctime));
607 printf ("\n");
608 return;
612 void print_msg (int msqid)
614 #if 0
615 struct msqid_ds buf;
616 struct ipc_perm *ipcp = &buf.msg_perm;
618 if (msgctl (msqid, IPC_STAT, &buf) == -1)
619 err(EXIT_FAILURE, _("msgctl failed"));
621 printf (_("\nMessage Queue msqid=%d\n"), msqid);
622 printf (_("uid=%d\tgid=%d\tcuid=%d\tcgid=%d\tmode=%#o\n"),
623 ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid, ipcp->mode);
624 printf (_("cbytes=%ld\tqbytes=%ld\tqnum=%ld\tlspid=%d\tlrpid=%d\n"),
626 * glibc-2.1.3 and earlier has unsigned short;
627 * glibc-2.1.91 has variation between
628 * unsigned short, unsigned long
629 * Austin has msgqnum_t (for msg_qbytes)
631 (long) buf.msg_cbytes, (long) buf.msg_qbytes,
632 (long) buf.msg_qnum, buf.msg_lspid, buf.msg_lrpid);
633 printf (_("send_time=%-26.24s\n"),
634 buf.msg_stime ? ctime (&buf.msg_stime) : _("Not set"));
635 printf (_("rcv_time=%-26.24s\n"),
636 buf.msg_rtime ? ctime (&buf.msg_rtime) : _("Not set"));
637 printf (_("change_time=%-26.24s\n"),
638 buf.msg_ctime ? ctime (&buf.msg_ctime) : _("Not set"));
639 printf ("\n");
640 return;
641 #endif
644 void print_sem (int semid)
646 struct semid_ds semds;
647 struct ipc_perm *ipcp = &semds.sem_perm;
648 union semun arg;
649 int i;
651 arg.buf = &semds;
652 if (semctl (semid, 0, IPC_STAT, arg) < 0)
653 err(EXIT_FAILURE, _("semctl failed"));
655 printf (_("\nSemaphore Array semid=%d\n"), semid);
656 printf (_("uid=%d\t gid=%d\t cuid=%d\t cgid=%d\n"),
657 ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid);
658 printf (_("mode=%#o, access_perms=%#o\n"),
659 ipcp->mode, ipcp->mode & 0777);
660 printf (_("nsems = %ld\n"), (long) semds.sem_nsems);
661 printf (_("otime = %-26.24s\n"),
662 semds.sem_otime ? ctime (&semds.sem_otime) : _("Not set"));
663 printf (_("ctime = %-26.24s\n"), ctime (&semds.sem_ctime));
665 printf ("%-10s %-10s %-10s %-10s %-10s\n",
666 _("semnum"),_("value"),_("ncount"),_("zcount"),_("pid"));
667 arg.val = 0;
668 for (i=0; i< semds.sem_nsems; i++) {
669 int val, ncnt, zcnt, pid;
670 val = semctl (semid, i, GETVAL, arg);
671 ncnt = semctl (semid, i, GETNCNT, arg);
672 zcnt = semctl (semid, i, GETZCNT, arg);
673 pid = semctl (semid, i, GETPID, arg);
674 if (val < 0 || ncnt < 0 || zcnt < 0 || pid < 0)
675 err(EXIT_FAILURE, _("semctl failed"));
677 printf ("%-10d %-10d %-10d %-10d %-10d\n",
678 i, val, ncnt, zcnt, pid);
680 printf ("\n");
681 return;