2 * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
3 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
4 * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
5 * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 #define _LINUX_SOCKET_H
39 #define MS_RDONLY 1 /* Mount read-only */
40 #define MS_NOSUID 2 /* Ignore suid and sgid bits */
41 #define MS_NODEV 4 /* Disallow access to device special files */
42 #define MS_NOEXEC 8 /* Disallow program execution */
43 #define MS_SYNCHRONOUS 16 /* Writes are synced at once */
44 #define MS_REMOUNT 32 /* Alter flags of a mounted FS */
46 #include <sys/socket.h>
47 #include <netinet/in.h>
48 #include <arpa/inet.h>
50 #include <sys/syscall.h>
52 #ifdef SYS_personality
53 /* Workaround for kernel namespace pollution. */
54 #define _LINUX_PTRACE_H
55 /* Yuck yuck yuck. We can't include linux/ptrace.h, but personality.h
56 makes a declaration with struct pt_regs, which is defined there. */
58 #define sys_personality kernel_sys_personality
59 #include <linux/personality.h>
60 #undef sys_personality
61 #endif /* SYS_personality */
64 #include <linux/capability.h>
68 #include <asm/cachectl.h>
71 #ifdef HAVE_LINUX_USTNAME_H
72 #include <linux/utsname.h>
75 #ifdef HAVE_ASM_SYSMIPS_H
76 #include <asm/sysmips.h>
79 #include <linux/sysctl.h>
81 static struct xlat mount_flags[] = {
82 { MS_RDONLY, "MS_RDONLY" },
83 { MS_NOSUID, "MS_NOSUID" },
84 { MS_NODEV, "MS_NODEV" },
85 { MS_NOEXEC, "MS_NOEXEC" },
87 { MS_SYNCHRONOUS,"MS_SYNCHRONOUS"},
89 { MS_SYNC, "MS_SYNC" },
91 { MS_REMOUNT, "MS_REMOUNT" },
100 printpath(tcp, tcp->u_arg[0]);
102 printpath(tcp, tcp->u_arg[1]);
104 printpath(tcp, tcp->u_arg[2]);
106 printflags(mount_flags, tcp->u_arg[3]);
107 tprintf(", %#lx", tcp->u_arg[4]);
117 printstr(tcp, tcp->u_arg[0], -1);
119 if (tcp->u_arg[1] & 1)
120 tprintf("MNT_FORCE");
127 static struct xlat personality_options[] = {
129 { PER_LINUX, "PER_LINUX" },
131 #ifdef PER_LINUX_32BIT
132 { PER_LINUX_32BIT, "PER_LINUX" },
135 { PER_SVR4, "PER_SVR4" },
138 { PER_SVR3, "PER_SVR3" },
141 { PER_SCOSVR3, "PER_SCOSVR3" },
144 { PER_WYSEV386, "PER_WYSEV386" },
147 { PER_ISCR4, "PER_ISCR4" },
150 { PER_BSD, "PER_BSD" },
153 { PER_XENIX, "PER_XENIX" },
163 printxval(personality_options, tcp->u_arg[0], "PER_???");
167 #include <linux/reboot.h>
168 static struct xlat bootflags1[] = {
169 { LINUX_REBOOT_MAGIC1, "LINUX_REBOOT_MAGIC1" },
173 static struct xlat bootflags2[] = {
174 { LINUX_REBOOT_MAGIC2, "LINUX_REBOOT_MAGIC2" },
175 { LINUX_REBOOT_MAGIC2A, "LINUX_REBOOT_MAGIC2A" },
176 { LINUX_REBOOT_MAGIC2B, "LINUX_REBOOT_MAGIC2B" },
180 static struct xlat bootflags3[] = {
181 { LINUX_REBOOT_CMD_CAD_OFF, "LINUX_REBOOT_CMD_CAD_OFF" },
182 { LINUX_REBOOT_CMD_RESTART, "LINUX_REBOOT_CMD_RESTART" },
183 { LINUX_REBOOT_CMD_HALT, "LINUX_REBOOT_CMD_HALT" },
184 { LINUX_REBOOT_CMD_CAD_ON, "LINUX_REBOOT_CMD_CAD_ON" },
185 { LINUX_REBOOT_CMD_POWER_OFF, "LINUX_REBOOT_CMD_POWER_OFF" },
186 { LINUX_REBOOT_CMD_RESTART2, "LINUX_REBOOT_CMD_RESTART2" },
195 if (!printflags(bootflags1, tcp->u_arg[0]))
196 tprintf("LINUX_REBOOT_MAGIC???");
198 if (!printflags(bootflags2, tcp->u_arg[1]))
199 tprintf("LINUX_REBOOT_MAGIC???");
201 if (!printflags(bootflags3, tcp->u_arg[2]))
202 tprintf("LINUX_REBOOT_CMD_???");
203 if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) {
205 printstr(tcp, tcp->u_arg[3], -1);
212 static struct xlat cacheflush_scope[] = {
213 #ifdef FLUSH_SCOPE_LINE
214 { FLUSH_SCOPE_LINE, "FLUSH_SCOPE_LINE" },
216 #ifdef FLUSH_SCOPE_PAGE
217 { FLUSH_SCOPE_PAGE, "FLUSH_SCOPE_PAGE" },
219 #ifdef FLUSH_SCOPE_ALL
220 { FLUSH_SCOPE_ALL, "FLUSH_SCOPE_ALL" },
225 static struct xlat cacheflush_flags[] = {
226 #ifdef FLUSH_CACHE_BOTH
227 { FLUSH_CACHE_BOTH, "FLUSH_CACHE_BOTH" },
229 #ifdef FLUSH_CACHE_DATA
230 { FLUSH_CACHE_DATA, "FLUSH_CACHE_DATA" },
232 #ifdef FLUSH_CACHE_INSN
233 { FLUSH_CACHE_INSN, "FLUSH_CACHE_INSN" },
244 tprintf("%#lx, ", tcp->u_arg[0]);
246 printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
249 printflags(cacheflush_flags, tcp->u_arg[2]);
251 tprintf(", %lu", tcp->u_arg[3]);
261 #include <sys/reboot.h>
266 #include <sys/mount.h>
267 #include <sys/socket.h>
268 #include <nfs/export.h>
269 #include <rpc/types.h>
270 #include <rpc/auth.h>
280 static struct xlat bootflags[] = {
281 { RB_AUTOBOOT, "RB_AUTOBOOT" }, /* for system auto-booting itself */
282 { RB_ASKNAME, "RB_ASKNAME" }, /* ask for file name to reboot from */
283 { RB_SINGLE, "RB_SINGLE" }, /* reboot to single user only */
284 { RB_NOSYNC, "RB_NOSYNC" }, /* dont sync before reboot */
285 { RB_HALT, "RB_HALT" }, /* don't reboot, just halt */
286 { RB_INITNAME, "RB_INITNAME" }, /* name given for /etc/init */
287 { RB_NOBOOTRC, "RB_NOBOOTRC" }, /* don't run /etc/rc.boot */
288 { RB_DEBUG, "RB_DEBUG" }, /* being run under debugger */
289 { RB_DUMP, "RB_DUMP" }, /* dump system core */
290 { RB_WRITABLE, "RB_WRITABLE" }, /* mount root read/write */
291 { RB_STRING, "RB_STRING" }, /* pass boot args to prom monitor */
300 if (!printflags(bootflags, tcp->u_arg[0]))
302 if (tcp->u_arg[0] & RB_STRING) {
303 printstr(tcp, tcp->u_arg[1], -1);
314 printstr(tcp, tcp->u_arg[0], -1);
324 printstr(tcp, tcp->u_arg[0], -1);
334 printsock(tcp, tcp->u_arg[0]);
339 static struct xlat mountflags[] = {
340 { M_RDONLY, "M_RDONLY" },
341 { M_NOSUID, "M_NOSUID" },
342 { M_NEWTYPE, "M_NEWTYPE" },
343 { M_GRPID, "M_GRPID" },
345 { M_REMOUNT, "M_REMOUNT" },
348 { M_NOSUB, "M_NOSUB" },
351 { M_MULTI, "M_MULTI" },
354 { M_SYS5, "M_SYS5" },
359 static struct xlat nfsflags[] = {
360 { NFSMNT_SOFT, "NFSMNT_SOFT" },
361 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
362 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
363 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
364 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
365 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
366 { NFSMNT_INT, "NFSMNT_INT" },
367 { NFSMNT_NOAC, "NFSMNT_NOAC" },
368 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
369 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
370 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
371 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
373 { NFSMNT_SECURE, "NFSMNT_SECURE" },
376 { NFSMNT_NOCTO, "NFSMNT_NOCTO" },
379 { NFSMNT_POSIX, "NFSMNT_POSIX" },
391 if (!(tcp->u_arg[2] & M_NEWTYPE) || umovestr(tcp,
392 tcp->u_arg[0], sizeof type, type) < 0) {
393 tprintf("OLDTYPE:#%lx", tcp->u_arg[0]);
395 tprintf("\"%s\", ", type);
397 printstr(tcp, tcp->u_arg[1], -1);
399 if (!printflags(mountflags, tcp->u_arg[2] & ~M_NEWTYPE))
403 if (strcmp(type, "4.2") == 0) {
405 if (umove(tcp, tcp->u_arg[3], &a) < 0)
407 printstr(tcp, (int)a.fspec, -1);
408 } else if (strcmp(type, "lo") == 0) {
410 if (umove(tcp, tcp->u_arg[3], &a) < 0)
412 printstr(tcp, (int)a.fsdir, -1);
413 } else if (strcmp(type, "nfs") == 0) {
415 if (umove(tcp, tcp->u_arg[3], &a) < 0)
418 printsock(tcp, (int) a.addr);
420 if (!printflags(nfsflags, a.flags))
421 tprintf("NFSMNT_???");
422 tprintf(", ws:%u,rs:%u,to:%u,re:%u,",
423 a.wsize, a.rsize, a.timeo, a.retrans);
424 if (a.flags & NFSMNT_HOSTNAME && a.hostname)
425 printstr(tcp, (int)a.hostname, -1);
427 tprintf("%#lx", (unsigned long) a.hostname);
428 tprintf(",reg-min:%u,max:%u,dir-min:%u,max:%u,",
429 a.acregmin, a.acregmax, a.acdirmin, a.acdirmax);
430 if ((a.flags & NFSMNT_SECURE) && a.netname)
431 printstr(tcp, (int) a.netname, -1);
433 tprintf("%#lx", (unsigned long) a.netname);
435 } else if (strcmp(type, "rfs") == 0) {
438 if (umove(tcp, tcp->u_arg[3], &a) < 0)
441 printstr(tcp, (int)a.rmtfs, -1);
442 if (umove(tcp, (int)a.token, &t) < 0)
444 tprintf(", %u, %s]", t.t_id, t.t_uname);
445 } else if (strcmp(type, "pcfs") == 0) {
447 if (umove(tcp, tcp->u_arg[3], &a) < 0)
449 printstr(tcp, (int)a.fspec, -1);
460 printstr(tcp, tcp->u_arg[0], -1);
469 return sys_unmount(tcp);
476 /* XXX - no information available */
477 return printargs(tcp);
480 static struct xlat ex_auth_flags[] = {
481 { AUTH_UNIX, "AUTH_UNIX" },
482 { AUTH_DES, "AUTH_DES" },
494 printstr(tcp, tcp->u_arg[0], -1);
495 if (umove(tcp, tcp->u_arg[1], &e) < 0) {
496 tprintf("%#lx", tcp->u_arg[1]);
499 tprintf("{fl:%u, anon:%u, ", e.ex_flags, e.ex_anon);
500 printxval(ex_auth_flags, e.ex_auth, "AUTH_???");
501 tprintf(", roots:[");
502 if (e.ex_auth == AUTH_UNIX) {
503 for (i=0; i<e.ex_u.exunix.rootaddrs.naddrs; i++) {
505 (int)&e.ex_u.exunix.rootaddrs.addrvec[i]);
507 tprintf("], writers:[");
508 for (i=0; i<e.ex_writeaddrs.naddrs; i++) {
510 (int)&e.ex_writeaddrs.addrvec[i]);
514 for (i=0; i<e.ex_u.exdes.nnames; i++) {
516 (int)&e.ex_u.exdes.rootnames[i]);
519 tprintf("], window:%u", e.ex_u.exdes.window);
526 static struct xlat sysconflimits[] = {
528 { _SC_ARG_MAX, "_SC_ARG_MAX" }, /* space for argv & envp */
531 { _SC_CHILD_MAX, "_SC_CHILD_MAX" }, /* maximum children per process??? */
534 { _SC_CLK_TCK, "_SC_CLK_TCK" }, /* clock ticks/sec */
536 #ifdef _SC_NGROUPS_MAX
537 { _SC_NGROUPS_MAX, "_SC_NGROUPS_MAX" }, /* number of groups if multple supp. */
540 { _SC_OPEN_MAX, "_SC_OPEN_MAX" }, /* max open files per process */
542 #ifdef _SC_JOB_CONTROL
543 { _SC_JOB_CONTROL, "_SC_JOB_CONTROL" }, /* do we have job control */
546 { _SC_SAVED_IDS, "_SC_SAVED_IDS" }, /* do we have saved uid/gids */
549 { _SC_VERSION, "_SC_VERSION" }, /* POSIX version supported */
559 printxval(sysconflimits, tcp->u_arg[0], "_SC_???");
566 #if defined(SUNOS4) || defined(FREEBSD)
567 static struct xlat pathconflimits[] = {
569 { _PC_LINK_MAX, "_PC_LINK_MAX" }, /* max links to file/dir */
572 { _PC_MAX_CANON, "_PC_MAX_CANON" }, /* max line length */
575 { _PC_MAX_INPUT, "_PC_MAX_INPUT" }, /* max "packet" to a tty device */
578 { _PC_NAME_MAX, "_PC_NAME_MAX" }, /* max pathname component length */
581 { _PC_PATH_MAX, "_PC_PATH_MAX" }, /* max pathname length */
584 { _PC_PIPE_BUF, "_PC_PIPE_BUF" }, /* size of a pipe */
586 #ifdef _PC_CHOWN_RESTRICTED
587 { _PC_CHOWN_RESTRICTED, "_PC_CHOWN_RESTRICTED" }, /* can we give away files */
590 { _PC_NO_TRUNC, "_PC_NO_TRUNC" }, /* trunc or error on >NAME_MAX */
593 { _PC_VDISABLE, "_PC_VDISABLE" }, /* best char to shut off tty c_cc */
604 printstr(tcp, tcp->u_arg[0], -1);
606 printxval(pathconflimits, tcp->u_arg[1], "_PC_???");
616 tprintf("%lu, ", tcp->u_arg[0]);
617 printxval(pathconflimits, tcp->u_arg[1], "_PC_???");
622 #endif /* SUNOS4 || FREEBSD */
626 #ifdef HAVE_SYS_SYSCONFIG_H
627 #include <sys/sysconfig.h>
628 #endif /* HAVE_SYS_SYSCONFIG_H */
630 #include <sys/mount.h>
631 #include <sys/systeminfo.h>
632 #include <sys/utsname.h>
634 static struct xlat sysconfig_options[] = {
635 #ifdef _CONFIG_NGROUPS
636 { _CONFIG_NGROUPS, "_CONFIG_NGROUPS" },
638 #ifdef _CONFIG_CHILD_MAX
639 { _CONFIG_CHILD_MAX, "_CONFIG_CHILD_MAX" },
641 #ifdef _CONFIG_OPEN_FILES
642 { _CONFIG_OPEN_FILES, "_CONFIG_OPEN_FILES" },
644 #ifdef _CONFIG_POSIX_VER
645 { _CONFIG_POSIX_VER, "_CONFIG_POSIX_VER" },
647 #ifdef _CONFIG_PAGESIZE
648 { _CONFIG_PAGESIZE, "_CONFIG_PAGESIZE" },
650 #ifdef _CONFIG_CLK_TCK
651 { _CONFIG_CLK_TCK, "_CONFIG_CLK_TCK" },
653 #ifdef _CONFIG_XOPEN_VER
654 { _CONFIG_XOPEN_VER, "_CONFIG_XOPEN_VER" },
656 #ifdef _CONFIG_PROF_TCK
657 { _CONFIG_PROF_TCK, "_CONFIG_PROF_TCK" },
659 #ifdef _CONFIG_NPROC_CONF
660 { _CONFIG_NPROC_CONF, "_CONFIG_NPROC_CONF" },
662 #ifdef _CONFIG_NPROC_ONLN
663 { _CONFIG_NPROC_ONLN, "_CONFIG_NPROC_ONLN" },
665 #ifdef _CONFIG_AIO_LISTIO_MAX
666 { _CONFIG_AIO_LISTIO_MAX, "_CONFIG_AIO_LISTIO_MAX" },
668 #ifdef _CONFIG_AIO_MAX
669 { _CONFIG_AIO_MAX, "_CONFIG_AIO_MAX" },
671 #ifdef _CONFIG_AIO_PRIO_DELTA_MAX
672 { _CONFIG_AIO_PRIO_DELTA_MAX, "_CONFIG_AIO_PRIO_DELTA_MAX" },
674 #ifdef _CONFIG_CONFIG_DELAYTIMER_MAX
675 { _CONFIG_DELAYTIMER_MAX, "_CONFIG_DELAYTIMER_MAX" },
677 #ifdef _CONFIG_MQ_OPEN_MAX
678 { _CONFIG_MQ_OPEN_MAX, "_CONFIG_MQ_OPEN_MAX" },
680 #ifdef _CONFIG_MQ_PRIO_MAX
681 { _CONFIG_MQ_PRIO_MAX, "_CONFIG_MQ_PRIO_MAX" },
683 #ifdef _CONFIG_RTSIG_MAX
684 { _CONFIG_RTSIG_MAX, "_CONFIG_RTSIG_MAX" },
686 #ifdef _CONFIG_SEM_NSEMS_MAX
687 { _CONFIG_SEM_NSEMS_MAX, "_CONFIG_SEM_NSEMS_MAX" },
689 #ifdef _CONFIG_SEM_VALUE_MAX
690 { _CONFIG_SEM_VALUE_MAX, "_CONFIG_SEM_VALUE_MAX" },
692 #ifdef _CONFIG_SIGQUEUE_MAX
693 { _CONFIG_SIGQUEUE_MAX, "_CONFIG_SIGQUEUE_MAX" },
695 #ifdef _CONFIG_SIGRT_MIN
696 { _CONFIG_SIGRT_MIN, "_CONFIG_SIGRT_MIN" },
698 #ifdef _CONFIG_SIGRT_MAX
699 { _CONFIG_SIGRT_MAX, "_CONFIG_SIGRT_MAX" },
701 #ifdef _CONFIG_TIMER_MAX
702 { _CONFIG_TIMER_MAX, "_CONFIG_TIMER_MAX" },
704 #ifdef _CONFIG_CONFIG_PHYS_PAGES
705 { _CONFIG_PHYS_PAGES, "_CONFIG_PHYS_PAGES" },
707 #ifdef _CONFIG_AVPHYS_PAGES
708 { _CONFIG_AVPHYS_PAGES, "_CONFIG_AVPHYS_PAGES" },
718 printxval(sysconfig_options, tcp->u_arg[0], "_CONFIG_???");
722 static struct xlat sysinfo_options[] = {
723 { SI_SYSNAME, "SI_SYSNAME" },
724 { SI_HOSTNAME, "SI_HOSTNAME" },
725 { SI_RELEASE, "SI_RELEASE" },
726 { SI_VERSION, "SI_VERSION" },
727 { SI_MACHINE, "SI_MACHINE" },
728 { SI_ARCHITECTURE, "SI_ARCHITECTURE" },
729 { SI_HW_SERIAL, "SI_HW_SERIAL" },
730 { SI_HW_PROVIDER, "SI_HW_PROVIDER" },
731 { SI_SRPC_DOMAIN, "SI_SRPC_DOMAIN" },
732 #ifdef SI_SET_HOSTNAME
733 { SI_SET_HOSTNAME, "SI_SET_HOSTNAME" },
735 #ifdef SI_SET_SRPC_DOMAIN
736 { SI_SET_SRPC_DOMAIN, "SI_SET_SRPC_DOMAIN" },
738 #ifdef SI_SET_KERB_REALM
739 { SI_SET_KERB_REALM, "SI_SET_KERB_REALM" },
742 { SI_KERB_REALM, "SI_KERB_REALM" },
752 printxval(sysinfo_options, tcp->u_arg[0], "SI_???");
756 /* Technically some calls write values. So what. */
758 tprintf("%#lx", tcp->u_arg[1]);
760 printpath(tcp, tcp->u_arg[1]);
761 tprintf(", %lu", tcp->u_arg[2]);
768 #include <sys/syssgi.h>
770 static struct xlat syssgi_options[] = {
771 { SGI_SYSID, "SGI_SYSID" },
773 { SGI_RDUBLK, "SGI_RDUBLK" },
775 { SGI_TUNE, "SGI_TUNE" },
776 { SGI_IDBG, "SGI_IDBG" },
777 { SGI_INVENT, "SGI_INVENT" },
778 { SGI_RDNAME, "SGI_RDNAME" },
779 { SGI_SETLED, "SGI_SETLED" },
780 { SGI_SETNVRAM, "SGI_SETNVRAM" },
781 { SGI_GETNVRAM, "SGI_GETNVRAM" },
782 { SGI_QUERY_FTIMER, "SGI_QUERY_FTIMER" },
783 { SGI_QUERY_CYCLECNTR, "SGI_QUERY_CYCLECNTR" },
784 { SGI_PROCSZ, "SGI_PROCSZ" },
785 { SGI_SIGACTION, "SGI_SIGACTION" },
786 { SGI_SIGPENDING, "SGI_SIGPENDING" },
787 { SGI_SIGPROCMASK, "SGI_SIGPROCMASK" },
788 { SGI_SIGSUSPEND, "SGI_SIGSUSPEND" },
789 { SGI_SETSID, "SGI_SETSID" },
790 { SGI_SETPGID, "SGI_SETPGID" },
791 { SGI_SYSCONF, "SGI_SYSCONF" },
792 { SGI_WAIT4, "SGI_WAIT4" },
793 { SGI_PATHCONF, "SGI_PATHCONF" },
794 { SGI_READB, "SGI_READB" },
795 { SGI_WRITEB, "SGI_WRITEB" },
796 { SGI_SETGROUPS, "SGI_SETGROUPS" },
797 { SGI_GETGROUPS, "SGI_GETGROUPS" },
798 { SGI_SETTIMEOFDAY, "SGI_SETTIMEOFDAY" },
799 { SGI_SETTIMETRIM, "SGI_SETTIMETRIM" },
800 { SGI_GETTIMETRIM, "SGI_GETTIMETRIM" },
801 { SGI_SPROFIL, "SGI_SPROFIL" },
802 { SGI_RUSAGE, "SGI_RUSAGE" },
803 { SGI_SIGSTACK, "SGI_SIGSTACK" },
804 { SGI_SIGSTATUS, "SGI_SIGSTATUS" },
805 { SGI_NETPROC, "SGI_NETPROC" },
806 { SGI_SIGALTSTACK, "SGI_SIGALTSTACK" },
807 { SGI_BDFLUSHCNT, "SGI_BDFLUSHCNT" },
808 { SGI_SSYNC, "SGI_SSYNC" },
809 { SGI_NFSCNVT, "SGI_NFSCNVT" },
810 { SGI_GETPGID, "SGI_GETPGID" },
811 { SGI_GETSID, "SGI_GETSID" },
812 { SGI_IOPROBE, "SGI_IOPROBE" },
813 { SGI_CONFIG, "SGI_CONFIG" },
814 { SGI_ELFMAP, "SGI_ELFMAP" },
815 { SGI_MCONFIG, "SGI_MCONFIG" },
816 { SGI_GETPLABEL, "SGI_GETPLABEL" },
817 { SGI_SETPLABEL, "SGI_SETPLABEL" },
818 { SGI_GETLABEL, "SGI_GETLABEL" },
819 { SGI_SETLABEL, "SGI_SETLABEL" },
820 { SGI_SATREAD, "SGI_SATREAD" },
821 { SGI_SATWRITE, "SGI_SATWRITE" },
822 { SGI_SATCTL, "SGI_SATCTL" },
823 { SGI_LOADATTR, "SGI_LOADATTR" },
824 { SGI_UNLOADATTR, "SGI_UNLOADATTR" },
826 { SGI_RECVLMSG, "SGI_RECVLMSG" },
828 { SGI_PLANGMOUNT, "SGI_PLANGMOUNT" },
829 { SGI_GETPSOACL, "SGI_GETPSOACL" },
830 { SGI_SETPSOACL, "SGI_SETPSOACL" },
831 #ifdef SGI_EAG_GET_ATTR
832 { SGI_EAG_GET_ATTR, "SGI_EAG_GET_ATTR" },
834 #ifdef SGI_EAG_SET_ATTR
835 { SGI_EAG_SET_ATTR, "SGI_EAG_SET_ATTR" },
837 #ifdef SGI_EAG_GET_PROCATTR
838 { SGI_EAG_GET_PROCATTR, "SGI_EAG_GET_PROCATTR" },
840 #ifdef SGI_EAG_SET_PROCATTR
841 { SGI_EAG_SET_PROCATTR, "SGI_EAG_SET_PROCATTR" },
844 { SGI_FREVOKE, "SGI_FREVOKE" },
846 #ifdef SGI_SBE_GET_INFO
847 { SGI_SBE_GET_INFO, "SGI_SBE_GET_INFO" },
849 #ifdef SGI_SBE_CLR_INFO
850 { SGI_SBE_CLR_INFO, "SGI_SBE_CLR_INFO" },
852 { SGI_RMI_FIXECC, "SGI_RMI_FIXECC" },
853 { SGI_R4K_CERRS, "SGI_R4K_CERRS" },
854 { SGI_GET_EVCONF, "SGI_GET_EVCONF" },
855 { SGI_MPCWAROFF, "SGI_MPCWAROFF" },
856 { SGI_SET_AUTOPWRON, "SGI_SET_AUTOPWRON" },
857 { SGI_SPIPE, "SGI_SPIPE" },
858 { SGI_SYMTAB, "SGI_SYMTAB" },
859 #ifdef SGI_SET_FPDEBUG
860 { SGI_SET_FPDEBUG, "SGI_SET_FPDEBUG" },
862 #ifdef SGI_SET_FP_PRECISE
863 { SGI_SET_FP_PRECISE, "SGI_SET_FP_PRECISE" },
865 { SGI_TOSSTSAVE, "SGI_TOSSTSAVE" },
866 { SGI_FDHI, "SGI_FDHI" },
867 #ifdef SGI_SET_CONFIG_SMM
868 { SGI_SET_CONFIG_SMM, "SGI_SET_CONFIG_SMM" },
870 #ifdef SGI_SET_FP_PRESERVE
871 { SGI_SET_FP_PRESERVE, "SGI_SET_FP_PRESERVE" },
873 { SGI_MINRSS, "SGI_MINRSS" },
875 { SGI_GRIO, "SGI_GRIO" },
877 #ifdef SGI_XLV_SET_TAB
878 { SGI_XLV_SET_TAB, "SGI_XLV_SET_TAB" },
880 #ifdef SGI_XLV_GET_TAB
881 { SGI_XLV_GET_TAB, "SGI_XLV_GET_TAB" },
883 #ifdef SGI_GET_FP_PRECISE
884 { SGI_GET_FP_PRECISE, "SGI_GET_FP_PRECISE" },
886 #ifdef SGI_GET_CONFIG_SMM
887 { SGI_GET_CONFIG_SMM, "SGI_GET_CONFIG_SMM" },
889 #ifdef SGI_FP_IMPRECISE_SUPP
890 { SGI_FP_IMPRECISE_SUPP,"SGI_FP_IMPRECISE_SUPP" },
892 #ifdef SGI_CONFIG_NSMM_SUPP
893 { SGI_CONFIG_NSMM_SUPP, "SGI_CONFIG_NSMM_SUPP" },
895 #ifdef SGI_RT_TSTAMP_CREATE
896 { SGI_RT_TSTAMP_CREATE, "SGI_RT_TSTAMP_CREATE" },
898 #ifdef SGI_RT_TSTAMP_DELETE
899 { SGI_RT_TSTAMP_DELETE, "SGI_RT_TSTAMP_DELETE" },
901 #ifdef SGI_RT_TSTAMP_START
902 { SGI_RT_TSTAMP_START, "SGI_RT_TSTAMP_START" },
904 #ifdef SGI_RT_TSTAMP_STOP
905 { SGI_RT_TSTAMP_STOP, "SGI_RT_TSTAMP_STOP" },
907 #ifdef SGI_RT_TSTAMP_ADDR
908 { SGI_RT_TSTAMP_ADDR, "SGI_RT_TSTAMP_ADDR" },
910 #ifdef SGI_RT_TSTAMP_MASK
911 { SGI_RT_TSTAMP_MASK, "SGI_RT_TSTAMP_MASK" },
913 #ifdef SGI_RT_TSTAMP_EOB_MODE
914 { SGI_RT_TSTAMP_EOB_MODE,"SGI_RT_TSTAMP_EOB_MODE"},
916 #ifdef SGI_USE_FP_BCOPY
917 { SGI_USE_FP_BCOPY, "SGI_USE_FP_BCOPY" },
920 { SGI_GET_UST, "SGI_GET_UST" },
922 #ifdef SGI_SPECULATIVE_EXEC
923 { SGI_SPECULATIVE_EXEC, "SGI_SPECULATIVE_EXEC" },
925 #ifdef SGI_XLV_NEXT_RQST
926 { SGI_XLV_NEXT_RQST, "SGI_XLV_NEXT_RQST" },
928 #ifdef SGI_XLV_ATTR_CURSOR
929 { SGI_XLV_ATTR_CURSOR, "SGI_XLV_ATTR_CURSOR" },
931 #ifdef SGI_XLV_ATTR_GET
932 { SGI_XLV_ATTR_GET, "SGI_XLV_ATTR_GET" },
934 #ifdef SGI_XLV_ATTR_SET
935 { SGI_XLV_ATTR_SET, "SGI_XLV_ATTR_SET" },
938 { SGI_BTOOLSIZE, "SGI_BTOOLSIZE" },
941 { SGI_BTOOLGET, "SGI_BTOOLGET" },
943 #ifdef SGI_BTOOLREINIT
944 { SGI_BTOOLREINIT, "SGI_BTOOLREINIT" },
946 #ifdef SGI_CREATE_UUID
947 { SGI_CREATE_UUID, "SGI_CREATE_UUID" },
950 { SGI_NOFPE, "SGI_NOFPE" },
952 #ifdef SGI_OLD_SOFTFP
953 { SGI_OLD_SOFTFP, "SGI_OLD_SOFTFP" },
955 #ifdef SGI_FS_INUMBERS
956 { SGI_FS_INUMBERS, "SGI_FS_INUMBERS" },
958 #ifdef SGI_FS_BULKSTAT
959 { SGI_FS_BULKSTAT, "SGI_FS_BULKSTAT" },
961 #ifdef SGI_RT_TSTAMP_WAIT
962 { SGI_RT_TSTAMP_WAIT, "SGI_RT_TSTAMP_WAIT" },
964 #ifdef SGI_RT_TSTAMP_UPDATE
965 { SGI_RT_TSTAMP_UPDATE, "SGI_RT_TSTAMP_UPDATE" },
967 #ifdef SGI_PATH_TO_HANDLE
968 { SGI_PATH_TO_HANDLE, "SGI_PATH_TO_HANDLE" },
970 #ifdef SGI_PATH_TO_FSHANDLE
971 { SGI_PATH_TO_FSHANDLE, "SGI_PATH_TO_FSHANDLE" },
973 #ifdef SGI_FD_TO_HANDLE
974 { SGI_FD_TO_HANDLE, "SGI_FD_TO_HANDLE" },
976 #ifdef SGI_OPEN_BY_HANDLE
977 { SGI_OPEN_BY_HANDLE, "SGI_OPEN_BY_HANDLE" },
979 #ifdef SGI_READLINK_BY_HANDLE
980 { SGI_READLINK_BY_HANDLE,"SGI_READLINK_BY_HANDLE"},
982 #ifdef SGI_READ_DANGID
983 { SGI_READ_DANGID, "SGI_READ_DANGID" },
986 { SGI_CONST, "SGI_CONST" },
988 #ifdef SGI_XFS_FSOPERATIONS
989 { SGI_XFS_FSOPERATIONS, "SGI_XFS_FSOPERATIONS" },
992 { SGI_SETASH, "SGI_SETASH" },
995 { SGI_GETASH, "SGI_GETASH" },
998 { SGI_SETPRID, "SGI_SETPRID" },
1001 { SGI_GETPRID, "SGI_GETPRID" },
1003 #ifdef SGI_SETSPINFO
1004 { SGI_SETSPINFO, "SGI_SETSPINFO" },
1006 #ifdef SGI_GETSPINFO
1007 { SGI_GETSPINFO, "SGI_GETSPINFO" },
1010 { SGI_SHAREII, "SGI_SHAREII" },
1012 #ifdef SGI_NEWARRAYSESS
1013 { SGI_NEWARRAYSESS, "SGI_NEWARRAYSESS" },
1015 #ifdef SGI_GETDFLTPRID
1016 { SGI_GETDFLTPRID, "SGI_GETDFLTPRID" },
1018 #ifdef SGI_SET_DISMISSED_EXC_CNT
1019 { SGI_SET_DISMISSED_EXC_CNT,"SGI_SET_DISMISSED_EXC_CNT" },
1021 #ifdef SGI_GET_DISMISSED_EXC_CNT
1022 { SGI_GET_DISMISSED_EXC_CNT,"SGI_GET_DISMISSED_EXC_CNT" },
1024 #ifdef SGI_CYCLECNTR_SIZE
1025 { SGI_CYCLECNTR_SIZE, "SGI_CYCLECNTR_SIZE" },
1027 #ifdef SGI_QUERY_FASTTIMER
1028 { SGI_QUERY_FASTTIMER, "SGI_QUERY_FASTTIMER" },
1030 #ifdef SGI_PIDSINASH
1031 { SGI_PIDSINASH, "SGI_PIDSINASH" },
1034 { SGI_ULI, "SGI_ULI" },
1036 #ifdef SGI_LPG_SHMGET
1037 { SGI_LPG_SHMGET, "SGI_LPG_SHMGET" },
1040 { SGI_LPG_MAP, "SGI_LPG_MAP" },
1042 #ifdef SGI_CACHEFS_SYS
1043 { SGI_CACHEFS_SYS, "SGI_CACHEFS_SYS" },
1045 #ifdef SGI_NFSNOTIFY
1046 { SGI_NFSNOTIFY, "SGI_NFSNOTIFY" },
1049 { SGI_LOCKDSYS, "SGI_LOCKDSYS" },
1052 { SGI_EVENTCTR, "SGI_EVENTCTR" },
1054 #ifdef SGI_GETPRUSAGE
1055 { SGI_GETPRUSAGE, "SGI_GETPRUSAGE" },
1057 #ifdef SGI_PROCMASK_LOCATION
1058 { SGI_PROCMASK_LOCATION,"SGI_PROCMASK_LOCATION" },
1061 { SGI_UNUSED, "SGI_UNUSED" },
1064 { SGI_CKPT_SYS, "SGI_CKPT_SYS" },
1067 { SGI_CKPT_SYS, "SGI_CKPT_SYS" },
1069 #ifdef SGI_GETGRPPID
1070 { SGI_GETGRPPID, "SGI_GETGRPPID" },
1072 #ifdef SGI_GETSESPID
1073 { SGI_GETSESPID, "SGI_GETSESPID" },
1076 { SGI_ENUMASHS, "SGI_ENUMASHS" },
1078 #ifdef SGI_SETASMACHID
1079 { SGI_SETASMACHID, "SGI_SETASMACHID" },
1081 #ifdef SGI_GETASMACHID
1082 { SGI_GETASMACHID, "SGI_GETASMACHID" },
1084 #ifdef SGI_GETARSESS
1085 { SGI_GETARSESS, "SGI_GETARSESS" },
1087 #ifdef SGI_JOINARRAYSESS
1088 { SGI_JOINARRAYSESS, "SGI_JOINARRAYSESS" },
1090 #ifdef SGI_SPROC_KILL
1091 { SGI_SPROC_KILL, "SGI_SPROC_KILL" },
1093 #ifdef SGI_DBA_CONFIG
1094 { SGI_DBA_CONFIG, "SGI_DBA_CONFIG" },
1096 #ifdef SGI_RELEASE_NAME
1097 { SGI_RELEASE_NAME, "SGI_RELEASE_NAME" },
1099 #ifdef SGI_SYNCH_CACHE_HANDLER
1100 { SGI_SYNCH_CACHE_HANDLER,"SGI_SYNCH_CACHE_HANDLER"},
1102 #ifdef SGI_SWASH_INIT
1103 { SGI_SWASH_INIT, "SGI_SWASH_INIT" },
1105 #ifdef SGI_NUMA_MIGR_PAGE
1106 { SGI_NUMA_MIGR_PAGE, "SGI_NUMA_MIGR_PAGE" },
1108 #ifdef SGI_NUMA_MIGR_PAGE_ALT
1109 { SGI_NUMA_MIGR_PAGE_ALT,"SGI_NUMA_MIGR_PAGE_ALT"},
1111 #ifdef SGI_KAIO_USERINIT
1112 { SGI_KAIO_USERINIT, "SGI_KAIO_USERINIT" },
1114 #ifdef SGI_KAIO_READ
1115 { SGI_KAIO_READ, "SGI_KAIO_READ" },
1117 #ifdef SGI_KAIO_WRITE
1118 { SGI_KAIO_WRITE, "SGI_KAIO_WRITE" },
1120 #ifdef SGI_KAIO_SUSPEND
1121 { SGI_KAIO_SUSPEND, "SGI_KAIO_SUSPEND" },
1123 #ifdef SGI_KAIO_STATS
1124 { SGI_KAIO_STATS, "SGI_KAIO_STATS" },
1126 #ifdef SGI_INITIAL_PT_SPROC
1127 { SGI_INITIAL_PT_SPROC, "SGI_INITIAL_PT_SPROC" },
1138 if (entering(tcp)) {
1139 printxval(syssgi_options, tcp->u_arg[0], "SGI_???");
1140 switch (tcp->u_arg[0]) {
1142 for (i = 1; i < tcp->u_nargs; i++)
1143 tprintf(", %#lx", tcp->u_arg[i]);
1150 #include <sys/types.h>
1151 #include <rpc/rpc.h>
1154 #include <sys/fsid.h>
1155 #include <sys/vnode.h>
1156 #include <sys/fs/nfs.h>
1157 #include <sys/fs/nfs_clnt.h>
1159 static struct xlat mount_flags[] = {
1160 { MS_RDONLY, "MS_RDONLY" },
1161 { MS_FSS, "MS_FSS" },
1162 { MS_DATA, "MS_DATA" },
1163 { MS_NOSUID, "MS_NOSUID" },
1164 { MS_REMOUNT, "MS_REMOUNT" },
1165 { MS_NOTRUNC, "MS_NOTRUNC" },
1166 { MS_GRPID, "MS_GRPID" },
1167 { MS_NODEV, "MS_NODEV" },
1168 { MS_BEFORE, "MS_BEFORE" },
1169 { MS_AFTER, "MS_AFTER" },
1173 static struct xlat nfs_flags[] = {
1174 { NFSMNT_SOFT, "NFSMNT_SOFT" },
1175 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
1176 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
1177 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
1178 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
1179 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
1180 #ifdef NFSMNT_NOINT /* IRIX 6 */
1181 { NFSMNT_NOINT, "NFSMNT_NOINT" },
1183 #ifdef NFSMNT_INT /* IRIX 5 */
1184 { NFSMNT_INT, "NFSMNT_INT" },
1186 { NFSMNT_NOAC, "NFSMNT_NOAC" },
1187 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
1188 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
1189 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
1190 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
1191 { NFSMNT_PRIVATE, "NFSMNT_PRIVATE" },
1192 { NFSMNT_SYMTTL, "NFSMNT_SYMTTL" },
1193 { NFSMNT_LOOPBACK, "NFSMNT_LOOPBACK" },
1194 { NFSMNT_BASETYPE, "NFSMNT_BASETYPE" },
1195 { NFSMNT_NAMEMAX, "NFSMNT_NAMEMAX" },
1196 #ifdef NFSMNT_SHORTUID /* IRIX 6 */
1197 { NFSMNT_SHORTUID, "NFSMNT_SHORTUID" },
1199 #ifdef NFSMNT_ASYNCNLM /* IRIX 6 */
1200 { NFSMNT_ASYNCNLM, "NFSMNT_ASYNCNLM" },
1209 if (entering(tcp)) {
1210 printpath(tcp, tcp->u_arg[0]);
1212 printpath(tcp, tcp->u_arg[1]);
1214 printflags(mount_flags, tcp->u_arg[2]);
1215 if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
1217 tprintf("%ld", tcp->u_arg[3]);
1219 if (tcp->u_arg[2] & MS_DATA) {
1220 int nfs_type = sysfs(GETFSIND, FSID_NFS);
1223 if (tcp->u_arg[3] == nfs_type) {
1224 struct nfs_args args;
1225 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1226 tprintf("%#lx", tcp->u_arg[4]);
1229 printsock(tcp, (int) args.addr);
1230 tprintf(", flags=");
1231 if (!printflags(nfs_flags, args.flags))
1232 tprintf("NFSMNT_???");
1233 tprintf(", hostname=");
1234 printstr(tcp, (int) args.hostname, -1);
1239 tprintf("%#lx", tcp->u_arg[4]);
1240 tprintf(", %ld", tcp->u_arg[5]);
1250 #include <sys/types.h>
1251 #include <sys/fstyp.h>
1252 #include <sys/mount.h>
1253 #include <sys/xti.h>
1256 #include <nfs/mount.h>
1258 #include <sys/fs/vx_ioctl.h>
1260 static struct xlat mount_flags[] = {
1261 { MS_RDONLY, "MS_RDONLY" },
1262 { MS_FSS, "MS_FSS" },
1263 { MS_DATA, "MS_DATA" },
1264 { MS_HADBAD, "MS_HADBAD" },
1265 { MS_NOSUID, "MS_NOSUID" },
1266 { MS_REMOUNT, "MS_REMOUNT" },
1267 { MS_NOTRUNC, "MS_NOTRUNC" },
1268 { MS_SOFTMNT, "MS_SOFTMNT" },
1269 { MS_SYSSPACE, "MS_SYSSPACE" },
1274 static struct xlat vxfs_flags[] = {
1275 { VX_MS_NOLOG, "VX_MS_NOLOG" },
1276 { VX_MS_BLKCLEAR, "VX_MS_BLKCLEAR" },
1277 { VX_MS_SNAPSHOT, "VX_MS_SNAPSHOT" },
1278 { VX_MS_NODATAINLOG, "VX_MS_NODATAINLOG" },
1279 { VX_MS_DELAYLOG, "VX_MS_DELAYLOG" },
1280 { VX_MS_TMPLOG, "VX_MS_TMPLOG" },
1281 { VX_MS_FILESET, "VX_MS_FILESET" },
1283 { VX_MS_CACHE_DIRECT, "VX_MS_CACHE_DIRECT" },
1284 { VX_MS_CACHE_DSYNC, "VX_MS_CACHE_DSYNC" },
1285 { VX_MS_CACHE_CLOSESYNC,"VX_MS_CACHE_CLOSESYNC" },
1286 { VX_MS_CACHE_TMPCACHE, "VX_MS_CACHE_TMPCACHE" },
1288 { VX_MS_OSYNC_DIRECT, "VX_MS_OSYNC_DIRECT" },
1289 { VX_MS_OSYNC_DSYNC, "VX_MS_OSYNC_DSYNC" },
1290 { VX_MS_OSYNC_CLOSESYNC,"VX_MS_OSYNC_CLOSESYNC" },
1291 { VX_MS_OSYNC_DELAY, "VX_MS_OSYNC_DELAY" },
1296 static struct xlat nfs_flags[] = {
1297 { NFSMNT_SOFT, "NFSMNT_SOFT" },
1298 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
1299 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
1300 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
1301 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
1302 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
1303 { NFSMNT_INT, "NFSMNT_INT" },
1304 { NFSMNT_NOAC, "NFSMNT_NOAC" },
1305 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
1306 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
1307 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
1308 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
1309 { NFSMNT_SECURE, "NFSMNT_SECURE" },
1310 { NFSMNT_NOCTO, "NFSMNT_NOCTO" },
1311 { NFSMNT_GRPID, "NFSMNT_GRPID" },
1312 { NFSMNT_RPCTIMESYNC, "NFSMNT_RPCTIMESYNC" },
1313 { NFSMNT_LWPSMAX, "NFSMNT_LWPSMAX" },
1321 if (entering(tcp)) {
1322 char fstyp [FSTYPSZ];
1323 printpath(tcp, tcp->u_arg[0]);
1325 printpath(tcp, tcp->u_arg[1]);
1327 printflags(mount_flags, tcp->u_arg[2]);
1328 /* The doc sez that the file system type is given as a
1329 fsindex, and we should use sysfs to work out the name.
1330 This appears to be untrue for UW. Maybe it's untrue
1332 if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
1333 if (umovestr(tcp, tcp->u_arg[3], FSTYPSZ, fstyp) < 0) {
1335 tprintf(", %ld", tcp->u_arg[3]);
1338 tprintf(", \"%s\"", fstyp);
1340 if (tcp->u_arg[2] & MS_DATA) {
1343 /* On UW7 they don't give us the defines and structs
1344 we need to see what is going on. Bummer. */
1345 if (strcmp (fstyp, "vxfs") == 0) {
1346 struct vx_mountargs5 args;
1347 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1348 tprintf("%#lx", tcp->u_arg[4]);
1350 tprintf("{ flags=");
1351 if (!printflags(vxfs_flags, args.mflags))
1352 tprintf("0x%08x", args.mflags);
1353 if (args.mflags & VX_MS_SNAPSHOT) {
1354 tprintf (", snapof=");
1356 (long) args.primaryspec,
1358 if (args.snapsize > 0)
1359 tprintf (", snapsize=%ld", args.snapsize);
1366 if (strcmp (fstyp, "specfs") == 0) {
1368 printstr (tcp, tcp->u_arg[4], -1);
1371 if (strcmp (fstyp, "nfs") == 0) {
1372 struct nfs_args args;
1373 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1374 tprintf("%#lx", tcp->u_arg[4]);
1378 if (umove (tcp, (int) args.addr, &addr) < 0) {
1379 tprintf ("%#lx", (long) args.addr);
1382 printsock(tcp, (int) addr.buf, addr.len);
1384 tprintf(", flags=");
1385 if (!printflags(nfs_flags, args.flags))
1386 tprintf("NFSMNT_???");
1387 tprintf(", hostname=");
1388 printstr(tcp, (int) args.hostname, -1);
1393 tprintf("%#lx", tcp->u_arg[4]);
1394 tprintf(", %ld", tcp->u_arg[5]);
1400 #else /* !UNIXWARE */
1406 if (entering(tcp)) {
1407 printpath(tcp, tcp->u_arg[0]);
1409 printpath(tcp, tcp->u_arg[1]);
1414 #endif /* !UNIXWARE */
1422 static struct xlat capabilities[] = {
1423 { 1<<CAP_CHOWN, "CAP_CHOWN" },
1424 { 1<<CAP_DAC_OVERRIDE, "CAP_DAC_OVERRIDE"},
1425 { 1<<CAP_DAC_READ_SEARCH,"CAP_DAC_READ_SEARCH"},
1426 { 1<<CAP_FOWNER, "CAP_FOWNER" },
1427 { 1<<CAP_FSETID, "CAP_FSETID" },
1428 { 1<<CAP_KILL, "CAP_KILL" },
1429 { 1<<CAP_SETGID, "CAP_SETGID" },
1430 { 1<<CAP_SETUID, "CAP_SETUID" },
1431 { 1<<CAP_SETPCAP, "CAP_SETPCAP" },
1432 { 1<<CAP_LINUX_IMMUTABLE,"CAP_LINUX_IMMUTABLE"},
1433 { 1<<CAP_NET_BIND_SERVICE,"CAP_NET_BIND_SERVICE"},
1434 { 1<<CAP_NET_BROADCAST, "CAP_NET_BROADCAST"},
1435 { 1<<CAP_NET_ADMIN, "CAP_NET_ADMIN" },
1436 { 1<<CAP_NET_RAW, "CAP_NET_RAW" },
1437 { 1<<CAP_IPC_LOCK, "CAP_IPC_LOCK" },
1438 { 1<<CAP_IPC_OWNER, "CAP_IPC_OWNER" },
1439 { 1<<CAP_SYS_MODULE, "CAP_SYS_MODULE"},
1440 { 1<<CAP_SYS_RAWIO, "CAP_SYS_RAWIO" },
1441 { 1<<CAP_SYS_CHROOT, "CAP_SYS_CHROOT"},
1442 { 1<<CAP_SYS_PTRACE, "CAP_SYS_PTRACE"},
1443 { 1<<CAP_SYS_PACCT, "CAP_SYS_PACCT" },
1444 { 1<<CAP_SYS_ADMIN, "CAP_SYS_ADMIN" },
1445 { 1<<CAP_SYS_BOOT, "CAP_SYS_BOOT" },
1446 { 1<<CAP_SYS_NICE, "CAP_SYS_NICE" },
1447 { 1<<CAP_SYS_RESOURCE, "CAP_SYS_RESOURCE"},
1448 { 1<<CAP_SYS_TIME, "CAP_SYS_TIME" },
1449 { 1<<CAP_SYS_TTY_CONFIG,"CAP_SYS_TTY_CONFIG"},
1458 static cap_user_header_t arg0 = NULL;
1459 static cap_user_data_t arg1 = NULL;
1461 if(!entering(tcp)) {
1463 if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
1464 fprintf(stderr, "sys_capget: no memory\n");
1465 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1470 if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
1471 fprintf(stderr, "sys_capget: no memory\n");
1472 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1479 else if (!verbose(tcp))
1480 tprintf("%#lx", tcp->u_arg[0]);
1481 else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
1484 tprintf("%#x, %d", arg0->version, arg0->pid);
1489 else if (!verbose(tcp))
1490 tprintf("%#lx", tcp->u_arg[1]);
1491 else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
1495 printflags(capabilities, arg1->effective);
1497 printflags(capabilities, arg1->permitted);
1499 printflags(capabilities, arg1->inheritable);
1510 static cap_user_header_t arg0 = NULL;
1511 static cap_user_data_t arg1 = NULL;
1515 if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
1516 fprintf(stderr, "sys_capset: no memory\n");
1517 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1522 if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
1523 fprintf(stderr, "sys_capset: no memory\n");
1524 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1531 else if (!verbose(tcp))
1532 tprintf("%#lx", tcp->u_arg[0]);
1533 else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
1536 tprintf("%#x, %d", arg0->version, arg0->pid);
1541 else if (!verbose(tcp))
1542 tprintf("%#lx", tcp->u_arg[1]);
1543 else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
1547 printflags(capabilities, arg1->effective);
1549 printflags(capabilities, arg1->permitted);
1551 printflags(capabilities, arg1->inheritable);
1563 return printargs(tcp);
1569 return printargs(tcp);
1575 static struct xlat sysctl_root[] = {
1576 { CTL_KERN, "CTL_KERN" },
1577 { CTL_VM, "CTL_VM" },
1578 { CTL_NET, "CTL_NET" },
1579 { CTL_PROC, "CTL_PROC" },
1580 { CTL_FS, "CTL_FS" },
1581 { CTL_DEBUG, "CTL_DEBUG" },
1582 { CTL_DEV, "CTL_DEV" },
1586 static struct xlat sysctl_kern[] = {
1587 { KERN_OSTYPE, "KERN_OSTYPE" },
1588 { KERN_OSRELEASE, "KERN_OSRELEASE" },
1589 { KERN_OSREV, "KERN_OSREV" },
1590 { KERN_VERSION, "KERN_VERSION" },
1591 { KERN_SECUREMASK, "KERN_SECUREMASK" },
1592 { KERN_PROF, "KERN_PROF" },
1593 { KERN_NODENAME, "KERN_NODENAME" },
1594 { KERN_DOMAINNAME, "KERN_DOMAINNAME" },
1595 #ifdef KERN_SECURELVL
1596 { KERN_SECURELVL, "KERN_SECURELVL" },
1598 { KERN_PANIC, "KERN_PANIC" },
1599 #ifdef KERN_REALROOTDEV
1600 { KERN_REALROOTDEV, "KERN_REALROOTDEV" },
1602 #ifdef KERN_JAVA_INTERPRETER
1603 { KERN_JAVA_INTERPRETER, "KERN_JAVA_INTERPRETER" },
1605 #ifdef KERN_JAVA_APPLETVIEWER
1606 { KERN_JAVA_APPLETVIEWER, "KERN_JAVA_APPLETVIEWER" },
1608 { KERN_SPARC_REBOOT, "KERN_SPARC_REBOOT" },
1609 { KERN_CTLALTDEL, "KERN_CTLALTDEL" },
1610 { KERN_PRINTK, "KERN_PRINTK" },
1611 { KERN_NAMETRANS, "KERN_NAMETRANS" },
1612 { KERN_PPC_HTABRECLAIM, "KERN_PPC_HTABRECLAIM" },
1613 { KERN_PPC_ZEROPAGED, "KERN_PPC_ZEROPAGED" },
1614 { KERN_PPC_POWERSAVE_NAP, "KERN_PPC_POWERSAVE_NAP" },
1615 { KERN_MODPROBE, "KERN_MODPROBE" },
1616 { KERN_SG_BIG_BUFF, "KERN_SG_BIG_BUFF" },
1617 { KERN_ACCT, "KERN_ACCT" },
1618 { KERN_PPC_L2CR, "KERN_PPC_L2CR" },
1619 { KERN_RTSIGNR, "KERN_RTSIGNR" },
1620 { KERN_RTSIGMAX, "KERN_RTSIGMAX" },
1621 { KERN_SHMMAX, "KERN_SHMMAX" },
1622 { KERN_MSGMAX, "KERN_MSGMAX" },
1623 { KERN_MSGMNB, "KERN_MSGMNB" },
1624 { KERN_MSGPOOL, "KERN_MSGPOOL" },
1628 static struct xlat sysctl_vm[] = {
1629 { VM_SWAPCTL, "VM_SWAPCTL" },
1630 { VM_SWAPOUT, "VM_SWAPOUT" },
1631 { VM_FREEPG, "VM_FREEPG" },
1632 { VM_BDFLUSH, "VM_BDFLUSH" },
1633 { VM_OVERCOMMIT_MEMORY, "VM_OVERCOMMIT_MEMORY" },
1634 { VM_BUFFERMEM, "VM_BUFFERMEM" },
1635 { VM_PAGECACHE, "VM_PAGECACHE" },
1636 { VM_PAGERDAEMON, "VM_PAGERDAEMON" },
1637 { VM_PGT_CACHE, "VM_PGT_CACHE" },
1638 { VM_PAGE_CLUSTER, "VM_PAGE_CLUSTER" },
1642 static struct xlat sysctl_net[] = {
1643 { NET_CORE, "NET_CORE" },
1644 { NET_ETHER, "NET_ETHER" },
1645 { NET_802, "NET_802" },
1646 { NET_UNIX, "NET_UNIX" },
1647 { NET_IPV4, "NET_IPV4" },
1648 { NET_IPX, "NET_IPX" },
1649 { NET_ATALK, "NET_ATALK" },
1650 { NET_NETROM, "NET_NETROM" },
1651 { NET_AX25, "NET_AX25" },
1652 { NET_BRIDGE, "NET_BRIDGE" },
1653 { NET_ROSE, "NET_ROSE" },
1654 { NET_IPV6, "NET_IPV6" },
1655 { NET_X25, "NET_X25" },
1656 { NET_TR, "NET_TR" },
1657 { NET_DECNET, "NET_DECNET" },
1661 static struct xlat sysctl_net_core[] = {
1662 { NET_CORE_WMEM_MAX, "NET_CORE_WMEM_MAX" },
1663 { NET_CORE_RMEM_MAX, "NET_CORE_RMEM_MAX" },
1664 { NET_CORE_WMEM_DEFAULT, "NET_CORE_WMEM_DEFAULT" },
1665 { NET_CORE_RMEM_DEFAULT, "NET_CORE_RMEM_DEFAULT" },
1666 { NET_CORE_MAX_BACKLOG, "NET_CORE_MAX_BACKLOG" },
1667 { NET_CORE_FASTROUTE, "NET_CORE_FASTROUTE" },
1668 { NET_CORE_MSG_COST, "NET_CORE_MSG_COST" },
1669 { NET_CORE_MSG_BURST, "NET_CORE_MSG_BURST" },
1670 { NET_CORE_OPTMEM_MAX, "NET_CORE_OPTMEM_MAX" },
1674 static struct xlat sysctl_net_unix[] = {
1675 { NET_UNIX_DESTROY_DELAY, "NET_UNIX_DESTROY_DELAY" },
1676 { NET_UNIX_DELETE_DELAY, "NET_UNIX_DELETE_DELAY" },
1680 static struct xlat sysctl_net_ipv4[] = {
1681 { NET_IPV4_FORWARD, "NET_IPV4_FORWARD" },
1682 { NET_IPV4_DYNADDR, "NET_IPV4_DYNADDR" },
1683 { NET_IPV4_CONF, "NET_IPV4_CONF" },
1684 { NET_IPV4_NEIGH, "NET_IPV4_NEIGH" },
1685 { NET_IPV4_ROUTE, "NET_IPV4_ROUTE" },
1686 { NET_IPV4_FIB_HASH, "NET_IPV4_FIB_HASH" },
1687 { NET_IPV4_TCP_TIMESTAMPS, "NET_IPV4_TCP_TIMESTAMPS" },
1688 { NET_IPV4_TCP_WINDOW_SCALING, "NET_IPV4_TCP_WINDOW_SCALING" },
1689 { NET_IPV4_TCP_SACK, "NET_IPV4_TCP_SACK" },
1690 { NET_IPV4_TCP_RETRANS_COLLAPSE, "NET_IPV4_TCP_RETRANS_COLLAPSE" },
1691 { NET_IPV4_DEFAULT_TTL, "NET_IPV4_DEFAULT_TTL" },
1692 { NET_IPV4_AUTOCONFIG, "NET_IPV4_AUTOCONFIG" },
1693 { NET_IPV4_NO_PMTU_DISC, "NET_IPV4_NO_PMTU_DISC" },
1694 { NET_IPV4_TCP_SYN_RETRIES, "NET_IPV4_TCP_SYN_RETRIES" },
1695 { NET_IPV4_IPFRAG_HIGH_THRESH, "NET_IPV4_IPFRAG_HIGH_THRESH" },
1696 { NET_IPV4_IPFRAG_LOW_THRESH, "NET_IPV4_IPFRAG_LOW_THRESH" },
1697 { NET_IPV4_IPFRAG_TIME, "NET_IPV4_IPFRAG_TIME" },
1698 { NET_IPV4_TCP_MAX_KA_PROBES, "NET_IPV4_TCP_MAX_KA_PROBES" },
1699 { NET_IPV4_TCP_KEEPALIVE_TIME, "NET_IPV4_TCP_KEEPALIVE_TIME" },
1700 { NET_IPV4_TCP_KEEPALIVE_PROBES, "NET_IPV4_TCP_KEEPALIVE_PROBES" },
1701 { NET_IPV4_TCP_RETRIES1, "NET_IPV4_TCP_RETRIES1" },
1702 { NET_IPV4_TCP_RETRIES2, "NET_IPV4_TCP_RETRIES2" },
1703 { NET_IPV4_TCP_FIN_TIMEOUT, "NET_IPV4_TCP_FIN_TIMEOUT" },
1704 { NET_IPV4_IP_MASQ_DEBUG, "NET_IPV4_IP_MASQ_DEBUG" },
1705 { NET_TCP_SYNCOOKIES, "NET_TCP_SYNCOOKIES" },
1706 { NET_TCP_STDURG, "NET_TCP_STDURG" },
1707 { NET_TCP_RFC1337, "NET_TCP_RFC1337" },
1708 { NET_TCP_SYN_TAILDROP, "NET_TCP_SYN_TAILDROP" },
1709 { NET_TCP_MAX_SYN_BACKLOG, "NET_TCP_MAX_SYN_BACKLOG" },
1710 { NET_IPV4_LOCAL_PORT_RANGE, "NET_IPV4_LOCAL_PORT_RANGE" },
1711 { NET_IPV4_ICMP_ECHO_IGNORE_ALL, "NET_IPV4_ICMP_ECHO_IGNORE_ALL" },
1712 { NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, "NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS" },
1713 { NET_IPV4_ICMP_SOURCEQUENCH_RATE, "NET_IPV4_ICMP_SOURCEQUENCH_RATE" },
1714 { NET_IPV4_ICMP_DESTUNREACH_RATE, "NET_IPV4_ICMP_DESTUNREACH_RATE" },
1715 { NET_IPV4_ICMP_TIMEEXCEED_RATE, "NET_IPV4_ICMP_TIMEEXCEED_RATE" },
1716 { NET_IPV4_ICMP_PARAMPROB_RATE, "NET_IPV4_ICMP_PARAMPROB_RATE" },
1717 { NET_IPV4_ICMP_ECHOREPLY_RATE, "NET_IPV4_ICMP_ECHOREPLY_RATE" },
1718 { NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES, "NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES" },
1719 { NET_IPV4_IGMP_MAX_MEMBERSHIPS, "NET_IPV4_IGMP_MAX_MEMBERSHIPS" },
1723 static struct xlat sysctl_net_ipv4_route[] = {
1724 { NET_IPV4_ROUTE_FLUSH, "NET_IPV4_ROUTE_FLUSH" },
1725 { NET_IPV4_ROUTE_MIN_DELAY, "NET_IPV4_ROUTE_MIN_DELAY" },
1726 { NET_IPV4_ROUTE_MAX_DELAY, "NET_IPV4_ROUTE_MAX_DELAY" },
1727 { NET_IPV4_ROUTE_GC_THRESH, "NET_IPV4_ROUTE_GC_THRESH" },
1728 { NET_IPV4_ROUTE_MAX_SIZE, "NET_IPV4_ROUTE_MAX_SIZE" },
1729 { NET_IPV4_ROUTE_GC_MIN_INTERVAL, "NET_IPV4_ROUTE_GC_MIN_INTERVAL" },
1730 { NET_IPV4_ROUTE_GC_TIMEOUT, "NET_IPV4_ROUTE_GC_TIMEOUT" },
1731 { NET_IPV4_ROUTE_GC_INTERVAL, "NET_IPV4_ROUTE_GC_INTERVAL" },
1732 { NET_IPV4_ROUTE_REDIRECT_LOAD, "NET_IPV4_ROUTE_REDIRECT_LOAD" },
1733 { NET_IPV4_ROUTE_REDIRECT_NUMBER, "NET_IPV4_ROUTE_REDIRECT_NUMBER" },
1734 { NET_IPV4_ROUTE_REDIRECT_SILENCE, "NET_IPV4_ROUTE_REDIRECT_SILENCE" },
1735 { NET_IPV4_ROUTE_ERROR_COST, "NET_IPV4_ROUTE_ERROR_COST" },
1736 { NET_IPV4_ROUTE_ERROR_BURST, "NET_IPV4_ROUTE_ERROR_BURST" },
1737 { NET_IPV4_ROUTE_GC_ELASTICITY, "NET_IPV4_ROUTE_GC_ELASTICITY" },
1741 static struct xlat sysctl_net_ipv4_conf[] = {
1742 { NET_IPV4_CONF_FORWARDING, "NET_IPV4_CONF_FORWARDING" },
1743 { NET_IPV4_CONF_MC_FORWARDING, "NET_IPV4_CONF_MC_FORWARDING" },
1744 { NET_IPV4_CONF_PROXY_ARP, "NET_IPV4_CONF_PROXY_ARP" },
1745 { NET_IPV4_CONF_ACCEPT_REDIRECTS, "NET_IPV4_CONF_ACCEPT_REDIRECTS" },
1746 { NET_IPV4_CONF_SECURE_REDIRECTS, "NET_IPV4_CONF_SECURE_REDIRECTS" },
1747 { NET_IPV4_CONF_SEND_REDIRECTS, "NET_IPV4_CONF_SEND_REDIRECTS" },
1748 { NET_IPV4_CONF_SHARED_MEDIA, "NET_IPV4_CONF_SHARED_MEDIA" },
1749 { NET_IPV4_CONF_RP_FILTER, "NET_IPV4_CONF_RP_FILTER" },
1750 { NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, "NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE" },
1751 { NET_IPV4_CONF_BOOTP_RELAY, "NET_IPV4_CONF_BOOTP_RELAY" },
1752 { NET_IPV4_CONF_LOG_MARTIANS, "NET_IPV4_CONF_LOG_MARTIANS" },
1756 static struct xlat sysctl_net_ipv6[] = {
1757 { NET_IPV6_CONF, "NET_IPV6_CONF" },
1758 { NET_IPV6_NEIGH, "NET_IPV6_NEIGH" },
1759 { NET_IPV6_ROUTE, "NET_IPV6_ROUTE" },
1763 static struct xlat sysctl_net_ipv6_route[] = {
1764 { NET_IPV6_ROUTE_FLUSH, "NET_IPV6_ROUTE_FLUSH" },
1765 { NET_IPV6_ROUTE_GC_THRESH, "NET_IPV6_ROUTE_GC_THRESH" },
1766 { NET_IPV6_ROUTE_MAX_SIZE, "NET_IPV6_ROUTE_MAX_SIZE" },
1767 { NET_IPV6_ROUTE_GC_MIN_INTERVAL, "NET_IPV6_ROUTE_GC_MIN_INTERVAL" },
1768 { NET_IPV6_ROUTE_GC_TIMEOUT, "NET_IPV6_ROUTE_GC_TIMEOUT" },
1769 { NET_IPV6_ROUTE_GC_INTERVAL, "NET_IPV6_ROUTE_GC_INTERVAL" },
1770 { NET_IPV6_ROUTE_GC_ELASTICITY, "NET_IPV6_ROUTE_GC_ELASTICITY" },
1778 struct __sysctl_args info;
1780 umove (tcp, tcp->u_arg[0], &info);
1782 name = alloca (sizeof (int) * info.nlen);
1783 umoven(tcp, (size_t) info.name, sizeof (int) * info.nlen, (char *) name);
1785 if (entering(tcp)) {
1792 printxval(sysctl_root, name[0], "CTL_???");
1800 printxval(sysctl_kern, name[1], "KERN_???");
1805 printxval(sysctl_vm, name[1], "VM_???");
1810 printxval(sysctl_net, name[1], "NET_???");
1818 printxval(sysctl_net_core, name[2],
1823 printxval(sysctl_net_unix, name[2],
1828 printxval(sysctl_net_ipv4, name[2],
1834 case NET_IPV4_ROUTE:
1836 printxval(sysctl_net_ipv4_route,
1838 "NET_IPV4_ROUTE_???");
1842 printxval(sysctl_net_ipv4_conf,
1844 "NET_IPV4_CONF_???");
1852 printxval(sysctl_net_ipv6, name[2],
1858 case NET_IPV6_ROUTE:
1860 printxval(sysctl_net_ipv6_route,
1862 "NET_IPV6_ROUTE_???");
1876 while (cnt < info.nlen)
1877 tprintf(", %x", name[cnt++]);
1878 tprintf("}, %d, ", info.nlen);
1881 umove(tcp, (size_t)info.oldlenp, &oldlen);
1883 && ((name[0] == CTL_KERN
1884 && (name[1] == KERN_OSRELEASE
1885 || name[1] == KERN_OSTYPE
1886 #ifdef KERN_JAVA_INTERPRETER
1887 || name[1] == KERN_JAVA_INTERPRETER
1889 #ifdef KERN_JAVA_APPLETVIEWER
1890 || name[1] == KERN_JAVA_APPLETVIEWER
1893 printpath(tcp, (size_t)info.oldval);
1894 tprintf(", %Zu, ", oldlen);
1895 if (info.newval == 0)
1897 else if (syserror(tcp))
1898 tprintf("%p", info.newval);
1900 printpath(tcp, (size_t)info.newval);
1901 tprintf(", %Zd", info.newlen);
1903 tprintf("%p, %Zd, %p, %Zd", info.oldval, oldlen,
1904 info.newval, info.newlen);
1914 return printargs(tcp);
1919 #include <sys/sysctl.h>
1921 int sys___sysctl(tcp)
1924 int qoid[CTL_MAXNAME+2];
1929 if (entering(tcp)) {
1930 if (tcp->u_arg[1] < 0 || tcp->u_arg[1] > CTL_MAXNAME ||
1931 (umoven(tcp, tcp->u_arg[0], tcp->u_arg[1] * sizeof(int),
1932 (char *) (qoid + 2)) < 0))
1935 /* Use sysctl to ask the name of the current MIB
1936 This uses the undocumented "Staff-functions" used
1937 by the sysctl program. See kern_sysctl.c for
1939 qoid[0] = 0; /* sysctl */
1940 qoid[1] = 1; /* name */
1943 if (sysctl(qoid, tcp->u_arg[1] + 2, ctl, &i, 0, 0) >= 0) {
1944 numeric = !abbrev(tcp);
1945 tprintf("%s%s", ctl, numeric ? ", " : "");
1949 for (i = 0; i < tcp->u_arg[1]; i++)
1950 tprintf("%s%d", i ? "." : "", qoid[i + 2]);
1953 tprintf("%lu, ", tcp->u_arg[1]);
1956 if (!syserror(tcp) && (umove(tcp, tcp->u_arg[3], &len) >= 0)) {
1957 printstr(tcp, tcp->u_arg[2], len);
1958 tprintf(", [%u], ", len);
1960 tprintf("%#lx, %#lx, ", tcp->u_arg[2], tcp->u_arg[3]);
1961 printstr(tcp, tcp->u_arg[4], tcp->u_arg[5]);
1962 tprintf(", %lu", tcp->u_arg[5]);
1970 #include <sys/ksym.h>
1971 #include <sys/elf.h>
1973 static struct xlat ksym_flags[] = {
1974 { STT_NOTYPE, "STT_NOTYPE" },
1975 { STT_FUNC, "STT_FUNC" },
1976 { STT_OBJECT, "STT_OBJECT" },
1984 if (entering (tcp)) {
1985 printstr(tcp, tcp->u_arg[0], -1);
1989 if (syserror(tcp)) {
1990 tprintf("%#lx, %#lx",
1991 tcp->u_arg[1], tcp->u_arg[2]);
1995 printnum (tcp, tcp->u_arg[1], "%#lx");
1997 if (umove(tcp, tcp->u_arg[2], &val) < 0) {
1998 tprintf("%#lx", tcp->u_arg[2]);
2002 printxval (ksym_flags, val, "STT_???");
2011 #ifdef HAVE_SYS_NSCSYS_H
2014 #include <sys/nscsys.h>
2016 static struct xlat ssi_cmd [] = {
2017 { SSISYS_BADOP, "SSISYS_BADOP" },
2018 { SSISYS_LDLVL_INIT,"SSISYS_LDLVL_INIT"},
2019 { SSISYS_LDLVL_GETVEC,"SSISYS_LDLVL_GETVEC"},
2020 { SSISYS_LDLVL_PUTVEC,"SSISYS_LDLVL_PUTVEC"},
2021 { SSISYS_LDLVL_PUTRCMDS,"SSISYS_LDLVL_PUTRCMDS"},
2022 { SSISYS_LDLVL_SETREXEC,"SSISYS_LDLVL_SETREXEC"},
2023 { SSISYS_CMS_CLUSTERID,"SSISYS_CMS_CLUSTERID"},
2024 { SSISYS_CFS_STATVFS,"SSISYS_CFS_STATVFS"},
2025 { SSISYS_NODE_GETNUM,"SSISYS_NODE_GETNUM"},
2026 { SSISYS_NODE_TABLE,"SSISYS_NODE_TABLE"},
2027 { SSISYS_NODE_DOWN,"SSISYS_NODE_DOWN"},
2028 { SSISYS_RECLAIM_CHILD,"SSISYS_RECLAIM_CHILD"},
2029 { SSISYS_IPC_GETINFO,"SSISYS_IPC_GETINFO"},
2030 { SSISYS_ICS_TEST,"SSISYS_ICS_TEST"},
2031 { SSISYS_NODE_PID,"SSISYS_NODE_PID"},
2032 { SSISYS_ISLOCAL,"SSISYS_ISLOCAL"},
2033 { SSISYS_CFS_ISSTACKED,"SSISYS_CFS_ISSTACKED"},
2034 { SSISYS_DNET_SYNC,"SSISYS_DNET_SYNC"},
2035 { SSISYS_CFS_WAIT_MODE,"SSISYS_CFS_WAIT_MODE"},
2036 { SSISYS_CFS_UMOUNT,"SSISYS_CFS_UMOUNT"},
2037 { SSISYS_LLSTAT,"SSISYS_LLSTAT" },
2038 { SSISYS_LTS_PERFTEST,"SSISYS_LTS_PERFTEST"},
2039 { SSISYS_LTS_CONFIG,"SSISYS_LTS_CONFIG"},
2040 { SSISYS_SNET_PERFTEST,"SSISYS_SNET_PERFTEST"},
2041 { SSISYS_IGNORE_HALFUP,"SSISYS_IGNORE_HALFUP"},
2042 { SSISYS_NODE_ROOTDEV,"SSISYS_NODE_ROOTDEV"},
2043 { SSISYS_GET_PRIMARY,"SSISYS_GET_PRIMARY"},
2044 { SSISYS_GET_SECONDARY,"SSISYS_GET_SECONDARY"},
2045 { SSISYS_GET_ROOTDISK,"SSISYS_GET_ROOTDISK"},
2046 { SSISYS_CLUSTERNODE_NUM,"SSISYS_CLUSTERNODE_NUM"},
2047 { SSISYS_CLUSTER_MEMBERSHIP,"SSISYS_CLUSTER_MEMBERSHIP"},
2048 { SSISYS_CLUSTER_DETAILEDTRANS,"SSISYS_CLUSTER_DETAILEDTRANS"},
2049 { SSISYS_CLUSTERNODE_INFO,"SSISYS_CLUSTERNODE_INFO"},
2050 { SSISYS_CLUSTERNODE_SETINFO,"SSISYS_CLUSTERNODE_SETINFO"},
2051 { SSISYS_CLUSTERNODE_AVAIL,"SSISYS_CLUSTERNODE_AVAIL"},
2052 { SSISYS_CLUSTER_MAXNODES,"SSISYS_CLUSTER_MAXNODES"},
2053 { SSISYS_SET_MEMPRIO,"SSISYS_SET_MEMPRIO"},
2054 { SSISYS_GET_USERS,"SSISYS_GET_USERS"},
2055 { SSISYS_FORCE_ROOT_NODE,"SSISYS_FORCE_ROOT_NODE"},
2056 { SSISYS_CVIP_SET,"SSISYS_CVIP_SET"},
2057 { SSISYS_CVIP_GET,"SSISYS_CVIP_GET"},
2058 { SSISYS_GET_NODE_COUNTS,"SSISYS_GET_NODE_COUNTS"},
2059 { SSISYS_GET_TRANSPORT,"SSISYS_GET_TRANSPORT"},
2063 int sys_ssisys (tcp)
2066 struct ssisys_iovec iov;
2067 cls_nodeinfo_args_t cni;
2068 clusternode_info_t info;
2070 if (entering (tcp)) {
2071 ts_reclaim_child_inargs_t trc;
2072 if (tcp->u_arg[1] != sizeof iov ||
2073 umove (tcp, tcp->u_arg[0], &iov) < 0)
2075 tprintf ("%#lx, %ld", tcp->u_arg[0], tcp->u_arg[1]);
2079 printxval(ssi_cmd, iov.tio_id.id_cmd, "SSISYS_???");
2080 tprintf (":%d", iov.tio_id.id_ver);
2081 switch (iov.tio_id.id_cmd) {
2082 case SSISYS_RECLAIM_CHILD:
2083 if (iov.tio_udatainlen != sizeof trc ||
2084 umove (tcp, (long) iov.tio_udatain, &trc) < 0)
2086 tprintf (", in={pid=%ld, start=%ld}",
2087 trc.trc_pid, trc.trc_start);
2089 case SSISYS_CLUSTERNODE_INFO:
2090 if (iov.tio_udatainlen != sizeof cni ||
2091 umove (tcp, (long) iov.tio_udatain, &cni) < 0)
2093 tprintf (", in={node=%ld, len=%d}",
2094 cni.nodenum, cni.info_len);
2098 if (iov.tio_udatainlen) {
2099 tprintf (", in=[/* %d bytes */]",
2100 iov.tio_udatainlen);
2105 if (tcp->u_arg[1] != sizeof iov ||
2106 umove (tcp, tcp->u_arg[0], &iov) < 0)
2108 switch (iov.tio_id.id_cmd) {
2109 case SSISYS_CLUSTERNODE_INFO:
2110 if (iov.tio_udatainlen != sizeof cni ||
2111 umove (tcp, (long) iov.tio_udatain, &cni) < 0)
2113 if (cni.info_len != sizeof info ||
2114 iov.tio_udataoutlen != sizeof &info ||
2115 umove (tcp, (long) iov.tio_udataout, &info) < 0)
2117 tprintf (", out={node=%ld, cpus=%d, online=%d}",
2118 info.node_num, info.node_totalcpus,
2119 info.node_onlinecpus);
2124 if (iov.tio_udataoutlen) {
2125 tprintf (", out=[/* %d bytes */]",
2126 iov.tio_udataoutlen);
2130 tprintf ("}, %ld", tcp->u_arg[1]);
2137 #endif /* UNIXWARE > 2 */
2141 #ifndef __NEW_UTS_LEN
2142 #define __NEW_UTS_LEN 64
2145 static struct xlat sysmips_operations[] = {
2146 { SETNAME, "SETNAME" },
2147 { FLUSH_CACHE, "FLUSH_CACHE" },
2148 { MIPS_FIXADE, "MIPS_FIXADE" },
2149 { MIPS_RDNVRAM, "MIPS_RDNVRAM" },
2150 { MIPS_ATOMIC_SET, "MIPS_ATOMIC_SET" },
2154 int sys_sysmips(tcp)
2157 if (entering(tcp)) {
2158 printxval(sysmips_operations, tcp->u_arg[0], "???");
2159 if (!verbose(tcp)) {
2160 tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
2161 } else if (tcp->u_arg[0]==SETNAME) {
2162 char nodename[__NEW_UTS_LEN + 1];
2163 if (umovestr(tcp, tcp->u_arg[1], (__NEW_UTS_LEN + 1), nodename) < 0)
2164 tprintf(", %#lx", tcp->u_arg[1]);
2166 tprintf(", \"%s\"", nodename);
2167 } else if (tcp->u_arg[0] == MIPS_ATOMIC_SET) {
2168 tprintf(", %#lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]);
2169 } else if (tcp->u_arg[0] == MIPS_FIXADE) {
2170 tprintf(", 0x%lx", tcp->u_arg[1]);
2172 tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);