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 #include <linux/sysctl.h>
73 static struct xlat mount_flags[] = {
74 { MS_RDONLY, "MS_RDONLY" },
75 { MS_NOSUID, "MS_NOSUID" },
76 { MS_NODEV, "MS_NODEV" },
77 { MS_NOEXEC, "MS_NOEXEC" },
79 { MS_SYNCHRONOUS,"MS_SYNCHRONOUS"},
81 { MS_SYNC, "MS_SYNC" },
83 { MS_REMOUNT, "MS_REMOUNT" },
92 printpath(tcp, tcp->u_arg[0]);
94 printpath(tcp, tcp->u_arg[1]);
96 printpath(tcp, tcp->u_arg[2]);
98 printflags(mount_flags, tcp->u_arg[3]);
99 tprintf(", %#lx", tcp->u_arg[4]);
109 printstr(tcp, tcp->u_arg[0], -1);
111 if (tcp->u_arg[1] & 1)
112 tprintf("MNT_FORCE");
119 static struct xlat personality_options[] = {
121 { PER_LINUX, "PER_LINUX" },
123 #ifdef PER_LINUX_32BIT
124 { PER_LINUX_32BIT, "PER_LINUX" },
127 { PER_SVR4, "PER_SVR4" },
130 { PER_SVR3, "PER_SVR3" },
133 { PER_SCOSVR3, "PER_SCOSVR3" },
136 { PER_WYSEV386, "PER_WYSEV386" },
139 { PER_ISCR4, "PER_ISCR4" },
142 { PER_BSD, "PER_BSD" },
145 { PER_XENIX, "PER_XENIX" },
155 printxval(personality_options, tcp->u_arg[0], "PER_???");
159 #include <linux/reboot.h>
160 static struct xlat bootflags1[] = {
161 { LINUX_REBOOT_MAGIC1, "LINUX_REBOOT_MAGIC1" },
165 static struct xlat bootflags2[] = {
166 { LINUX_REBOOT_MAGIC2, "LINUX_REBOOT_MAGIC2" },
167 { LINUX_REBOOT_MAGIC2A, "LINUX_REBOOT_MAGIC2A" },
168 { LINUX_REBOOT_MAGIC2B, "LINUX_REBOOT_MAGIC2B" },
172 static struct xlat bootflags3[] = {
173 { LINUX_REBOOT_CMD_CAD_OFF, "LINUX_REBOOT_CMD_CAD_OFF" },
174 { LINUX_REBOOT_CMD_RESTART, "LINUX_REBOOT_CMD_RESTART" },
175 { LINUX_REBOOT_CMD_HALT, "LINUX_REBOOT_CMD_HALT" },
176 { LINUX_REBOOT_CMD_CAD_ON, "LINUX_REBOOT_CMD_CAD_ON" },
177 { LINUX_REBOOT_CMD_POWER_OFF, "LINUX_REBOOT_CMD_POWER_OFF" },
178 { LINUX_REBOOT_CMD_RESTART2, "LINUX_REBOOT_CMD_RESTART2" },
187 if (!printflags(bootflags1, tcp->u_arg[0]))
188 tprintf("LINUX_REBOOT_MAGIC???");
190 if (!printflags(bootflags2, tcp->u_arg[1]))
191 tprintf("LINUX_REBOOT_MAGIC???");
193 if (!printflags(bootflags3, tcp->u_arg[2]))
194 tprintf("LINUX_REBOOT_CMD_???");
195 if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) {
197 printstr(tcp, tcp->u_arg[3], -1);
204 static struct xlat cacheflush_scope[] = {
205 #ifdef FLUSH_SCOPE_LINE
206 { FLUSH_SCOPE_LINE, "FLUSH_SCOPE_LINE" },
208 #ifdef FLUSH_SCOPE_PAGE
209 { FLUSH_SCOPE_PAGE, "FLUSH_SCOPE_PAGE" },
211 #ifdef FLUSH_SCOPE_ALL
212 { FLUSH_SCOPE_ALL, "FLUSH_SCOPE_ALL" },
217 static struct xlat cacheflush_flags[] = {
218 #ifdef FLUSH_CACHE_BOTH
219 { FLUSH_CACHE_BOTH, "FLUSH_CACHE_BOTH" },
221 #ifdef FLUSH_CACHE_DATA
222 { FLUSH_CACHE_DATA, "FLUSH_CACHE_DATA" },
224 #ifdef FLUSH_CACHE_INSN
225 { FLUSH_CACHE_INSN, "FLUSH_CACHE_INSN" },
236 tprintf("%#lx, ", tcp->u_arg[0]);
238 printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
241 printflags(cacheflush_flags, tcp->u_arg[2]);
243 tprintf(", %lu", tcp->u_arg[3]);
253 #include <sys/reboot.h>
258 #include <sys/mount.h>
259 #include <sys/socket.h>
260 #include <nfs/export.h>
261 #include <rpc/types.h>
262 #include <rpc/auth.h>
272 static struct xlat bootflags[] = {
273 { RB_AUTOBOOT, "RB_AUTOBOOT" }, /* for system auto-booting itself */
274 { RB_ASKNAME, "RB_ASKNAME" }, /* ask for file name to reboot from */
275 { RB_SINGLE, "RB_SINGLE" }, /* reboot to single user only */
276 { RB_NOSYNC, "RB_NOSYNC" }, /* dont sync before reboot */
277 { RB_HALT, "RB_HALT" }, /* don't reboot, just halt */
278 { RB_INITNAME, "RB_INITNAME" }, /* name given for /etc/init */
279 { RB_NOBOOTRC, "RB_NOBOOTRC" }, /* don't run /etc/rc.boot */
280 { RB_DEBUG, "RB_DEBUG" }, /* being run under debugger */
281 { RB_DUMP, "RB_DUMP" }, /* dump system core */
282 { RB_WRITABLE, "RB_WRITABLE" }, /* mount root read/write */
283 { RB_STRING, "RB_STRING" }, /* pass boot args to prom monitor */
292 if (!printflags(bootflags, tcp->u_arg[0]))
294 if (tcp->u_arg[0] & RB_STRING) {
295 printstr(tcp, tcp->u_arg[1], -1);
306 printstr(tcp, tcp->u_arg[0], -1);
316 printstr(tcp, tcp->u_arg[0], -1);
326 printsock(tcp, tcp->u_arg[0]);
331 static struct xlat mountflags[] = {
332 { M_RDONLY, "M_RDONLY" },
333 { M_NOSUID, "M_NOSUID" },
334 { M_NEWTYPE, "M_NEWTYPE" },
335 { M_GRPID, "M_GRPID" },
337 { M_REMOUNT, "M_REMOUNT" },
340 { M_NOSUB, "M_NOSUB" },
343 { M_MULTI, "M_MULTI" },
346 { M_SYS5, "M_SYS5" },
351 static struct xlat nfsflags[] = {
352 { NFSMNT_SOFT, "NFSMNT_SOFT" },
353 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
354 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
355 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
356 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
357 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
358 { NFSMNT_INT, "NFSMNT_INT" },
359 { NFSMNT_NOAC, "NFSMNT_NOAC" },
360 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
361 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
362 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
363 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
365 { NFSMNT_SECURE, "NFSMNT_SECURE" },
368 { NFSMNT_NOCTO, "NFSMNT_NOCTO" },
371 { NFSMNT_POSIX, "NFSMNT_POSIX" },
383 if (!(tcp->u_arg[2] & M_NEWTYPE) || umovestr(tcp,
384 tcp->u_arg[0], sizeof type, type) < 0) {
385 tprintf("OLDTYPE:#%lx", tcp->u_arg[0]);
387 tprintf("\"%s\", ", type);
389 printstr(tcp, tcp->u_arg[1], -1);
391 if (!printflags(mountflags, tcp->u_arg[2] & ~M_NEWTYPE))
395 if (strcmp(type, "4.2") == 0) {
397 if (umove(tcp, tcp->u_arg[3], &a) < 0)
399 printstr(tcp, (int)a.fspec, -1);
400 } else if (strcmp(type, "lo") == 0) {
402 if (umove(tcp, tcp->u_arg[3], &a) < 0)
404 printstr(tcp, (int)a.fsdir, -1);
405 } else if (strcmp(type, "nfs") == 0) {
407 if (umove(tcp, tcp->u_arg[3], &a) < 0)
410 printsock(tcp, (int) a.addr);
412 if (!printflags(nfsflags, a.flags))
413 tprintf("NFSMNT_???");
414 tprintf(", ws:%u,rs:%u,to:%u,re:%u,",
415 a.wsize, a.rsize, a.timeo, a.retrans);
416 if (a.flags & NFSMNT_HOSTNAME && a.hostname)
417 printstr(tcp, (int)a.hostname, -1);
419 tprintf("%#lx", (unsigned long) a.hostname);
420 tprintf(",reg-min:%u,max:%u,dir-min:%u,max:%u,",
421 a.acregmin, a.acregmax, a.acdirmin, a.acdirmax);
422 if ((a.flags & NFSMNT_SECURE) && a.netname)
423 printstr(tcp, (int) a.netname, -1);
425 tprintf("%#lx", (unsigned long) a.netname);
427 } else if (strcmp(type, "rfs") == 0) {
430 if (umove(tcp, tcp->u_arg[3], &a) < 0)
433 printstr(tcp, (int)a.rmtfs, -1);
434 if (umove(tcp, (int)a.token, &t) < 0)
436 tprintf(", %u, %s]", t.t_id, t.t_uname);
437 } else if (strcmp(type, "pcfs") == 0) {
439 if (umove(tcp, tcp->u_arg[3], &a) < 0)
441 printstr(tcp, (int)a.fspec, -1);
452 printstr(tcp, tcp->u_arg[0], -1);
461 return sys_unmount(tcp);
468 /* XXX - no information available */
469 return printargs(tcp);
472 static struct xlat ex_auth_flags[] = {
473 { AUTH_UNIX, "AUTH_UNIX" },
474 { AUTH_DES, "AUTH_DES" },
486 printstr(tcp, tcp->u_arg[0], -1);
487 if (umove(tcp, tcp->u_arg[1], &e) < 0) {
488 tprintf("%#lx", tcp->u_arg[1]);
491 tprintf("{fl:%u, anon:%u, ", e.ex_flags, e.ex_anon);
492 printxval(ex_auth_flags, e.ex_auth, "AUTH_???");
493 tprintf(", roots:[");
494 if (e.ex_auth == AUTH_UNIX) {
495 for (i=0; i<e.ex_u.exunix.rootaddrs.naddrs; i++) {
497 (int)&e.ex_u.exunix.rootaddrs.addrvec[i]);
499 tprintf("], writers:[");
500 for (i=0; i<e.ex_writeaddrs.naddrs; i++) {
502 (int)&e.ex_writeaddrs.addrvec[i]);
506 for (i=0; i<e.ex_u.exdes.nnames; i++) {
508 (int)&e.ex_u.exdes.rootnames[i]);
511 tprintf("], window:%u", e.ex_u.exdes.window);
518 static struct xlat sysconflimits[] = {
520 { _SC_ARG_MAX, "_SC_ARG_MAX" }, /* space for argv & envp */
523 { _SC_CHILD_MAX, "_SC_CHILD_MAX" }, /* maximum children per process??? */
526 { _SC_CLK_TCK, "_SC_CLK_TCK" }, /* clock ticks/sec */
528 #ifdef _SC_NGROUPS_MAX
529 { _SC_NGROUPS_MAX, "_SC_NGROUPS_MAX" }, /* number of groups if multple supp. */
532 { _SC_OPEN_MAX, "_SC_OPEN_MAX" }, /* max open files per process */
534 #ifdef _SC_JOB_CONTROL
535 { _SC_JOB_CONTROL, "_SC_JOB_CONTROL" }, /* do we have job control */
538 { _SC_SAVED_IDS, "_SC_SAVED_IDS" }, /* do we have saved uid/gids */
541 { _SC_VERSION, "_SC_VERSION" }, /* POSIX version supported */
551 printxval(sysconflimits, tcp->u_arg[0], "_SC_???");
558 #if defined(SUNOS4) || defined(FREEBSD)
559 static struct xlat pathconflimits[] = {
561 { _PC_LINK_MAX, "_PC_LINK_MAX" }, /* max links to file/dir */
564 { _PC_MAX_CANON, "_PC_MAX_CANON" }, /* max line length */
567 { _PC_MAX_INPUT, "_PC_MAX_INPUT" }, /* max "packet" to a tty device */
570 { _PC_NAME_MAX, "_PC_NAME_MAX" }, /* max pathname component length */
573 { _PC_PATH_MAX, "_PC_PATH_MAX" }, /* max pathname length */
576 { _PC_PIPE_BUF, "_PC_PIPE_BUF" }, /* size of a pipe */
578 #ifdef _PC_CHOWN_RESTRICTED
579 { _PC_CHOWN_RESTRICTED, "_PC_CHOWN_RESTRICTED" }, /* can we give away files */
582 { _PC_NO_TRUNC, "_PC_NO_TRUNC" }, /* trunc or error on >NAME_MAX */
585 { _PC_VDISABLE, "_PC_VDISABLE" }, /* best char to shut off tty c_cc */
596 printstr(tcp, tcp->u_arg[0], -1);
598 printxval(pathconflimits, tcp->u_arg[1], "_PC_???");
608 tprintf("%lu, ", tcp->u_arg[0]);
609 printxval(pathconflimits, tcp->u_arg[1], "_PC_???");
614 #endif /* SUNOS4 || FREEBSD */
618 #ifdef HAVE_SYS_SYSCONFIG_H
619 #include <sys/sysconfig.h>
620 #endif /* HAVE_SYS_SYSCONFIG_H */
622 #include <sys/mount.h>
623 #include <sys/systeminfo.h>
624 #include <sys/utsname.h>
626 static struct xlat sysconfig_options[] = {
627 #ifdef _CONFIG_NGROUPS
628 { _CONFIG_NGROUPS, "_CONFIG_NGROUPS" },
630 #ifdef _CONFIG_CHILD_MAX
631 { _CONFIG_CHILD_MAX, "_CONFIG_CHILD_MAX" },
633 #ifdef _CONFIG_OPEN_FILES
634 { _CONFIG_OPEN_FILES, "_CONFIG_OPEN_FILES" },
636 #ifdef _CONFIG_POSIX_VER
637 { _CONFIG_POSIX_VER, "_CONFIG_POSIX_VER" },
639 #ifdef _CONFIG_PAGESIZE
640 { _CONFIG_PAGESIZE, "_CONFIG_PAGESIZE" },
642 #ifdef _CONFIG_CLK_TCK
643 { _CONFIG_CLK_TCK, "_CONFIG_CLK_TCK" },
645 #ifdef _CONFIG_XOPEN_VER
646 { _CONFIG_XOPEN_VER, "_CONFIG_XOPEN_VER" },
648 #ifdef _CONFIG_PROF_TCK
649 { _CONFIG_PROF_TCK, "_CONFIG_PROF_TCK" },
651 #ifdef _CONFIG_NPROC_CONF
652 { _CONFIG_NPROC_CONF, "_CONFIG_NPROC_CONF" },
654 #ifdef _CONFIG_NPROC_ONLN
655 { _CONFIG_NPROC_ONLN, "_CONFIG_NPROC_ONLN" },
657 #ifdef _CONFIG_AIO_LISTIO_MAX
658 { _CONFIG_AIO_LISTIO_MAX, "_CONFIG_AIO_LISTIO_MAX" },
660 #ifdef _CONFIG_AIO_MAX
661 { _CONFIG_AIO_MAX, "_CONFIG_AIO_MAX" },
663 #ifdef _CONFIG_AIO_PRIO_DELTA_MAX
664 { _CONFIG_AIO_PRIO_DELTA_MAX, "_CONFIG_AIO_PRIO_DELTA_MAX" },
666 #ifdef _CONFIG_CONFIG_DELAYTIMER_MAX
667 { _CONFIG_DELAYTIMER_MAX, "_CONFIG_DELAYTIMER_MAX" },
669 #ifdef _CONFIG_MQ_OPEN_MAX
670 { _CONFIG_MQ_OPEN_MAX, "_CONFIG_MQ_OPEN_MAX" },
672 #ifdef _CONFIG_MQ_PRIO_MAX
673 { _CONFIG_MQ_PRIO_MAX, "_CONFIG_MQ_PRIO_MAX" },
675 #ifdef _CONFIG_RTSIG_MAX
676 { _CONFIG_RTSIG_MAX, "_CONFIG_RTSIG_MAX" },
678 #ifdef _CONFIG_SEM_NSEMS_MAX
679 { _CONFIG_SEM_NSEMS_MAX, "_CONFIG_SEM_NSEMS_MAX" },
681 #ifdef _CONFIG_SEM_VALUE_MAX
682 { _CONFIG_SEM_VALUE_MAX, "_CONFIG_SEM_VALUE_MAX" },
684 #ifdef _CONFIG_SIGQUEUE_MAX
685 { _CONFIG_SIGQUEUE_MAX, "_CONFIG_SIGQUEUE_MAX" },
687 #ifdef _CONFIG_SIGRT_MIN
688 { _CONFIG_SIGRT_MIN, "_CONFIG_SIGRT_MIN" },
690 #ifdef _CONFIG_SIGRT_MAX
691 { _CONFIG_SIGRT_MAX, "_CONFIG_SIGRT_MAX" },
693 #ifdef _CONFIG_TIMER_MAX
694 { _CONFIG_TIMER_MAX, "_CONFIG_TIMER_MAX" },
696 #ifdef _CONFIG_CONFIG_PHYS_PAGES
697 { _CONFIG_PHYS_PAGES, "_CONFIG_PHYS_PAGES" },
699 #ifdef _CONFIG_AVPHYS_PAGES
700 { _CONFIG_AVPHYS_PAGES, "_CONFIG_AVPHYS_PAGES" },
710 printxval(sysconfig_options, tcp->u_arg[0], "_CONFIG_???");
714 static struct xlat sysinfo_options[] = {
715 { SI_SYSNAME, "SI_SYSNAME" },
716 { SI_HOSTNAME, "SI_HOSTNAME" },
717 { SI_RELEASE, "SI_RELEASE" },
718 { SI_VERSION, "SI_VERSION" },
719 { SI_MACHINE, "SI_MACHINE" },
720 { SI_ARCHITECTURE, "SI_ARCHITECTURE" },
721 { SI_HW_SERIAL, "SI_HW_SERIAL" },
722 { SI_HW_PROVIDER, "SI_HW_PROVIDER" },
723 { SI_SRPC_DOMAIN, "SI_SRPC_DOMAIN" },
724 #ifdef SI_SET_HOSTNAME
725 { SI_SET_HOSTNAME, "SI_SET_HOSTNAME" },
727 #ifdef SI_SET_SRPC_DOMAIN
728 { SI_SET_SRPC_DOMAIN, "SI_SET_SRPC_DOMAIN" },
730 #ifdef SI_SET_KERB_REALM
731 { SI_SET_KERB_REALM, "SI_SET_KERB_REALM" },
734 { SI_KERB_REALM, "SI_KERB_REALM" },
744 printxval(sysinfo_options, tcp->u_arg[0], "SI_???");
748 /* Technically some calls write values. So what. */
750 tprintf("%#lx", tcp->u_arg[1]);
752 printpath(tcp, tcp->u_arg[1]);
753 tprintf(", %lu", tcp->u_arg[2]);
760 #include <sys/syssgi.h>
762 static struct xlat syssgi_options[] = {
763 { SGI_SYSID, "SGI_SYSID" },
765 { SGI_RDUBLK, "SGI_RDUBLK" },
767 { SGI_TUNE, "SGI_TUNE" },
768 { SGI_IDBG, "SGI_IDBG" },
769 { SGI_INVENT, "SGI_INVENT" },
770 { SGI_RDNAME, "SGI_RDNAME" },
771 { SGI_SETLED, "SGI_SETLED" },
772 { SGI_SETNVRAM, "SGI_SETNVRAM" },
773 { SGI_GETNVRAM, "SGI_GETNVRAM" },
774 { SGI_QUERY_FTIMER, "SGI_QUERY_FTIMER" },
775 { SGI_QUERY_CYCLECNTR, "SGI_QUERY_CYCLECNTR" },
776 { SGI_PROCSZ, "SGI_PROCSZ" },
777 { SGI_SIGACTION, "SGI_SIGACTION" },
778 { SGI_SIGPENDING, "SGI_SIGPENDING" },
779 { SGI_SIGPROCMASK, "SGI_SIGPROCMASK" },
780 { SGI_SIGSUSPEND, "SGI_SIGSUSPEND" },
781 { SGI_SETSID, "SGI_SETSID" },
782 { SGI_SETPGID, "SGI_SETPGID" },
783 { SGI_SYSCONF, "SGI_SYSCONF" },
784 { SGI_WAIT4, "SGI_WAIT4" },
785 { SGI_PATHCONF, "SGI_PATHCONF" },
786 { SGI_READB, "SGI_READB" },
787 { SGI_WRITEB, "SGI_WRITEB" },
788 { SGI_SETGROUPS, "SGI_SETGROUPS" },
789 { SGI_GETGROUPS, "SGI_GETGROUPS" },
790 { SGI_SETTIMEOFDAY, "SGI_SETTIMEOFDAY" },
791 { SGI_SETTIMETRIM, "SGI_SETTIMETRIM" },
792 { SGI_GETTIMETRIM, "SGI_GETTIMETRIM" },
793 { SGI_SPROFIL, "SGI_SPROFIL" },
794 { SGI_RUSAGE, "SGI_RUSAGE" },
795 { SGI_SIGSTACK, "SGI_SIGSTACK" },
796 { SGI_SIGSTATUS, "SGI_SIGSTATUS" },
797 { SGI_NETPROC, "SGI_NETPROC" },
798 { SGI_SIGALTSTACK, "SGI_SIGALTSTACK" },
799 { SGI_BDFLUSHCNT, "SGI_BDFLUSHCNT" },
800 { SGI_SSYNC, "SGI_SSYNC" },
801 { SGI_NFSCNVT, "SGI_NFSCNVT" },
802 { SGI_GETPGID, "SGI_GETPGID" },
803 { SGI_GETSID, "SGI_GETSID" },
804 { SGI_IOPROBE, "SGI_IOPROBE" },
805 { SGI_CONFIG, "SGI_CONFIG" },
806 { SGI_ELFMAP, "SGI_ELFMAP" },
807 { SGI_MCONFIG, "SGI_MCONFIG" },
808 { SGI_GETPLABEL, "SGI_GETPLABEL" },
809 { SGI_SETPLABEL, "SGI_SETPLABEL" },
810 { SGI_GETLABEL, "SGI_GETLABEL" },
811 { SGI_SETLABEL, "SGI_SETLABEL" },
812 { SGI_SATREAD, "SGI_SATREAD" },
813 { SGI_SATWRITE, "SGI_SATWRITE" },
814 { SGI_SATCTL, "SGI_SATCTL" },
815 { SGI_LOADATTR, "SGI_LOADATTR" },
816 { SGI_UNLOADATTR, "SGI_UNLOADATTR" },
818 { SGI_RECVLMSG, "SGI_RECVLMSG" },
820 { SGI_PLANGMOUNT, "SGI_PLANGMOUNT" },
821 { SGI_GETPSOACL, "SGI_GETPSOACL" },
822 { SGI_SETPSOACL, "SGI_SETPSOACL" },
823 #ifdef SGI_EAG_GET_ATTR
824 { SGI_EAG_GET_ATTR, "SGI_EAG_GET_ATTR" },
826 #ifdef SGI_EAG_SET_ATTR
827 { SGI_EAG_SET_ATTR, "SGI_EAG_SET_ATTR" },
829 #ifdef SGI_EAG_GET_PROCATTR
830 { SGI_EAG_GET_PROCATTR, "SGI_EAG_GET_PROCATTR" },
832 #ifdef SGI_EAG_SET_PROCATTR
833 { SGI_EAG_SET_PROCATTR, "SGI_EAG_SET_PROCATTR" },
836 { SGI_FREVOKE, "SGI_FREVOKE" },
838 #ifdef SGI_SBE_GET_INFO
839 { SGI_SBE_GET_INFO, "SGI_SBE_GET_INFO" },
841 #ifdef SGI_SBE_CLR_INFO
842 { SGI_SBE_CLR_INFO, "SGI_SBE_CLR_INFO" },
844 { SGI_RMI_FIXECC, "SGI_RMI_FIXECC" },
845 { SGI_R4K_CERRS, "SGI_R4K_CERRS" },
846 { SGI_GET_EVCONF, "SGI_GET_EVCONF" },
847 { SGI_MPCWAROFF, "SGI_MPCWAROFF" },
848 { SGI_SET_AUTOPWRON, "SGI_SET_AUTOPWRON" },
849 { SGI_SPIPE, "SGI_SPIPE" },
850 { SGI_SYMTAB, "SGI_SYMTAB" },
851 #ifdef SGI_SET_FPDEBUG
852 { SGI_SET_FPDEBUG, "SGI_SET_FPDEBUG" },
854 #ifdef SGI_SET_FP_PRECISE
855 { SGI_SET_FP_PRECISE, "SGI_SET_FP_PRECISE" },
857 { SGI_TOSSTSAVE, "SGI_TOSSTSAVE" },
858 { SGI_FDHI, "SGI_FDHI" },
859 #ifdef SGI_SET_CONFIG_SMM
860 { SGI_SET_CONFIG_SMM, "SGI_SET_CONFIG_SMM" },
862 #ifdef SGI_SET_FP_PRESERVE
863 { SGI_SET_FP_PRESERVE, "SGI_SET_FP_PRESERVE" },
865 { SGI_MINRSS, "SGI_MINRSS" },
867 { SGI_GRIO, "SGI_GRIO" },
869 #ifdef SGI_XLV_SET_TAB
870 { SGI_XLV_SET_TAB, "SGI_XLV_SET_TAB" },
872 #ifdef SGI_XLV_GET_TAB
873 { SGI_XLV_GET_TAB, "SGI_XLV_GET_TAB" },
875 #ifdef SGI_GET_FP_PRECISE
876 { SGI_GET_FP_PRECISE, "SGI_GET_FP_PRECISE" },
878 #ifdef SGI_GET_CONFIG_SMM
879 { SGI_GET_CONFIG_SMM, "SGI_GET_CONFIG_SMM" },
881 #ifdef SGI_FP_IMPRECISE_SUPP
882 { SGI_FP_IMPRECISE_SUPP,"SGI_FP_IMPRECISE_SUPP" },
884 #ifdef SGI_CONFIG_NSMM_SUPP
885 { SGI_CONFIG_NSMM_SUPP, "SGI_CONFIG_NSMM_SUPP" },
887 #ifdef SGI_RT_TSTAMP_CREATE
888 { SGI_RT_TSTAMP_CREATE, "SGI_RT_TSTAMP_CREATE" },
890 #ifdef SGI_RT_TSTAMP_DELETE
891 { SGI_RT_TSTAMP_DELETE, "SGI_RT_TSTAMP_DELETE" },
893 #ifdef SGI_RT_TSTAMP_START
894 { SGI_RT_TSTAMP_START, "SGI_RT_TSTAMP_START" },
896 #ifdef SGI_RT_TSTAMP_STOP
897 { SGI_RT_TSTAMP_STOP, "SGI_RT_TSTAMP_STOP" },
899 #ifdef SGI_RT_TSTAMP_ADDR
900 { SGI_RT_TSTAMP_ADDR, "SGI_RT_TSTAMP_ADDR" },
902 #ifdef SGI_RT_TSTAMP_MASK
903 { SGI_RT_TSTAMP_MASK, "SGI_RT_TSTAMP_MASK" },
905 #ifdef SGI_RT_TSTAMP_EOB_MODE
906 { SGI_RT_TSTAMP_EOB_MODE,"SGI_RT_TSTAMP_EOB_MODE"},
908 #ifdef SGI_USE_FP_BCOPY
909 { SGI_USE_FP_BCOPY, "SGI_USE_FP_BCOPY" },
912 { SGI_GET_UST, "SGI_GET_UST" },
914 #ifdef SGI_SPECULATIVE_EXEC
915 { SGI_SPECULATIVE_EXEC, "SGI_SPECULATIVE_EXEC" },
917 #ifdef SGI_XLV_NEXT_RQST
918 { SGI_XLV_NEXT_RQST, "SGI_XLV_NEXT_RQST" },
920 #ifdef SGI_XLV_ATTR_CURSOR
921 { SGI_XLV_ATTR_CURSOR, "SGI_XLV_ATTR_CURSOR" },
923 #ifdef SGI_XLV_ATTR_GET
924 { SGI_XLV_ATTR_GET, "SGI_XLV_ATTR_GET" },
926 #ifdef SGI_XLV_ATTR_SET
927 { SGI_XLV_ATTR_SET, "SGI_XLV_ATTR_SET" },
930 { SGI_BTOOLSIZE, "SGI_BTOOLSIZE" },
933 { SGI_BTOOLGET, "SGI_BTOOLGET" },
935 #ifdef SGI_BTOOLREINIT
936 { SGI_BTOOLREINIT, "SGI_BTOOLREINIT" },
938 #ifdef SGI_CREATE_UUID
939 { SGI_CREATE_UUID, "SGI_CREATE_UUID" },
942 { SGI_NOFPE, "SGI_NOFPE" },
944 #ifdef SGI_OLD_SOFTFP
945 { SGI_OLD_SOFTFP, "SGI_OLD_SOFTFP" },
947 #ifdef SGI_FS_INUMBERS
948 { SGI_FS_INUMBERS, "SGI_FS_INUMBERS" },
950 #ifdef SGI_FS_BULKSTAT
951 { SGI_FS_BULKSTAT, "SGI_FS_BULKSTAT" },
953 #ifdef SGI_RT_TSTAMP_WAIT
954 { SGI_RT_TSTAMP_WAIT, "SGI_RT_TSTAMP_WAIT" },
956 #ifdef SGI_RT_TSTAMP_UPDATE
957 { SGI_RT_TSTAMP_UPDATE, "SGI_RT_TSTAMP_UPDATE" },
959 #ifdef SGI_PATH_TO_HANDLE
960 { SGI_PATH_TO_HANDLE, "SGI_PATH_TO_HANDLE" },
962 #ifdef SGI_PATH_TO_FSHANDLE
963 { SGI_PATH_TO_FSHANDLE, "SGI_PATH_TO_FSHANDLE" },
965 #ifdef SGI_FD_TO_HANDLE
966 { SGI_FD_TO_HANDLE, "SGI_FD_TO_HANDLE" },
968 #ifdef SGI_OPEN_BY_HANDLE
969 { SGI_OPEN_BY_HANDLE, "SGI_OPEN_BY_HANDLE" },
971 #ifdef SGI_READLINK_BY_HANDLE
972 { SGI_READLINK_BY_HANDLE,"SGI_READLINK_BY_HANDLE"},
974 #ifdef SGI_READ_DANGID
975 { SGI_READ_DANGID, "SGI_READ_DANGID" },
978 { SGI_CONST, "SGI_CONST" },
980 #ifdef SGI_XFS_FSOPERATIONS
981 { SGI_XFS_FSOPERATIONS, "SGI_XFS_FSOPERATIONS" },
984 { SGI_SETASH, "SGI_SETASH" },
987 { SGI_GETASH, "SGI_GETASH" },
990 { SGI_SETPRID, "SGI_SETPRID" },
993 { SGI_GETPRID, "SGI_GETPRID" },
996 { SGI_SETSPINFO, "SGI_SETSPINFO" },
999 { SGI_GETSPINFO, "SGI_GETSPINFO" },
1002 { SGI_SHAREII, "SGI_SHAREII" },
1004 #ifdef SGI_NEWARRAYSESS
1005 { SGI_NEWARRAYSESS, "SGI_NEWARRAYSESS" },
1007 #ifdef SGI_GETDFLTPRID
1008 { SGI_GETDFLTPRID, "SGI_GETDFLTPRID" },
1010 #ifdef SGI_SET_DISMISSED_EXC_CNT
1011 { SGI_SET_DISMISSED_EXC_CNT,"SGI_SET_DISMISSED_EXC_CNT" },
1013 #ifdef SGI_GET_DISMISSED_EXC_CNT
1014 { SGI_GET_DISMISSED_EXC_CNT,"SGI_GET_DISMISSED_EXC_CNT" },
1016 #ifdef SGI_CYCLECNTR_SIZE
1017 { SGI_CYCLECNTR_SIZE, "SGI_CYCLECNTR_SIZE" },
1019 #ifdef SGI_QUERY_FASTTIMER
1020 { SGI_QUERY_FASTTIMER, "SGI_QUERY_FASTTIMER" },
1022 #ifdef SGI_PIDSINASH
1023 { SGI_PIDSINASH, "SGI_PIDSINASH" },
1026 { SGI_ULI, "SGI_ULI" },
1028 #ifdef SGI_LPG_SHMGET
1029 { SGI_LPG_SHMGET, "SGI_LPG_SHMGET" },
1032 { SGI_LPG_MAP, "SGI_LPG_MAP" },
1034 #ifdef SGI_CACHEFS_SYS
1035 { SGI_CACHEFS_SYS, "SGI_CACHEFS_SYS" },
1037 #ifdef SGI_NFSNOTIFY
1038 { SGI_NFSNOTIFY, "SGI_NFSNOTIFY" },
1041 { SGI_LOCKDSYS, "SGI_LOCKDSYS" },
1044 { SGI_EVENTCTR, "SGI_EVENTCTR" },
1046 #ifdef SGI_GETPRUSAGE
1047 { SGI_GETPRUSAGE, "SGI_GETPRUSAGE" },
1049 #ifdef SGI_PROCMASK_LOCATION
1050 { SGI_PROCMASK_LOCATION,"SGI_PROCMASK_LOCATION" },
1053 { SGI_UNUSED, "SGI_UNUSED" },
1056 { SGI_CKPT_SYS, "SGI_CKPT_SYS" },
1059 { SGI_CKPT_SYS, "SGI_CKPT_SYS" },
1061 #ifdef SGI_GETGRPPID
1062 { SGI_GETGRPPID, "SGI_GETGRPPID" },
1064 #ifdef SGI_GETSESPID
1065 { SGI_GETSESPID, "SGI_GETSESPID" },
1068 { SGI_ENUMASHS, "SGI_ENUMASHS" },
1070 #ifdef SGI_SETASMACHID
1071 { SGI_SETASMACHID, "SGI_SETASMACHID" },
1073 #ifdef SGI_GETASMACHID
1074 { SGI_GETASMACHID, "SGI_GETASMACHID" },
1076 #ifdef SGI_GETARSESS
1077 { SGI_GETARSESS, "SGI_GETARSESS" },
1079 #ifdef SGI_JOINARRAYSESS
1080 { SGI_JOINARRAYSESS, "SGI_JOINARRAYSESS" },
1082 #ifdef SGI_SPROC_KILL
1083 { SGI_SPROC_KILL, "SGI_SPROC_KILL" },
1085 #ifdef SGI_DBA_CONFIG
1086 { SGI_DBA_CONFIG, "SGI_DBA_CONFIG" },
1088 #ifdef SGI_RELEASE_NAME
1089 { SGI_RELEASE_NAME, "SGI_RELEASE_NAME" },
1091 #ifdef SGI_SYNCH_CACHE_HANDLER
1092 { SGI_SYNCH_CACHE_HANDLER,"SGI_SYNCH_CACHE_HANDLER"},
1094 #ifdef SGI_SWASH_INIT
1095 { SGI_SWASH_INIT, "SGI_SWASH_INIT" },
1097 #ifdef SGI_NUMA_MIGR_PAGE
1098 { SGI_NUMA_MIGR_PAGE, "SGI_NUMA_MIGR_PAGE" },
1100 #ifdef SGI_NUMA_MIGR_PAGE_ALT
1101 { SGI_NUMA_MIGR_PAGE_ALT,"SGI_NUMA_MIGR_PAGE_ALT"},
1103 #ifdef SGI_KAIO_USERINIT
1104 { SGI_KAIO_USERINIT, "SGI_KAIO_USERINIT" },
1106 #ifdef SGI_KAIO_READ
1107 { SGI_KAIO_READ, "SGI_KAIO_READ" },
1109 #ifdef SGI_KAIO_WRITE
1110 { SGI_KAIO_WRITE, "SGI_KAIO_WRITE" },
1112 #ifdef SGI_KAIO_SUSPEND
1113 { SGI_KAIO_SUSPEND, "SGI_KAIO_SUSPEND" },
1115 #ifdef SGI_KAIO_STATS
1116 { SGI_KAIO_STATS, "SGI_KAIO_STATS" },
1118 #ifdef SGI_INITIAL_PT_SPROC
1119 { SGI_INITIAL_PT_SPROC, "SGI_INITIAL_PT_SPROC" },
1130 if (entering(tcp)) {
1131 printxval(syssgi_options, tcp->u_arg[0], "SGI_???");
1132 switch (tcp->u_arg[0]) {
1134 for (i = 1; i < tcp->u_nargs; i++)
1135 tprintf(", %#lx", tcp->u_arg[i]);
1142 #include <sys/types.h>
1143 #include <rpc/rpc.h>
1146 #include <sys/fsid.h>
1147 #include <sys/vnode.h>
1148 #include <sys/fs/nfs.h>
1149 #include <sys/fs/nfs_clnt.h>
1151 static struct xlat mount_flags[] = {
1152 { MS_RDONLY, "MS_RDONLY" },
1153 { MS_FSS, "MS_FSS" },
1154 { MS_DATA, "MS_DATA" },
1155 { MS_NOSUID, "MS_NOSUID" },
1156 { MS_REMOUNT, "MS_REMOUNT" },
1157 { MS_NOTRUNC, "MS_NOTRUNC" },
1158 { MS_GRPID, "MS_GRPID" },
1159 { MS_NODEV, "MS_NODEV" },
1160 { MS_BEFORE, "MS_BEFORE" },
1161 { MS_AFTER, "MS_AFTER" },
1165 static struct xlat nfs_flags[] = {
1166 { NFSMNT_SOFT, "NFSMNT_SOFT" },
1167 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
1168 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
1169 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
1170 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
1171 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
1172 #ifdef NFSMNT_NOINT /* IRIX 6 */
1173 { NFSMNT_NOINT, "NFSMNT_NOINT" },
1175 #ifdef NFSMNT_INT /* IRIX 5 */
1176 { NFSMNT_INT, "NFSMNT_INT" },
1178 { NFSMNT_NOAC, "NFSMNT_NOAC" },
1179 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
1180 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
1181 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
1182 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
1183 { NFSMNT_PRIVATE, "NFSMNT_PRIVATE" },
1184 { NFSMNT_SYMTTL, "NFSMNT_SYMTTL" },
1185 { NFSMNT_LOOPBACK, "NFSMNT_LOOPBACK" },
1186 { NFSMNT_BASETYPE, "NFSMNT_BASETYPE" },
1187 { NFSMNT_NAMEMAX, "NFSMNT_NAMEMAX" },
1188 #ifdef NFSMNT_SHORTUID /* IRIX 6 */
1189 { NFSMNT_SHORTUID, "NFSMNT_SHORTUID" },
1191 #ifdef NFSMNT_ASYNCNLM /* IRIX 6 */
1192 { NFSMNT_ASYNCNLM, "NFSMNT_ASYNCNLM" },
1201 if (entering(tcp)) {
1202 printpath(tcp, tcp->u_arg[0]);
1204 printpath(tcp, tcp->u_arg[1]);
1206 printflags(mount_flags, tcp->u_arg[2]);
1207 if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
1209 tprintf("%ld", tcp->u_arg[3]);
1211 if (tcp->u_arg[2] & MS_DATA) {
1212 int nfs_type = sysfs(GETFSIND, FSID_NFS);
1215 if (tcp->u_arg[3] == nfs_type) {
1216 struct nfs_args args;
1217 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1218 tprintf("%#lx", tcp->u_arg[4]);
1221 printsock(tcp, (int) args.addr);
1222 tprintf(", flags=");
1223 if (!printflags(nfs_flags, args.flags))
1224 tprintf("NFSMNT_???");
1225 tprintf(", hostname=");
1226 printstr(tcp, (int) args.hostname, -1);
1231 tprintf("%#lx", tcp->u_arg[4]);
1232 tprintf(", %ld", tcp->u_arg[5]);
1242 #include <sys/types.h>
1243 #include <sys/fstyp.h>
1244 #include <sys/mount.h>
1245 #include <sys/xti.h>
1248 #include <nfs/mount.h>
1250 #include <sys/fs/vx_ioctl.h>
1252 static struct xlat mount_flags[] = {
1253 { MS_RDONLY, "MS_RDONLY" },
1254 { MS_FSS, "MS_FSS" },
1255 { MS_DATA, "MS_DATA" },
1256 { MS_HADBAD, "MS_HADBAD" },
1257 { MS_NOSUID, "MS_NOSUID" },
1258 { MS_REMOUNT, "MS_REMOUNT" },
1259 { MS_NOTRUNC, "MS_NOTRUNC" },
1260 { MS_SOFTMNT, "MS_SOFTMNT" },
1261 { MS_SYSSPACE, "MS_SYSSPACE" },
1266 static struct xlat vxfs_flags[] = {
1267 { VX_MS_NOLOG, "VX_MS_NOLOG" },
1268 { VX_MS_BLKCLEAR, "VX_MS_BLKCLEAR" },
1269 { VX_MS_SNAPSHOT, "VX_MS_SNAPSHOT" },
1270 { VX_MS_NODATAINLOG, "VX_MS_NODATAINLOG" },
1271 { VX_MS_DELAYLOG, "VX_MS_DELAYLOG" },
1272 { VX_MS_TMPLOG, "VX_MS_TMPLOG" },
1273 { VX_MS_FILESET, "VX_MS_FILESET" },
1275 { VX_MS_CACHE_DIRECT, "VX_MS_CACHE_DIRECT" },
1276 { VX_MS_CACHE_DSYNC, "VX_MS_CACHE_DSYNC" },
1277 { VX_MS_CACHE_CLOSESYNC,"VX_MS_CACHE_CLOSESYNC" },
1278 { VX_MS_CACHE_TMPCACHE, "VX_MS_CACHE_TMPCACHE" },
1280 { VX_MS_OSYNC_DIRECT, "VX_MS_OSYNC_DIRECT" },
1281 { VX_MS_OSYNC_DSYNC, "VX_MS_OSYNC_DSYNC" },
1282 { VX_MS_OSYNC_CLOSESYNC,"VX_MS_OSYNC_CLOSESYNC" },
1283 { VX_MS_OSYNC_DELAY, "VX_MS_OSYNC_DELAY" },
1288 static struct xlat nfs_flags[] = {
1289 { NFSMNT_SOFT, "NFSMNT_SOFT" },
1290 { NFSMNT_WSIZE, "NFSMNT_WSIZE" },
1291 { NFSMNT_RSIZE, "NFSMNT_RSIZE" },
1292 { NFSMNT_TIMEO, "NFSMNT_TIMEO" },
1293 { NFSMNT_RETRANS, "NFSMNT_RETRANS" },
1294 { NFSMNT_HOSTNAME, "NFSMNT_HOSTNAME" },
1295 { NFSMNT_INT, "NFSMNT_INT" },
1296 { NFSMNT_NOAC, "NFSMNT_NOAC" },
1297 { NFSMNT_ACREGMIN, "NFSMNT_ACREGMIN" },
1298 { NFSMNT_ACREGMAX, "NFSMNT_ACREGMAX" },
1299 { NFSMNT_ACDIRMIN, "NFSMNT_ACDIRMIN" },
1300 { NFSMNT_ACDIRMAX, "NFSMNT_ACDIRMAX" },
1301 { NFSMNT_SECURE, "NFSMNT_SECURE" },
1302 { NFSMNT_NOCTO, "NFSMNT_NOCTO" },
1303 { NFSMNT_GRPID, "NFSMNT_GRPID" },
1304 { NFSMNT_RPCTIMESYNC, "NFSMNT_RPCTIMESYNC" },
1305 { NFSMNT_LWPSMAX, "NFSMNT_LWPSMAX" },
1313 if (entering(tcp)) {
1314 char fstyp [FSTYPSZ];
1315 printpath(tcp, tcp->u_arg[0]);
1317 printpath(tcp, tcp->u_arg[1]);
1319 printflags(mount_flags, tcp->u_arg[2]);
1320 /* The doc sez that the file system type is given as a
1321 fsindex, and we should use sysfs to work out the name.
1322 This appears to be untrue for UW. Maybe it's untrue
1324 if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
1325 if (umovestr(tcp, tcp->u_arg[3], FSTYPSZ, fstyp) < 0) {
1327 tprintf(", %ld", tcp->u_arg[3]);
1330 tprintf(", \"%s\"", fstyp);
1332 if (tcp->u_arg[2] & MS_DATA) {
1335 /* On UW7 they don't give us the defines and structs
1336 we need to see what is going on. Bummer. */
1337 if (strcmp (fstyp, "vxfs") == 0) {
1338 struct vx_mountargs5 args;
1339 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1340 tprintf("%#lx", tcp->u_arg[4]);
1342 tprintf("{ flags=");
1343 if (!printflags(vxfs_flags, args.mflags))
1344 tprintf("0x%08x", args.mflags);
1345 if (args.mflags & VX_MS_SNAPSHOT) {
1346 tprintf (", snapof=");
1348 (long) args.primaryspec,
1350 if (args.snapsize > 0)
1351 tprintf (", snapsize=%ld", args.snapsize);
1358 if (strcmp (fstyp, "specfs") == 0) {
1360 printstr (tcp, tcp->u_arg[4], -1);
1363 if (strcmp (fstyp, "nfs") == 0) {
1364 struct nfs_args args;
1365 if (umove(tcp, tcp->u_arg[4], &args) < 0)
1366 tprintf("%#lx", tcp->u_arg[4]);
1370 if (umove (tcp, (int) args.addr, &addr) < 0) {
1371 tprintf ("%#lx", (long) args.addr);
1374 printsock(tcp, (int) addr.buf, addr.len);
1376 tprintf(", flags=");
1377 if (!printflags(nfs_flags, args.flags))
1378 tprintf("NFSMNT_???");
1379 tprintf(", hostname=");
1380 printstr(tcp, (int) args.hostname, -1);
1385 tprintf("%#lx", tcp->u_arg[4]);
1386 tprintf(", %ld", tcp->u_arg[5]);
1392 #else /* !UNIXWARE */
1398 if (entering(tcp)) {
1399 printpath(tcp, tcp->u_arg[0]);
1401 printpath(tcp, tcp->u_arg[1]);
1406 #endif /* !UNIXWARE */
1414 static struct xlat capabilities[] = {
1415 { 1<<CAP_CHOWN, "CAP_CHOWN" },
1416 { 1<<CAP_DAC_OVERRIDE, "CAP_DAC_OVERRIDE"},
1417 { 1<<CAP_DAC_READ_SEARCH,"CAP_DAC_READ_SEARCH"},
1418 { 1<<CAP_FOWNER, "CAP_FOWNER" },
1419 { 1<<CAP_FSETID, "CAP_FSETID" },
1420 { 1<<CAP_KILL, "CAP_KILL" },
1421 { 1<<CAP_SETGID, "CAP_SETGID" },
1422 { 1<<CAP_SETUID, "CAP_SETUID" },
1423 { 1<<CAP_SETPCAP, "CAP_SETPCAP" },
1424 { 1<<CAP_LINUX_IMMUTABLE,"CAP_LINUX_IMMUTABLE"},
1425 { 1<<CAP_NET_BIND_SERVICE,"CAP_NET_BIND_SERVICE"},
1426 { 1<<CAP_NET_BROADCAST, "CAP_NET_BROADCAST"},
1427 { 1<<CAP_NET_ADMIN, "CAP_NET_ADMIN" },
1428 { 1<<CAP_NET_RAW, "CAP_NET_RAW" },
1429 { 1<<CAP_IPC_LOCK, "CAP_IPC_LOCK" },
1430 { 1<<CAP_IPC_OWNER, "CAP_IPC_OWNER" },
1431 { 1<<CAP_SYS_MODULE, "CAP_SYS_MODULE"},
1432 { 1<<CAP_SYS_RAWIO, "CAP_SYS_RAWIO" },
1433 { 1<<CAP_SYS_CHROOT, "CAP_SYS_CHROOT"},
1434 { 1<<CAP_SYS_PTRACE, "CAP_SYS_PTRACE"},
1435 { 1<<CAP_SYS_PACCT, "CAP_SYS_PACCT" },
1436 { 1<<CAP_SYS_ADMIN, "CAP_SYS_ADMIN" },
1437 { 1<<CAP_SYS_BOOT, "CAP_SYS_BOOT" },
1438 { 1<<CAP_SYS_NICE, "CAP_SYS_NICE" },
1439 { 1<<CAP_SYS_RESOURCE, "CAP_SYS_RESOURCE"},
1440 { 1<<CAP_SYS_TIME, "CAP_SYS_TIME" },
1441 { 1<<CAP_SYS_TTY_CONFIG,"CAP_SYS_TTY_CONFIG"},
1450 static cap_user_header_t arg0 = NULL;
1451 static cap_user_data_t arg1 = NULL;
1453 if(!entering(tcp)) {
1455 if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
1456 fprintf(stderr, "sys_capget: no memory\n");
1457 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1462 if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
1463 fprintf(stderr, "sys_capget: no memory\n");
1464 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1471 else if (!verbose(tcp))
1472 tprintf("%#lx", tcp->u_arg[0]);
1473 else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
1476 tprintf("%#x, %d", arg0->version, arg0->pid);
1481 else if (!verbose(tcp))
1482 tprintf("%#lx", tcp->u_arg[1]);
1483 else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
1487 printflags(capabilities, arg1->effective);
1489 printflags(capabilities, arg1->permitted);
1491 printflags(capabilities, arg1->inheritable);
1502 static cap_user_header_t arg0 = NULL;
1503 static cap_user_data_t arg1 = NULL;
1507 if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
1508 fprintf(stderr, "sys_capset: no memory\n");
1509 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1514 if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
1515 fprintf(stderr, "sys_capset: no memory\n");
1516 tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
1523 else if (!verbose(tcp))
1524 tprintf("%#lx", tcp->u_arg[0]);
1525 else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
1528 tprintf("%#x, %d", arg0->version, arg0->pid);
1533 else if (!verbose(tcp))
1534 tprintf("%#lx", tcp->u_arg[1]);
1535 else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
1539 printflags(capabilities, arg1->effective);
1541 printflags(capabilities, arg1->permitted);
1543 printflags(capabilities, arg1->inheritable);
1555 return printargs(tcp);
1561 return printargs(tcp);
1567 static struct xlat sysctl_root[] = {
1568 { CTL_KERN, "CTL_KERN" },
1569 { CTL_VM, "CTL_VM" },
1570 { CTL_NET, "CTL_NET" },
1571 { CTL_PROC, "CTL_PROC" },
1572 { CTL_FS, "CTL_FS" },
1573 { CTL_DEBUG, "CTL_DEBUG" },
1574 { CTL_DEV, "CTL_DEV" },
1578 static struct xlat sysctl_kern[] = {
1579 { KERN_OSTYPE, "KERN_OSTYPE" },
1580 { KERN_OSRELEASE, "KERN_OSRELEASE" },
1581 { KERN_OSREV, "KERN_OSREV" },
1582 { KERN_VERSION, "KERN_VERSION" },
1583 { KERN_SECUREMASK, "KERN_SECUREMASK" },
1584 { KERN_PROF, "KERN_PROF" },
1585 { KERN_NODENAME, "KERN_NODENAME" },
1586 { KERN_DOMAINNAME, "KERN_DOMAINNAME" },
1587 #ifdef KERN_SECURELVL
1588 { KERN_SECURELVL, "KERN_SECURELVL" },
1590 { KERN_PANIC, "KERN_PANIC" },
1591 #ifdef KERN_REALROOTDEV
1592 { KERN_REALROOTDEV, "KERN_REALROOTDEV" },
1594 #ifdef KERN_JAVA_INTERPRETER
1595 { KERN_JAVA_INTERPRETER, "KERN_JAVA_INTERPRETER" },
1597 #ifdef KERN_JAVA_APPLETVIEWER
1598 { KERN_JAVA_APPLETVIEWER, "KERN_JAVA_APPLETVIEWER" },
1600 { KERN_SPARC_REBOOT, "KERN_SPARC_REBOOT" },
1601 { KERN_CTLALTDEL, "KERN_CTLALTDEL" },
1602 { KERN_PRINTK, "KERN_PRINTK" },
1603 { KERN_NAMETRANS, "KERN_NAMETRANS" },
1604 { KERN_PPC_HTABRECLAIM, "KERN_PPC_HTABRECLAIM" },
1605 { KERN_PPC_ZEROPAGED, "KERN_PPC_ZEROPAGED" },
1606 { KERN_PPC_POWERSAVE_NAP, "KERN_PPC_POWERSAVE_NAP" },
1607 { KERN_MODPROBE, "KERN_MODPROBE" },
1608 { KERN_SG_BIG_BUFF, "KERN_SG_BIG_BUFF" },
1609 { KERN_ACCT, "KERN_ACCT" },
1610 { KERN_PPC_L2CR, "KERN_PPC_L2CR" },
1611 { KERN_RTSIGNR, "KERN_RTSIGNR" },
1612 { KERN_RTSIGMAX, "KERN_RTSIGMAX" },
1613 { KERN_SHMMAX, "KERN_SHMMAX" },
1614 { KERN_MSGMAX, "KERN_MSGMAX" },
1615 { KERN_MSGMNB, "KERN_MSGMNB" },
1616 { KERN_MSGPOOL, "KERN_MSGPOOL" },
1620 static struct xlat sysctl_vm[] = {
1621 { VM_SWAPCTL, "VM_SWAPCTL" },
1622 { VM_SWAPOUT, "VM_SWAPOUT" },
1623 { VM_FREEPG, "VM_FREEPG" },
1624 { VM_BDFLUSH, "VM_BDFLUSH" },
1625 { VM_OVERCOMMIT_MEMORY, "VM_OVERCOMMIT_MEMORY" },
1626 { VM_BUFFERMEM, "VM_BUFFERMEM" },
1627 { VM_PAGECACHE, "VM_PAGECACHE" },
1628 { VM_PAGERDAEMON, "VM_PAGERDAEMON" },
1629 { VM_PGT_CACHE, "VM_PGT_CACHE" },
1630 { VM_PAGE_CLUSTER, "VM_PAGE_CLUSTER" },
1634 static struct xlat sysctl_net[] = {
1635 { NET_CORE, "NET_CORE" },
1636 { NET_ETHER, "NET_ETHER" },
1637 { NET_802, "NET_802" },
1638 { NET_UNIX, "NET_UNIX" },
1639 { NET_IPV4, "NET_IPV4" },
1640 { NET_IPX, "NET_IPX" },
1641 { NET_ATALK, "NET_ATALK" },
1642 { NET_NETROM, "NET_NETROM" },
1643 { NET_AX25, "NET_AX25" },
1644 { NET_BRIDGE, "NET_BRIDGE" },
1645 { NET_ROSE, "NET_ROSE" },
1646 { NET_IPV6, "NET_IPV6" },
1647 { NET_X25, "NET_X25" },
1648 { NET_TR, "NET_TR" },
1649 { NET_DECNET, "NET_DECNET" },
1653 static struct xlat sysctl_net_core[] = {
1654 { NET_CORE_WMEM_MAX, "NET_CORE_WMEM_MAX" },
1655 { NET_CORE_RMEM_MAX, "NET_CORE_RMEM_MAX" },
1656 { NET_CORE_WMEM_DEFAULT, "NET_CORE_WMEM_DEFAULT" },
1657 { NET_CORE_RMEM_DEFAULT, "NET_CORE_RMEM_DEFAULT" },
1658 { NET_CORE_MAX_BACKLOG, "NET_CORE_MAX_BACKLOG" },
1659 { NET_CORE_FASTROUTE, "NET_CORE_FASTROUTE" },
1660 { NET_CORE_MSG_COST, "NET_CORE_MSG_COST" },
1661 { NET_CORE_MSG_BURST, "NET_CORE_MSG_BURST" },
1662 { NET_CORE_OPTMEM_MAX, "NET_CORE_OPTMEM_MAX" },
1666 static struct xlat sysctl_net_unix[] = {
1667 { NET_UNIX_DESTROY_DELAY, "NET_UNIX_DESTROY_DELAY" },
1668 { NET_UNIX_DELETE_DELAY, "NET_UNIX_DELETE_DELAY" },
1672 static struct xlat sysctl_net_ipv4[] = {
1673 { NET_IPV4_FORWARD, "NET_IPV4_FORWARD" },
1674 { NET_IPV4_DYNADDR, "NET_IPV4_DYNADDR" },
1675 { NET_IPV4_CONF, "NET_IPV4_CONF" },
1676 { NET_IPV4_NEIGH, "NET_IPV4_NEIGH" },
1677 { NET_IPV4_ROUTE, "NET_IPV4_ROUTE" },
1678 { NET_IPV4_FIB_HASH, "NET_IPV4_FIB_HASH" },
1679 { NET_IPV4_TCP_TIMESTAMPS, "NET_IPV4_TCP_TIMESTAMPS" },
1680 { NET_IPV4_TCP_WINDOW_SCALING, "NET_IPV4_TCP_WINDOW_SCALING" },
1681 { NET_IPV4_TCP_SACK, "NET_IPV4_TCP_SACK" },
1682 { NET_IPV4_TCP_RETRANS_COLLAPSE, "NET_IPV4_TCP_RETRANS_COLLAPSE" },
1683 { NET_IPV4_DEFAULT_TTL, "NET_IPV4_DEFAULT_TTL" },
1684 { NET_IPV4_AUTOCONFIG, "NET_IPV4_AUTOCONFIG" },
1685 { NET_IPV4_NO_PMTU_DISC, "NET_IPV4_NO_PMTU_DISC" },
1686 { NET_IPV4_TCP_SYN_RETRIES, "NET_IPV4_TCP_SYN_RETRIES" },
1687 { NET_IPV4_IPFRAG_HIGH_THRESH, "NET_IPV4_IPFRAG_HIGH_THRESH" },
1688 { NET_IPV4_IPFRAG_LOW_THRESH, "NET_IPV4_IPFRAG_LOW_THRESH" },
1689 { NET_IPV4_IPFRAG_TIME, "NET_IPV4_IPFRAG_TIME" },
1690 { NET_IPV4_TCP_MAX_KA_PROBES, "NET_IPV4_TCP_MAX_KA_PROBES" },
1691 { NET_IPV4_TCP_KEEPALIVE_TIME, "NET_IPV4_TCP_KEEPALIVE_TIME" },
1692 { NET_IPV4_TCP_KEEPALIVE_PROBES, "NET_IPV4_TCP_KEEPALIVE_PROBES" },
1693 { NET_IPV4_TCP_RETRIES1, "NET_IPV4_TCP_RETRIES1" },
1694 { NET_IPV4_TCP_RETRIES2, "NET_IPV4_TCP_RETRIES2" },
1695 { NET_IPV4_TCP_FIN_TIMEOUT, "NET_IPV4_TCP_FIN_TIMEOUT" },
1696 { NET_IPV4_IP_MASQ_DEBUG, "NET_IPV4_IP_MASQ_DEBUG" },
1697 { NET_TCP_SYNCOOKIES, "NET_TCP_SYNCOOKIES" },
1698 { NET_TCP_STDURG, "NET_TCP_STDURG" },
1699 { NET_TCP_RFC1337, "NET_TCP_RFC1337" },
1700 { NET_TCP_SYN_TAILDROP, "NET_TCP_SYN_TAILDROP" },
1701 { NET_TCP_MAX_SYN_BACKLOG, "NET_TCP_MAX_SYN_BACKLOG" },
1702 { NET_IPV4_LOCAL_PORT_RANGE, "NET_IPV4_LOCAL_PORT_RANGE" },
1703 { NET_IPV4_ICMP_ECHO_IGNORE_ALL, "NET_IPV4_ICMP_ECHO_IGNORE_ALL" },
1704 { NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, "NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS" },
1705 { NET_IPV4_ICMP_SOURCEQUENCH_RATE, "NET_IPV4_ICMP_SOURCEQUENCH_RATE" },
1706 { NET_IPV4_ICMP_DESTUNREACH_RATE, "NET_IPV4_ICMP_DESTUNREACH_RATE" },
1707 { NET_IPV4_ICMP_TIMEEXCEED_RATE, "NET_IPV4_ICMP_TIMEEXCEED_RATE" },
1708 { NET_IPV4_ICMP_PARAMPROB_RATE, "NET_IPV4_ICMP_PARAMPROB_RATE" },
1709 { NET_IPV4_ICMP_ECHOREPLY_RATE, "NET_IPV4_ICMP_ECHOREPLY_RATE" },
1710 { NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES, "NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES" },
1711 { NET_IPV4_IGMP_MAX_MEMBERSHIPS, "NET_IPV4_IGMP_MAX_MEMBERSHIPS" },
1715 static struct xlat sysctl_net_ipv4_route[] = {
1716 { NET_IPV4_ROUTE_FLUSH, "NET_IPV4_ROUTE_FLUSH" },
1717 { NET_IPV4_ROUTE_MIN_DELAY, "NET_IPV4_ROUTE_MIN_DELAY" },
1718 { NET_IPV4_ROUTE_MAX_DELAY, "NET_IPV4_ROUTE_MAX_DELAY" },
1719 { NET_IPV4_ROUTE_GC_THRESH, "NET_IPV4_ROUTE_GC_THRESH" },
1720 { NET_IPV4_ROUTE_MAX_SIZE, "NET_IPV4_ROUTE_MAX_SIZE" },
1721 { NET_IPV4_ROUTE_GC_MIN_INTERVAL, "NET_IPV4_ROUTE_GC_MIN_INTERVAL" },
1722 { NET_IPV4_ROUTE_GC_TIMEOUT, "NET_IPV4_ROUTE_GC_TIMEOUT" },
1723 { NET_IPV4_ROUTE_GC_INTERVAL, "NET_IPV4_ROUTE_GC_INTERVAL" },
1724 { NET_IPV4_ROUTE_REDIRECT_LOAD, "NET_IPV4_ROUTE_REDIRECT_LOAD" },
1725 { NET_IPV4_ROUTE_REDIRECT_NUMBER, "NET_IPV4_ROUTE_REDIRECT_NUMBER" },
1726 { NET_IPV4_ROUTE_REDIRECT_SILENCE, "NET_IPV4_ROUTE_REDIRECT_SILENCE" },
1727 { NET_IPV4_ROUTE_ERROR_COST, "NET_IPV4_ROUTE_ERROR_COST" },
1728 { NET_IPV4_ROUTE_ERROR_BURST, "NET_IPV4_ROUTE_ERROR_BURST" },
1729 { NET_IPV4_ROUTE_GC_ELASTICITY, "NET_IPV4_ROUTE_GC_ELASTICITY" },
1733 static struct xlat sysctl_net_ipv4_conf[] = {
1734 { NET_IPV4_CONF_FORWARDING, "NET_IPV4_CONF_FORWARDING" },
1735 { NET_IPV4_CONF_MC_FORWARDING, "NET_IPV4_CONF_MC_FORWARDING" },
1736 { NET_IPV4_CONF_PROXY_ARP, "NET_IPV4_CONF_PROXY_ARP" },
1737 { NET_IPV4_CONF_ACCEPT_REDIRECTS, "NET_IPV4_CONF_ACCEPT_REDIRECTS" },
1738 { NET_IPV4_CONF_SECURE_REDIRECTS, "NET_IPV4_CONF_SECURE_REDIRECTS" },
1739 { NET_IPV4_CONF_SEND_REDIRECTS, "NET_IPV4_CONF_SEND_REDIRECTS" },
1740 { NET_IPV4_CONF_SHARED_MEDIA, "NET_IPV4_CONF_SHARED_MEDIA" },
1741 { NET_IPV4_CONF_RP_FILTER, "NET_IPV4_CONF_RP_FILTER" },
1742 { NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, "NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE" },
1743 { NET_IPV4_CONF_BOOTP_RELAY, "NET_IPV4_CONF_BOOTP_RELAY" },
1744 { NET_IPV4_CONF_LOG_MARTIANS, "NET_IPV4_CONF_LOG_MARTIANS" },
1748 static struct xlat sysctl_net_ipv6[] = {
1749 { NET_IPV6_CONF, "NET_IPV6_CONF" },
1750 { NET_IPV6_NEIGH, "NET_IPV6_NEIGH" },
1751 { NET_IPV6_ROUTE, "NET_IPV6_ROUTE" },
1755 static struct xlat sysctl_net_ipv6_route[] = {
1756 { NET_IPV6_ROUTE_FLUSH, "NET_IPV6_ROUTE_FLUSH" },
1757 { NET_IPV6_ROUTE_GC_THRESH, "NET_IPV6_ROUTE_GC_THRESH" },
1758 { NET_IPV6_ROUTE_MAX_SIZE, "NET_IPV6_ROUTE_MAX_SIZE" },
1759 { NET_IPV6_ROUTE_GC_MIN_INTERVAL, "NET_IPV6_ROUTE_GC_MIN_INTERVAL" },
1760 { NET_IPV6_ROUTE_GC_TIMEOUT, "NET_IPV6_ROUTE_GC_TIMEOUT" },
1761 { NET_IPV6_ROUTE_GC_INTERVAL, "NET_IPV6_ROUTE_GC_INTERVAL" },
1762 { NET_IPV6_ROUTE_GC_ELASTICITY, "NET_IPV6_ROUTE_GC_ELASTICITY" },
1770 struct __sysctl_args info;
1772 umove (tcp, tcp->u_arg[0], &info);
1774 name = alloca (sizeof (int) * info.nlen);
1775 umoven(tcp, (size_t) info.name, sizeof (int) * info.nlen, (char *) name);
1777 if (entering(tcp)) {
1784 printxval(sysctl_root, name[0], "CTL_???");
1792 printxval(sysctl_kern, name[1], "KERN_???");
1797 printxval(sysctl_vm, name[1], "VM_???");
1802 printxval(sysctl_net, name[1], "NET_???");
1810 printxval(sysctl_net_core, name[2],
1815 printxval(sysctl_net_unix, name[2],
1820 printxval(sysctl_net_ipv4, name[2],
1826 case NET_IPV4_ROUTE:
1828 printxval(sysctl_net_ipv4_route,
1830 "NET_IPV4_ROUTE_???");
1834 printxval(sysctl_net_ipv4_conf,
1836 "NET_IPV4_CONF_???");
1844 printxval(sysctl_net_ipv6, name[2],
1850 case NET_IPV6_ROUTE:
1852 printxval(sysctl_net_ipv6_route,
1854 "NET_IPV6_ROUTE_???");
1868 while (cnt < info.nlen)
1869 tprintf(", %x", name[cnt++]);
1870 tprintf("}, %d, ", info.nlen);
1873 umove(tcp, (size_t)info.oldlenp, &oldlen);
1875 && ((name[0] == CTL_KERN
1876 && (name[1] == KERN_OSRELEASE
1877 || name[1] == KERN_OSTYPE
1878 #ifdef KERN_JAVA_INTERPRETER
1879 || name[1] == KERN_JAVA_INTERPRETER
1881 #ifdef KERN_JAVA_APPLETVIEWER
1882 || name[1] == KERN_JAVA_APPLETVIEWER
1885 printpath(tcp, (size_t)info.oldval);
1886 tprintf(", %Zu, ", oldlen);
1887 if (info.newval == 0)
1889 else if (syserror(tcp))
1890 tprintf("%p", info.newval);
1892 printpath(tcp, (size_t)info.newval);
1893 tprintf(", %Zd", info.newlen);
1895 tprintf("%p, %Zd, %p, %Zd", info.oldval, oldlen,
1896 info.newval, info.newlen);
1906 return printargs(tcp);
1911 #include <sys/sysctl.h>
1913 int sys___sysctl(tcp)
1916 int qoid[CTL_MAXNAME+2];
1921 if (entering(tcp)) {
1922 if (tcp->u_arg[1] < 0 || tcp->u_arg[1] > CTL_MAXNAME ||
1923 (umoven(tcp, tcp->u_arg[0], tcp->u_arg[1] * sizeof(int),
1924 (char *) (qoid + 2)) < 0))
1927 /* Use sysctl to ask the name of the current MIB
1928 This uses the undocumented "Staff-functions" used
1929 by the sysctl program. See kern_sysctl.c for
1931 qoid[0] = 0; /* sysctl */
1932 qoid[1] = 1; /* name */
1935 if (sysctl(qoid, tcp->u_arg[1] + 2, ctl, &i, 0, 0) >= 0) {
1936 numeric = !abbrev(tcp);
1937 tprintf("%s%s", ctl, numeric ? ", " : "");
1941 for (i = 0; i < tcp->u_arg[1]; i++)
1942 tprintf("%s%d", i ? "." : "", qoid[i + 2]);
1945 tprintf("%lu, ", tcp->u_arg[1]);
1948 if (!syserror(tcp) && (umove(tcp, tcp->u_arg[3], &len) >= 0)) {
1949 printstr(tcp, tcp->u_arg[2], len);
1950 tprintf(", [%u], ", len);
1952 tprintf("%#lx, %#lx, ", tcp->u_arg[2], tcp->u_arg[3]);
1953 printstr(tcp, tcp->u_arg[4], tcp->u_arg[5]);
1954 tprintf(", %lu", tcp->u_arg[5]);
1962 #include <sys/ksym.h>
1963 #include <sys/elf.h>
1965 static struct xlat ksym_flags[] = {
1966 { STT_NOTYPE, "STT_NOTYPE" },
1967 { STT_FUNC, "STT_FUNC" },
1968 { STT_OBJECT, "STT_OBJECT" },
1976 if (entering (tcp)) {
1977 printstr(tcp, tcp->u_arg[0], -1);
1981 if (syserror(tcp)) {
1982 tprintf("%#lx, %#lx",
1983 tcp->u_arg[1], tcp->u_arg[2]);
1987 printnum (tcp, tcp->u_arg[1], "%#lx");
1989 if (umove(tcp, tcp->u_arg[2], &val) < 0) {
1990 tprintf("%#lx", tcp->u_arg[2]);
1994 printxval (ksym_flags, val, "STT_???");
2003 #endif /* UNIXWARE > 2 */
2007 static struct xlat_sysmips[] = {
2008 { SETNAME, "SETNAME" },
2009 { FLUSH_CACHE, "FLUSH_CACHE" },
2010 { MIPS_FIXADE, "MIPS_FIXADE" },
2011 { MIPS_RDNVRAM, "MIPS_RDNVRAM" },
2012 { MIPS_ATOMIC_SET, "MIPS_ATOMIC_SET" },
2016 int sys_sysmips(tcp)
2019 if (entering(tcp)) {
2020 printxval(xlat_sysmips, tcp->u_arg[0], "???");
2022 if (!verbose(tcp)) {
2023 tprintf("%d, %d, %d", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
2024 } else if (tcp->u_arg[0]==SETNAME) {
2025 char nodename[__NEW_UTS_LEN_1];
2026 if (umovestr(tcp, tcp->u_arg[1], (__NEW_UTS_LEN_1), nodename) < 0)
2027 tprintf(", %#lx", tcp->u_arg[1]);
2029 tprintf(", \"%s\"", nodename);
2030 } else if (tcp->u_arg[0]==MIPS_ATOMIC_SET) {
2031 tprintf(", %#lx, 0x%x", tcp->u_arg[1], tcp->u_arg[2]);
2032 } else if (tcp->u_arg[0]==MIPS_FIXADE) {
2033 tprintf(", 0x%x", tcp->u_arg[1]);
2035 tprintf("%d, %d, %d", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);