expound.c revision a803cc2117fd0d11223af71e54ed3a4e6f877207
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#define _SYSCALL32
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <libproc.h>
#include <string.h>
#include <limits.h>
#include <sys/ipc_impl.h>
#include <sys/msg_impl.h>
#include <sys/sem_impl.h>
#include <sys/shm_impl.h>
#include <ustat.h>
#include <fcntl.h>
#include <time.h>
#include <stropts.h>
#include <poll.h>
#include <sys/resource.h>
#include <sys/byteorder.h>
#include <sys/sysmacros.h>
#include <sys/sendfile.h>
#include <priv.h>
#include <ucred.h>
#include <sys/port_impl.h>
#include <sys/priv_impl.h>
#include <libnvpair.h>
#include <sys/rctl_impl.h>
#include <sys/socketvar.h>
#include <sys/zfs_ioctl.h>
#include "ramdata.h"
#include "systable.h"
#include "proto.h"
void show_sigset(private_t *, long, const char *);
void show_ioctl(private_t *, int, long);
void show_zfs_ioc(private_t *, long);
static void
{
}
void
{
char str[80];
(void) printf("%s\t%s%s [ %lu ]\n",
name,
str,
value);
}
void
{
char str[80];
(void) printf("%s\t%s%s [ %lu.%6.6lu ]\n",
name,
str,
}
void
{
char str[80];
(void) printf("%s\t%s%s [ %lu.%9.9lu ]\n",
name,
str,
}
static void
{
struct {
} utimbuf;
if (offset == 0)
return;
if (data_model == PR_MODEL_NATIVE) {
!= sizeof (utimbuf))
return;
} else {
struct {
} utimbuf32;
!= sizeof (utimbuf32))
return;
}
/* print access and modification times */
else
else
}
void
{
long offset;
return;
if (data_model == PR_MODEL_NATIVE) {
!= sizeof (tod))
return;
} else {
!= sizeof (tod32))
return;
}
}
void
{
if (offset == 0)
return;
if (data_model == PR_MODEL_NATIVE) {
!= sizeof (itimerval))
return;
} else {
struct itimerval32 itimerval32;
!= sizeof (itimerval32))
return;
}
(void) printf(
"%s\t%s: interval: %4ld.%6.6ld sec value: %4ld.%6.6ld sec\n",
name,
}
void
{
if (offset == 0)
return;
if (data_model == PR_MODEL_NATIVE) {
!= sizeof (timeval))
return;
} else {
!= sizeof (timeval32))
return;
}
(void) printf(
"%s\t%s: %ld.%6.6ld sec\n",
name,
}
void
{
if (offset == 0)
return;
if (data_model == PR_MODEL_NATIVE) {
!= sizeof (timestruc))
return;
} else {
!= sizeof (timestruc32))
return;
}
(void) printf(
"%s\t%s: %ld.%9.9ld sec\n",
name,
}
void
{
/* print new system time */
}
}
void
{
long offset;
return;
if (data_model == PR_MODEL_NATIVE) {
!= sizeof (tms))
return;
} else {
!= sizeof (tms32))
return;
/*
* This looks a bit odd (since the values are actually
* signed), but we need to suppress sign extension to
* preserve compatibility (we've always printed these
* numbers as unsigned quantities).
*/
}
(void) printf(
"%s\tutim=%-6lu stim=%-6lu cutim=%-6lu cstim=%-6lu (HZ=%ld)\n",
hz);
}
void
{
/*
*/
struct {
char sysname[9];
char nodename[9];
char release[9];
char version[9];
char machine[9];
} ubuf;
(void) printf(
"%s\tsys=%-9.9snod=%-9.9srel=%-9.9sver=%-9.9smch=%.9s\n",
}
}
/* XX64 -- definition of 'struct ustat' is strange -- check out the defn */
void
{
(void) printf(
"%s\ttfree=%-6ld tinode=%-5lu fname=%-6.6s fpack=%-.6s\n",
}
}
#ifdef _LP64
void
{
(void) printf(
"%s\ttfree=%-6d tinode=%-5u fname=%-6.6s fpack=%-.6s\n",
}
}
#endif /* _LP64 */
void
{
if (offset == 0)
return;
/* enter region of lengthy output */
if (serial)
Eserialize();
while (nproc > 0 &&
(void) printf("%s\tpid=%-5d uid=%-5u flags=%s\n",
nproc--;
}
/* exit region of lengthy output */
if (serial)
Xserialize();
}
void
{
case UTS_UNAME:
break;
case UTS_USTAT:
break;
case UTS_FUSERS:
break;
}
}
}
#ifdef _LP64
void
{
case UTS_UNAME:
break;
case UTS_USTAT:
break;
case UTS_FUSERS:
break;
}
}
}
#endif /* _LP64 */
void
{
int arg;
switch (code) {
case CL_INITIALIZE:
switch (function) {
case CL_GET_BOOTFLAG:
== sizeof (arg)) {
if (arg & CLUSTER_CONFIGURED)
(void) printf("%s\tbootflags="
if (arg & CLUSTER_BOOTED)
(void) printf("|CLUSTER_BOOTED\n");
}
break;
}
break;
case CL_CONFIG:
switch (function) {
case CL_NODEID:
case CL_HIGHEST_NODEID:
== sizeof (arg))
(void) printf("%s\tnodeid=%d\n",
}
break;
}
}
#define ALL_LOCK_TYPES \
/* return cv and mutex types */
const char *
{
if (type & USYNC_PROCESS)
else
if (type & LOCK_ERRORCHECK)
if (type & LOCK_RECURSIVE)
if (type & LOCK_PRIO_INHERIT)
if (type & LOCK_PRIO_PROTECT)
if (type & LOCK_ROBUST)
if (type & USYNC_PROCESS_ROBUST)
if ((type &= ~ALL_LOCK_TYPES) != 0)
return ((const char *)str);
}
void
{
(void) printf("%s\tmutex type: %s\n",
}
}
void
{
== sizeof (condvar)) {
(void) printf("%s\tcondvar type: %s\n",
}
}
void
{
(void) printf("%s\tsema type: %s count = %u\n",
}
}
void
{
(void) printf("%s\trwlock type: %s readers = %d\n",
}
}
/* represent character as itself ('c') or octal (012) */
char *
{
const char *fmt;
if (c >= ' ' && c < 0177)
fmt = "'%c'";
else
fmt = "%.3o";
return (buf);
}
void
{
char cbuf[8];
int i;
(void) printf(
"%s\tiflag=0%.6o oflag=0%.6o cflag=0%.6o lflag=0%.6o line=%d\n",
for (i = 0; i < NCC; i++)
(void) printf(" %s",
}
}
void
{
char cbuf[8];
int i;
== sizeof (termios)) {
(void) printf(
"%s\tiflag=0%.6o oflag=0%.6o cflag=0%.6o lflag=0%.6o\n",
for (i = 0; i < NCCS; i++) {
if (i == NCC) /* show new chars on new line */
(void) printf(" %s",
}
}
}
void
{
int i;
== sizeof (termiox)) {
(void) printf("%s\thflag=0%.3o cflag=0%.3o rflag=0%.3o",
for (i = 1; i < NFF; i++)
(void) printf(" sflag=0%.3o\n",
}
}
void
{
char erase[8];
char kill[8];
(void) printf(
"%s\tispeed=%-2d ospeed=%-2d erase=%s kill=%s flags=0x%.8x\n",
}
}
void
{
char *p;
char cbuf[8];
int i;
== sizeof (ltchars)) {
}
}
void
{
char *p;
char cbuf[8];
int i;
}
}
void
{
(void) printf(
"%s\tflgs=0%.2o termt=%d crow=%d ccol=%d vrow=%d lrow=%d\n",
}
}
/* integer value pointed to by ioctl() arg */
void
{
int val;
const char *s = NULL;
switch (code) { /* interpret these symbolically */
case I_GRDOPT:
break;
case I_GETSIG:
break;
case TIOCFLUSH:
break;
}
if (s == NULL)
(void) printf("%s\t0x%.8lX: %d\n",
else
(void) printf("%s\t0x%.8lX: %s\n",
}
}
void
{
sizeof (strioctl)) {
(void) printf(
"%s\tcmd=%s timout=%d len=%d dp=0x%.8lX\n",
}
}
#ifdef _LP64
void
{
struct strioctl32 strioctl;
sizeof (strioctl)) {
(void) printf(
"%s\tcmd=%s timout=%d len=%d dp=0x%.8lX\n",
}
}
#endif /* _LP64 */
void
{
(void) printf(
"%s\t%s: maxlen=%-4d len=%-4d buf=0x%.8lX",
name,
/*
* Should we show the buffer contents?
* Keyed to the '-r fds' and '-w fds' options?
*/
else {
char buffer[8];
char obuf[40];
(const char *)"\"" : (const char *)"\"..");
}
}
}
#ifdef _LP64
void
{
(void) printf(
"%s\t%s: maxlen=%-4d len=%-4d buf=0x%.8lX",
name,
/*
* Should we show the buffer contents?
* Keyed to the '-r fds' and '-w fds' options?
*/
else {
char buffer[8];
char obuf[40];
(const char *)"\"" : (const char *)"\"..");
}
}
}
#endif /* _LP64 */
/* strpeek and strfdinsert flags word */
const char *
{
const char *s;
switch (flags) {
case 0:
s = "0";
break;
case RS_HIPRI:
s = "RS_HIPRI";
break;
default:
}
return (s);
}
void
{
== sizeof (strpeek)) {
(void) printf("%s\tflags=%s\n",
}
}
#ifdef _LP64
void
{
== sizeof (strpeek)) {
(void) printf("%s\tflags=%s\n",
}
}
#endif /* _LP64 */
void
{
struct strfdinsert strfdinsert;
sizeof (strfdinsert)) {
(void) printf("%s\tflags=%s fildes=%d offset=%d\n",
}
}
#ifdef _LP64
void
{
struct strfdinsert32 strfdinsert;
sizeof (strfdinsert)) {
(void) printf("%s\tflags=%s fildes=%d offset=%d\n",
}
}
#endif /* _LP64 */
void
{
sizeof (strrecvfd)) {
(void) printf(
"%s\tfd=%-5d uid=%-5u gid=%u\n",
}
}
void
{
int count;
sizeof (strlist)) {
(void) printf("%s\tnmods=%d modlist=0x%.8lX\n",
(long)strlist.sl_modlist);
sizeof (list))
break;
(void) printf("%s\t\t\"%.*s\"\n",
}
}
}
#ifdef _LP64
void
{
struct str_list32 strlist;
int count;
sizeof (strlist)) {
(void) printf("%s\tnmods=%d modlist=0x%.8lX\n",
(long)strlist.sl_modlist);
sizeof (list))
break;
(void) printf("%s\t\t\"%.*s\"\n",
}
}
}
#endif /* _LP64 */
void
{
sizeof (jwinsize)) {
(void) printf(
"%s\tbytesx=%-3u bytesy=%-3u bitsx=%-3u bitsy=%-3u\n",
}
}
void
{
== sizeof (winsize)) {
(void) printf(
"%s\trow=%-3d col=%-3d xpixel=%-3d ypixel=%-3d\n",
}
}
struct audio_stuff {
const char *str;
};
const struct audio_stuff audio_output_ports[] = {
{ AUDIO_SPEAKER, "SPEAKER" },
{ AUDIO_HEADPHONE, "HEADPHONE" },
{ AUDIO_LINE_OUT, "LINE_OUT" },
{ AUDIO_SPDIF_OUT, "SPDIF_OUT" },
{ AUDIO_AUX1_OUT, "AUX1_OUT" },
{ AUDIO_AUX2_OUT, "AUX2_OUT" },
{ 0, NULL }
};
const struct audio_stuff audio_input_ports[] = {
{ AUDIO_MICROPHONE, "MICROPHONE" },
{ AUDIO_LINE_IN, "LINE_IN" },
{ AUDIO_CD, "CD" },
{ AUDIO_SPDIF_IN, "SPDIF_IN" },
{ AUDIO_AUX1_IN, "AUX1_IN" },
{ AUDIO_AUX2_IN, "AUX2_IN" },
{ AUDIO_CODEC_LOOPB_IN, "CODEC_LOOPB_IN" },
{ AUDIO_SUNVTS, "SUNVTS" },
{ 0, NULL }
};
static const struct audio_stuff audio_hw_features[] = {
{ AUDIO_HWFEATURE_DUPLEX, "DUPLEX" },
{ AUDIO_HWFEATURE_MSCODEC, "MSCODEC" },
{ AUDIO_HWFEATURE_IN2OUT, "IN2OUT" },
{ AUDIO_HWFEATURE_PLAY, "PLAY" },
{ AUDIO_HWFEATURE_RECORD, "RECORD" },
{ 0, NULL }
};
static const struct audio_stuff audio_sw_features[] = {
{ AUDIO_SWFEATURE_MIXER, "MIXER" },
{ 0, NULL }
};
void
const char *name)
{
if (features == 0) {
(void) printf("0\n");
return;
}
if (features)
(void) putchar('|');
}
}
if (features)
(void) putchar('\n');
}
void
{
const struct audio_stuff *audio_porttab;
if (ports == 0) {
(void) printf("0\n");
return;
}
if (*mode == 'p')
else
if (ports)
(void) putchar('|');
}
}
if (ports)
(void) putchar('\n');
}
void
{
const char *s;
/*
* The following values describe the audio data encoding.
*/
(void) printf("%s\t%s\tsample_rate=%u channels=%u precision=%u\n",
s = NULL;
case AUDIO_ENCODING_NONE: s = "NONE"; break;
case AUDIO_ENCODING_ULAW: s = "ULAW"; break;
case AUDIO_ENCODING_ALAW: s = "ALAW"; break;
case AUDIO_ENCODING_LINEAR: s = "LINEAR"; break;
case AUDIO_ENCODING_DVI: s = "DVI"; break;
case AUDIO_ENCODING_LINEAR8: s = "LINEAR8"; break;
}
if (s)
else {
(void) printf("%s\t%s\tencoding=%u\n",
}
/*
* The following values control audio device configuration
*/
(void) printf(
"%s\t%s\tgain=%u buffer_size=%u\n",
au_pr->buffer_size);
/*
* The following values describe driver state
*/
(void) printf("%s\t%s\tsamples=%u eof=%u pause=%u error=%u\n",
(void) printf("%s\t%s\twaiting=%u balance=%u minordev=%u\n",
/*
* The following values are read-only state flags
*/
(void) printf("%s\t%s\topen=%u active=%u\n",
}
void
{
struct audio_info au;
(void) printf("%s\tmonitor_gain=%u output_muted=%u\n",
"hw_features");
"sw_features");
}
}
void
{
/* for a failed system call */
#ifndef _LP64
if (lp64)
return;
#endif
if (offset == 0)
return;
switch (code) {
case TCGETA:
if (err)
break;
/*FALLTHROUGH*/
case TCSETA:
case TCSETAW:
case TCSETAF:
break;
case TCGETS:
if (err)
break;
/*FALLTHROUGH*/
case TCSETS:
case TCSETSW:
case TCSETSF:
break;
case TCGETX:
if (err)
break;
/*FALLTHROUGH*/
case TCSETX:
case TCSETXW:
case TCSETXF:
break;
case TIOCGETP:
if (err)
break;
/*FALLTHROUGH*/
case TIOCSETN:
case TIOCSETP:
break;
case TIOCGLTC:
if (err)
break;
/*FALLTHROUGH*/
case TIOCSLTC:
break;
case TIOCGETC:
if (err)
break;
/*FALLTHROUGH*/
case TIOCSETC:
break;
case LDGETT:
if (err)
break;
/*FALLTHROUGH*/
case LDSETT:
break;
/* streams ioctl()s */
#if 0
/* these are displayed as strings in the arg list */
/* by prt_ioa(). don't display them again here */
case I_PUSH:
case I_LOOK:
case I_FIND:
/* these are displayed as decimal in the arg list */
/* by prt_ioa(). don't display them again here */
case I_LINK:
case I_UNLINK:
case I_SENDFD:
/* these are displayed symbolically in the arg list */
/* by prt_ioa(). don't display them again here */
case I_SRDOPT:
case I_SETSIG:
case I_FLUSH:
break;
/* this one just ignores the argument */
case I_POP:
break;
#endif
/* these return something in an int pointed to by arg */
case I_NREAD:
case I_GRDOPT:
case I_GETSIG:
case TIOCGSID:
case TIOCGPGRP:
case TIOCLGET:
case FIONREAD:
case FIORDCHK:
if (err)
break;
/*FALLTHROUGH*/
/* these pass something in an int pointed to by arg */
case TIOCSPGRP:
case TIOCFLUSH:
case TIOCLBIS:
case TIOCLBIC:
case TIOCLSET:
break;
/* these all point to structures */
case I_STR:
#ifdef _LP64
if (lp64)
else
#else
#endif
break;
case I_PEEK:
#ifdef _LP64
if (lp64)
else
#else
#endif
break;
case I_FDINSERT:
#ifdef _LP64
if (lp64)
else
#else
#endif
break;
case I_RECVFD:
if (err)
break;
break;
case I_LIST:
if (err)
break;
#ifdef _LP64
if (lp64)
else
#else
#endif
break;
case JWINSIZE:
if (err)
break;
break;
case TIOCGWINSZ:
if (err)
break;
/*FALLTHROUGH*/
case TIOCSWINSZ:
break;
case AUDIO_GETINFO:
case (int)AUDIO_SETINFO:
break;
default:
break;
}
(void) printf("\t\t%s",
} else {
(void) printf(" %d bytes\n",
}
}
}
}
void
{
long offset;
char *cp;
== sizeof (statvfs)) {
(void) printf(
"%s\tbsize=%-10lu frsize=%-9lu blocks=%-8llu bfree=%-9llu\n",
(void) printf(
"%s\tbavail=%-9llu files=%-10llu ffree=%-9llu favail=%-9llu\n",
(void) printf(
"%s\tfsid=0x%-9.4lX basetype=%-7.16s namemax=%ld\n",
(void) printf(
"%s\tflag=%s\n",
*cp = ' ';
(void) printf("%s\tfstr=\"%.*s\"\n",
}
}
#ifdef _LP64
void
{
long offset;
char *cp;
== sizeof (statvfs)) {
(void) printf(
"%s\tbsize=%-10u frsize=%-9u blocks=%-8u bfree=%-9u\n",
(void) printf(
"%s\tbavail=%-9u files=%-10u ffree=%-9u favail=%-9u\n",
(void) printf(
"%s\tfsid=0x%-9.4X basetype=%-7.16s namemax=%d\n",
(void) printf(
"%s\tflag=%s\n",
*cp = ' ';
(void) printf("%s\tfstr=\"%.*s\"\n",
}
}
#endif /* _LP64 */
void
{
long offset;
struct statvfs64_32 statvfs;
char *cp;
== sizeof (statvfs)) {
(void) printf(
"%s\tbsize=%-10u frsize=%-9u blocks=%-8llu bfree=%-9llu\n",
(void) printf(
"%s\tbavail=%-9llu files=%-10llu ffree=%-9llu favail=%-9llu\n",
(void) printf(
"%s\tfsid=0x%-9.4X basetype=%-7.16s namemax=%d\n",
(void) printf(
"%s\tflag=%s\n",
*cp = ' ';
(void) printf("%s\tfstr=\"%.*s\"\n",
}
}
void
{
long offset;
(void) printf(
"%s\tfty=%d bsz=%ld fsz=%ld blk=%ld bfr=%ld fil=%lu ffr=%lu\n",
(void) printf("%s\t fname=%.6s fpack=%.6s\n",
}
}
#ifdef _LP64
void
{
long offset;
(void) printf(
"%s\tfty=%d bsz=%d fsz=%d blk=%d bfr=%d fil=%u ffr=%u\n",
(void) printf("%s\t fname=%.6s fpack=%.6s\n",
}
}
#endif /* _LP64 */
void
{
case F_RDLCK:
str = "F_RDLCK";
break;
case F_WRLCK:
str = "F_WRLCK";
break;
case F_UNLCK:
str = "F_UNLCK";
break;
}
else
else
(void) printf(
" start=%-5d len=%-5d sys=%-2u pid=%d\n",
}
}
void
{
case F_RDLCK:
str = "F_RDLCK";
break;
case F_WRLCK:
str = "F_WRLCK";
break;
case F_UNLCK:
str = "F_UNLCK";
break;
}
else
else
(void) printf(
" start=%-5lld len=%-5lld sys=%-2u pid=%d\n",
}
}
void
{
int manddny = 0;
case F_RDACC:
str = "F_RDACC";
break;
case F_WRACC:
str = "F_WRACC";
break;
case F_RWACC:
str = "F_RWACC";
break;
}
else
manddny = 1;
}
case F_NODNY:
str = "F_NODNY";
break;
case F_RDDNY:
str = "F_RDDNY";
break;
case F_WRDNY:
str = "F_WRDNY";
break;
case F_RWDNY:
str = "F_RWDNY";
break;
case F_COMPAT:
str = "F_COMPAT";
break;
}
if (manddny)
else
} else {
}
}
}
void
{
(void) putchar('\t');
(void) putchar('\t');
}
/* print values in fcntl() pointed-to structure */
void
{
long offset;
return;
}
return;
#ifdef _LP64
case F_GETLK:
case F_SETLK:
case F_SETLKW:
case F_FREESP:
case F_ALLOCSP:
case F_SETLK_NBMAND:
if (data_model == PR_MODEL_LP64)
else
break;
case 33: /* F_GETLK64 */
case 34: /* F_SETLK64 */
case 35: /* F_SETLKW64 */
case 27: /* F_FREESP64 */
case 28: /* F_ALLOCSP64 */
case 44: /* F_SETLK64_NBMAND */
break;
#else /* _LP64 */
case F_GETLK:
case F_SETLK:
case F_SETLKW:
case F_FREESP:
case F_ALLOCSP:
case F_SETLK_NBMAND:
break;
case F_GETLK64:
case F_SETLK64:
case F_SETLKW64:
case F_FREESP64:
case F_ALLOCSP64:
case F_SETLK64_NBMAND:
break;
#endif /* _LP64 */
case F_SHARE:
case F_UNSHARE:
break;
}
}
void
{
}
#ifdef _LP64
void
{
}
#endif /* _LP64 */
void
{
long offset;
switch (what) {
case SYS_getmsg:
case SYS_getpmsg:
break;
case SYS_putmsg:
case SYS_putpmsg:
break;
}
/* enter region of lengthy output */
if (dump)
Eserialize();
#ifdef _LP64
if (data_model == PR_MODEL_LP64)
else
}
if (data_model == PR_MODEL_LP64)
else
}
#else /* _LP64 */
#endif /* _LP64 */
/* exit region of lengthy output */
if (dump)
Xserialize();
}
void
{
int value;
if (offset != 0 &&
(void) printf("%s\t%s:\t%d\n",
name,
value);
}
void
{
int value;
(void) printf("%s\t%s:\t0x%.4X\n",
name,
value);
}
const char *
{
if (arg == 0)
return ("0");
if (arg & ~ALL_POLL_FLAGS) {
return ((const char *)str);
}
*str = '\0';
if (arg & POLLRDNORM)
if (arg & POLLRDBAND)
if (arg & POLLWRBAND)
return ((const char *)(str+1));
}
static void
{
/*
* can't print both events and revents in same printf.
* pollevent() returns a pointer to a TSD location.
*/
(void) printf("%s\tfd=%-2d ev=%s",
}
static void
{
int skip = -1;
sizeof (struct pollfd))
continue;
skip++;
continue;
}
if (skip > 0)
(void) printf("%s\t...last pollfd structure"
" repeated %d time%s...\n",
skip = 0;
}
if (skip > 0)
(void) printf(
"%s\t...last pollfd structure repeated %d time%s...\n",
}
void
{
long offset;
int nfds;
int serial = 0;
return;
/* enter region of lengthy output */
Eserialize();
serial = 1;
}
/* exit region of lengthy output */
if (serial)
Xserialize();
}
static void
{
(void) printf("%s\tu=%-5u g=%-5u cu=%-5u cg=%-5u z=%-5d "
"m=0%.6o key=%d projid=%-5d\n",
(int)ip->ipcx_zoneid,
(int)ip->ipcx_projid);
}
void
{
(void) printf(
"%s\tu=%-5u g=%-5u cu=%-5u cg=%-5u m=0%.6o seq=%u key=%d\n",
}
#ifdef _LP64
void
{
(void) printf(
"%s\tu=%-5u g=%-5u cu=%-5u cg=%-5u m=0%.6o seq=%u key=%d\n",
}
#endif /* _LP64 */
static void
{
struct msqid_ds64 msgq;
(void) printf("%s\tbytes=%-5llu msgs=%-5llu maxby=%-5llu "
(unsigned long long)msgq.msgx_cbytes,
(unsigned long long)msgq.msgx_qbytes,
(int)msgq.msgx_lspid,
(int)msgq.msgx_lrpid);
}
}
void
{
(void) printf(
"%s\tbytes=%-5lu msgs=%-5lu maxby=%-5lu lspid=%-5u lrpid=%-5u\n",
}
}
#ifdef _LP64
void
{
struct msqid_ds32 msgq;
(void) printf(
"%s\tbytes=%-5u msgs=%-5u maxby=%-5u lspid=%-5u lrpid=%-5u\n",
}
}
#endif /* _LP64 */
void
{
/* enter region of lengthy output */
Eserialize();
(void) printf("%s\tmtype=%lu mtext[]=\n",
/* exit region of lengthy output */
Xserialize();
}
}
#ifdef _LP64
void
{
struct ipcmsgbuf32 msgb;
/* enter region of lengthy output */
Eserialize();
(void) printf("%s\tmtype=%u mtext[]=\n",
/* exit region of lengthy output */
Xserialize();
}
}
#endif /* _LP64 */
#ifdef _LP64
void
{
case 0: /* msgget() */
break;
case 1: /* msgctl() */
case IPC_STAT:
break;
/*FALLTHROUGH*/
case IPC_SET:
if (data_model == PR_MODEL_LP64)
else
break;
case IPC_STAT64:
break;
/*FALLTHROUGH*/
case IPC_SET64:
break;
}
}
break;
case 2: /* msgrcv() */
if (data_model == PR_MODEL_LP64)
else
}
break;
case 3: /* msgsnd() */
if (data_model == PR_MODEL_LP64)
else
}
break;
case 4: /* msgids() */
case 5: /* msgsnap() */
default: /* unexpected subcode */
break;
}
}
#else /* _LP64 */
void
{
case 0: /* msgget() */
break;
case 1: /* msgctl() */
case IPC_STAT:
break;
/*FALLTHROUGH*/
case IPC_SET:
break;
case IPC_STAT64:
break;
/*FALLTHROUGH*/
case IPC_SET64:
break;
}
}
break;
case 2: /* msgrcv() */
break;
case 3: /* msgsnd() */
break;
case 4: /* msgids() */
case 5: /* msgsnap() */
default: /* unexpected subcode */
break;
}
}
#endif /* _LP64 */
static void
{
struct semid_ds64 semds;
}
}
void
{
(void) printf("%s\tnsems=%u\n",
}
}
#ifdef _LP64
void
{
struct semid_ds32 semds;
(void) printf("%s\tnsems=%u\n",
}
}
#endif /* _LP64 */
void
{
const char *str;
if (offset == 0)
return;
nsops = 40;
sizeof (sembuf))
break;
(void) printf("%s\tsemnum=%-5u semop=%-5d semflg=",
(void) printf("0\n");
else
}
if (timeout)
}
void
{
case 0: /* semctl() */
case IPC_STAT:
break;
/*FALLTHROUGH*/
case IPC_SET:
#ifdef _LP64
if (data_model == PR_MODEL_LP64)
else
#else
#endif
break;
case IPC_STAT64:
break;
/*FALLTHROUGH*/
case IPC_SET64:
break;
}
}
break;
case 1: /* semget() */
break;
case 2: /* semop() */
break;
case 3: /* semids() */
break;
case 4: /* semtimedop() */
break;
default: /* unexpected subcode */
break;
}
}
static void
{
struct shmid_ds64 shmds;
(void) printf(
"%s\tsize=%-6llu lpid=%-5d cpid=%-5d na=%-5llu cna=%llu\n",
(unsigned long long)shmds.shmx_segsz,
(unsigned long long)shmds.shmx_nattch,
(unsigned long long)shmds.shmx_cnattch);
}
}
void
{
(void) printf(
"%s\tsize=%-6lu lpid=%-5u cpid=%-5u na=%-5lu cna=%lu\n",
}
}
#ifdef _LP64
void
{
struct shmid_ds32 shmds;
(void) printf(
"%s\tsize=%-6u lpid=%-5u cpid=%-5u na=%-5u cna=%u\n",
}
}
#endif /* _LP64 */
void
{
case 0: /* shmat() */
break;
case 1: /* shmctl() */
case IPC_STAT:
break;
/*FALLTHROUGH*/
case IPC_SET:
#ifdef _LP64
if (data_model == PR_MODEL_LP64)
else
#else
#endif
break;
case IPC_STAT64:
break;
/*FALLTHROUGH*/
case IPC_SET64:
break;
}
}
break;
case 2: /* shmdt() */
case 3: /* shmget() */
case 4: /* shmids() */
default: /* unexpected subcode */
break;
}
}
void
{
int groups[100];
if (count > 100)
count = 100;
count*sizeof (int)) {
int n;
if (n != 0 && n%10 == 0)
}
}
}
/*
* This assumes that a sigset_t is simply an array of ints.
*/
char *
{
while (--n >= 0) {
if (val == 0)
s += sprintf(s, " 0");
else
}
}
void
{
(void) printf("%s\t%s =%s\n",
}
}
#ifdef _LP64
void
{
struct sigaltstack32 altstack;
sizeof (altstack)) {
(void) printf("%s\t%s: sp=0x%.8X size=%u flags=0x%.4X\n",
name,
}
}
#endif /* _LP64 */
void
{
struct sigaltstack altstack;
#ifdef _LP64
if (data_model != PR_MODEL_LP64) {
return;
}
#endif
sizeof (altstack)) {
(void) printf("%s\t%s: sp=0x%.8lX size=%lu flags=0x%.4X\n",
name,
}
}
#ifdef _LP64
void
{
struct sigaction32 sigaction;
sizeof (sigaction)) {
/* This is stupid, we shouldn't have to do this */
(void) printf(
"%s %s: hand = 0x%.8X mask =%s flags = 0x%.4X\n",
name,
}
}
#endif /* _LP64 */
void
{
#ifdef _LP64
if (data_model != PR_MODEL_LP64) {
return;
}
#endif
sizeof (sigaction)) {
/* This is stupid, we shouldn't have to do this */
(void) printf(
"%s %s: hand = 0x%.8lX mask =%s flags = 0x%.4X\n",
name,
(long)sigaction.sa_handler,
}
}
#ifdef _LP64
void
{
return;
}
default:
return;
case SIGILL:
case SIGTRAP:
case SIGFPE:
case SIGSEGV:
case SIGBUS:
case SIGEMT:
case SIGCLD:
case SIGPOLL:
case SIGXFSZ:
break;
}
case SIGILL:
}
break;
case SIGTRAP:
}
break;
case SIGFPE:
#if defined(FPE_FLTDEN)
#endif
}
break;
case SIGSEGV:
}
break;
case SIGEMT:
#ifdef EMT_TAGOVF
#endif
}
break;
case SIGBUS:
}
break;
case SIGCLD:
}
break;
case SIGPOLL:
}
break;
}
}
case SIGILL:
case SIGTRAP:
case SIGFPE:
case SIGSEGV:
case SIGBUS:
case SIGEMT:
(void) printf(" %s addr=0x%.8X",
code,
break;
case SIGCLD:
(void) printf(" %s pid=%d status=0x%.4X",
code,
break;
case SIGPOLL:
case SIGXFSZ:
(void) printf(" %s fd=%d band=%d",
code,
break;
}
}
}
#endif /* _LP64 */
void
{
(void) printf(" pid=%d uid=%u",
return;
}
default:
return;
case SIGILL:
case SIGTRAP:
case SIGFPE:
case SIGSEGV:
case SIGBUS:
case SIGEMT:
case SIGCLD:
case SIGPOLL:
case SIGXFSZ:
break;
}
case SIGILL:
}
break;
case SIGTRAP:
}
break;
case SIGFPE:
#if defined(FPE_FLTDEN)
#endif
}
break;
case SIGSEGV:
}
break;
case SIGEMT:
#ifdef EMT_TAGOVF
#endif
}
break;
case SIGBUS:
}
break;
case SIGCLD:
}
break;
case SIGPOLL:
}
break;
}
}
case SIGILL:
case SIGTRAP:
case SIGFPE:
case SIGSEGV:
case SIGBUS:
case SIGEMT:
(void) printf(" %s addr=0x%.8lX",
code,
break;
case SIGCLD:
(void) printf(" %s pid=%d status=0x%.4X",
code,
break;
case SIGPOLL:
case SIGXFSZ:
(void) printf(" %s fd=%d band=%ld",
code,
break;
}
}
}
#ifdef _LP64
void
{
}
#endif /* _LP64 */
void
{
#ifdef _LP64
if (data_model != PR_MODEL_LP64) {
return;
}
#endif
}
void
{
/* enter region of lengthy output */
if (serial)
Eserialize();
while (count > 0) {
char buf[32];
int i;
break;
for (i = 0; i < nb; i++)
}
/* exit region of lengthy output */
if (serial)
Xserialize();
}
#ifdef _LP64
void
{
long nb;
niov = 16;
/* enter region of lengthy output */
if (serial)
Eserialize();
(void) printf("%s\tiov_base = 0x%.8X iov_len = %d\n",
if (nb > 0)
}
}
/* exit region of lengthy output */
if (serial)
Xserialize();
}
}
#endif /* _LP64 */
void
{
long nb;
#ifdef _LP64
if (data_model != PR_MODEL_LP64) {
return;
}
#endif
niov = 16;
/* enter region of lengthy output */
if (serial)
Eserialize();
(void) printf("%s\tiov_base = 0x%.8lX iov_len = %lu\n",
if (nb > 0)
}
}
/* exit region of lengthy output */
if (serial)
Xserialize();
}
}
void
{
if (offset == 0)
return;
/* enter region of lengthy output */
if (serial)
Eserialize();
break;
break;
/* getdents() error? */
(void) printf(
"%s ino=%-5u off=%-4d rlen=%-3d\n",
break;
}
while (!interrupt &&
(void) printf(
"%s ino=%-5u off=%-4d rlen=%-3d \"%.*s\"\n",
/* LINTED improper alignment */
}
}
/* exit region of lengthy output */
if (serial)
Xserialize();
}
void
{
if (offset == 0)
return;
/* enter region of lengthy output */
if (serial)
Eserialize();
break;
break;
/* getdents() error? */
(void) printf(
"%s ino=%-5llu off=%-4lld rlen=%-3d\n",
break;
}
while (!interrupt &&
(void) printf(
"%s ino=%-5llu off=%-4lld rlen=%-3d \"%.*s\"\n",
/* LINTED improper alignment */
}
}
/* exit region of lengthy output */
if (serial)
Xserialize();
}
void
{
case RLIM32_INFINITY:
break;
case RLIM32_SAVED_MAX:
break;
case RLIM32_SAVED_CUR:
break;
default:
break;
}
case RLIM32_INFINITY:
break;
case RLIM32_SAVED_MAX:
break;
case RLIM32_SAVED_CUR:
break;
default:
break;
}
}
}
void
{
case RLIM64_INFINITY:
break;
case RLIM64_SAVED_MAX:
break;
case RLIM64_SAVED_CUR:
break;
default:
(void) printf("cur = %llu",
break;
}
case RLIM64_INFINITY:
break;
case RLIM64_SAVED_MAX:
break;
case RLIM64_SAVED_CUR:
break;
default:
(void) printf(" max = %llu\n",
break;
}
}
}
void
{
(void) printf(
"%s\tsys=%s nod=%s rel=%s ver=%s mch=%s\n",
}
}
void
{
}
void
{
/*
* A buffer large enough for PATH_MAX size AF_UNIX address, which is
* also large enough to store a sockaddr_in or a sockaddr_in6.
*/
/ sizeof (long)];
char addrbuf[INET6_ADDRSTRLEN];
if (lenoff != 0) {
return;
}
return;
case AF_INET6:
(void) printf("%s\tAF_INET6 %s = %s port = %u\n",
sizeof (addrbuf)),
(void) printf("%s\tscope id = %u source id = 0x%x\n"
"%s\tflow class = 0x%02x flow label = 0x%05x\n",
break;
case AF_INET:
(void) printf("%s\tAF_%s %s = %s port = %u\n",
break;
case AF_UNIX:
if (len >= 0) {
/* Null terminate */
}
break;
}
}
void
{
return;
/*
* Print the iovec if the syscall was successful and the fd is
* part of the set being traced.
*/
prismember(&readfd, i)) ||
(what == SYS_sendmsg &&
prismember(&writefd, i)))
}
#ifdef _LP64
void
{
struct msghdr32 {
} msg;
return;
/*
* Print the iovec if the syscall was successful and the fd is
* part of the set being traced.
*/
prismember(&readfd, i)) ||
(what == SYS_sendmsg &&
prismember(&writefd, i)))
}
#endif /* _LP64 */
static void
{
(void) printf("%s\tdata_ptr=0x%lX data_size=%lu\n",
(void) printf("%s\tdesc_ptr=0x%lX desc_num=%u\n",
(void) printf("%s\trbuf=0x%lX rsize=%lu\n",
}
}
static void
{
int i = 0;
const priv_set_t *s;
char *str;
if (s == NULL)
continue;
(void) printf("%s\t%c: %s\n",
*sn,
}
}
static void
{
return;
/*
* A new uc_size is read, it could be smaller than the previously
* value. We accept short reads that fill the whole header.
*/
(void) printf("%s\teuid=%u egid=%u\n",
ucred_getegid(uc));
(void) printf("%s\truid=%u rgid=%u\n",
ucred_getrgid(uc));
(void) printf("%s\tpid=%d zoneid=%d\n",
(int)ucred_getpid(uc),
(int)ucred_getzoneid(uc));
}
ucred_free(uc);
}
static void
{
return;
}
}
}
static void
{
return;
(void) printf("%s\ttarget=%d proc=0x%llX data=0x%llX\n",
}
static void
{
(void) printf("%s\tvalue=%lu\n",
val);
}
}
#ifdef _LP64
static void
{
struct door_arg32 args;
(void) printf("%s\tdata_ptr=%X data_size=%u\n",
(void) printf("%s\tdesc_ptr=0x%X desc_num=%u\n",
(void) printf("%s\trbuf=0x%X rsize=%u\n",
}
}
static void
{
(void) printf("%s\tvalue=%u\n",
val);
}
}
#endif /* _LP64 */
static void
{
case DOOR_CALL:
#ifdef _LP64
if (data_model == PR_MODEL_LP64)
else
#else
#endif
break;
case DOOR_UCRED:
break;
case DOOR_INFO:
break;
case DOOR_GETPARAM:
#ifdef _LP64
if (data_model == PR_MODEL_LP64)
else
#else
#endif
}
break;
}
}
static void
{
(void) printf("%s\tevents=0x%x source=%u\n",
(void) printf("%s\tobject=0x%p user=0x%p\n",
(void *)args.portev_object,
(void *)args.portev_user);
}
}
#ifdef _LP64
static void
{
(void) printf("%s\tevents=0x%x source=%u\n",
(void) printf("%s\tobject=0x%x user=0x%x\n",
}
}
#endif /* _LP64 */
static void
{
case PORT_GET:
#ifdef _LP64
if (data_model == PR_MODEL_LP64)
else
#else
#endif
break;
}
}
#define MAX_SNDFL_PRD 16
#ifdef _LP64
static void
{
Eserialize();
while (sfvcnt > 0) {
break;
while (cpy_rqst) {
(void) printf(
"sfv_fd=%d\tsfv_flag=0x%x\t"
"sfv_off=%d\tsfv_len=%u\n",
}
snd_ptr++;
}
sndvec += MAX_SNDFL_PRD;
}
Xserialize();
}
static void
{
Eserialize();
while (sfvcnt > 0) {
break;
while (cpy_rqst) {
(void) printf(
"sfv_fd=%d\tsfv_flag=0x%x\t"
"sfv_off=%ld\tsfv_len=%u\n",
}
snd_ptr++;
}
sndvec += MAX_SNDFL_PRD;
}
Xserialize();
}
#endif /* _LP64 */
/*ARGSUSED*/
static void
{
#ifdef _LP64
if (data_model != PR_MODEL_LP64) {
return;
}
#endif
Eserialize();
while (sfvcnt > 0) {
break;
while (cpy_rqst) {
(void) printf(
"sfv_fd=%d\tsfv_flag=0x%x\t"
"sfv_off=%ld\tsfv_len=%lu\n",
}
snd_ptr++;
}
sndvec += MAX_SNDFL_PRD;
}
Xserialize();
}
/*ARGSUSED*/
static void
{
#ifdef _LP64
if (data_model != PR_MODEL_LP64) {
return;
}
#endif
Eserialize();
while (sfvcnt > 0) {
break;
while (cpy_rqst) {
(void) printf(
#ifdef _LP64
"sfv_fd=%d\tsfv_flag=0x%x\t"
"sfv_off=%ld\tsfv_len=%lu\n",
#else
"sfv_fd=%d\tsfv_flag=0x%x\t"
"sfv_off=%lld\tsfv_len=%lu\n",
#endif
}
snd_ptr++;
}
sndvec += MAX_SNDFL_PRD;
}
Xserialize();
}
static void
{
struct memcntl_mha mha;
const char *s = NULL;
case MHA_MAPSIZE_VA: s = "MHA_MAPSIZE_VA"; break;
case MHA_MAPSIZE_BSSBRK: s = "MHA_MAPSIZE_BSSBRK"; break;
case MHA_MAPSIZE_STACK: s = "MHA_MAPSIZE_STACK"; break;
}
if (s)
(void) printf("%s\tmha_cmd=%s mha_flags=0x%x"
" mha_pagesize=%lu\n",
else
(void) printf("%s\tmha_cmd=0x%.8x mha_flags=0x%x"
" mha_pagesize=%lu\n",
}
}
#ifdef _LP64
static void
{
struct memcntl_mha32 mha32;
const char *s = NULL;
sizeof (mha32)) {
case MHA_MAPSIZE_VA: s = "MHA_MAPSIZE_VA"; break;
case MHA_MAPSIZE_BSSBRK: s = "MHA_MAPSIZE_BSSBRK"; break;
case MHA_MAPSIZE_STACK: s = "MHA_MAPSIZE_STACK"; break;
}
if (s)
(void) printf("%s\tmha_cmd=%s mha_flags=0x%x"
" mha_pagesize=%u\n",
else
(void) printf("%s\tmha_cmd=0x%.8x mha_flags=0x%x"
" mha_pagesize=%u\n",
}
}
#endif /* _LP64 */
static void
{
return;
#ifdef _LP64
if (data_model == PR_MODEL_LP64)
else
#else
#endif
}
void
{
if (offset == 0)
return;
/* enter region of lengthy output */
if (serial)
Eserialize();
break;
idp++;
count--;
}
}
/* exit region of lengthy output */
if (serial)
Xserialize();
}
void
{
struct ntptimeval ntv;
long offset;
return;
if (data_model == PR_MODEL_NATIVE) {
!= sizeof (ntv))
return;
} else {
struct ntptimeval32 ntv32;
!= sizeof (ntv32))
return;
}
(void) printf("\ttime: %ld.%6.6ld sec\n",
}
static char *
{
*str = '\0';
if (val & MOD_OFFSET)
if (val & MOD_FREQUENCY)
if (val & MOD_MAXERROR)
if (val & MOD_ESTERROR)
if (val & MOD_STATUS)
if (val & MOD_TIMECONST)
return (str + 1);
}
static char *
{
*str = '\0';
if (val & STA_PPSFREQ)
if (val & STA_PPSTIME)
if (val & STA_UNSYNC)
if (val & STA_FREQHOLD)
if (val & STA_PPSSIGNAL)
if (val & STA_PPSJITTER)
if (val & STA_PPSWANDER)
if (val & STA_PPSERROR)
if (val & STA_CLOCKERR)
return (str + 1);
}
void
{
long offset;
return;
return;
}
void
show_getrusage(long offset)
{
struct rusage r;
return;
(void) printf("\t user time: %ld.%6.6ld sec\n",
(void) printf("\t system time: %ld.%6.6ld sec\n",
(void) printf("\t max rss: <unimpl> %ld\n",
r.ru_maxrss);
(void) printf("\t shared data: <unimpl> %ld\n",
r.ru_ixrss);
(void) printf("\t unshared data: <unimpl> %ld\n",
r.ru_idrss);
(void) printf("\t unshared stack: <unimpl> %ld\n",
r.ru_isrss);
(void) printf("\t minor faults: %ld\n",
r.ru_minflt);
(void) printf("\t major faults: %ld\n",
r.ru_majflt);
(void) printf("\t # of swaps: %ld\n",
r.ru_nswap);
(void) printf("\t blocked inputs: %ld\n",
r.ru_inblock);
(void) printf("\t blocked outputs: %ld\n",
r.ru_oublock);
(void) printf("\t msgs sent: %ld\n",
r.ru_msgsnd);
(void) printf("\t msgs rcv'd: %ld\n",
r.ru_msgrcv);
(void) printf("\t signals rcv'd: %ld\n",
r.ru_nsignals);
(void) printf("\tvol cntxt swtchs: %ld\n",
r.ru_nvcsw);
(void) printf("\tinv cntxt swtchs: %ld\n",
r.ru_nivcsw);
}
#ifdef _LP64
void
show_getrusage32(long offset)
{
struct rusage32 r;
return;
(void) printf("\t user time: %d.%6.6d sec\n",
(void) printf("\t system time: %d.%6.6d sec\n",
(void) printf("\t max rss: <unimpl> %d\n",
r.ru_maxrss);
(void) printf("\t shared data: <unimpl> %d\n",
r.ru_ixrss);
(void) printf("\t unshared data: <unimpl> %d\n",
r.ru_idrss);
(void) printf("\t unshared stack: <unimpl> %d\n",
r.ru_isrss);
(void) printf("\t minor faults: %d\n",
r.ru_minflt);
(void) printf("\t major faults: %d\n",
r.ru_majflt);
(void) printf("\t # of swaps: %d\n",
r.ru_nswap);
(void) printf("\t blocked inputs: %d\n",
r.ru_inblock);
(void) printf("\t blocked outputs: %d\n",
r.ru_oublock);
(void) printf("\t msgs sent: %d\n",
r.ru_msgsnd);
(void) printf("\t msgs rcv'd: %d\n",
r.ru_msgrcv);
(void) printf("\t signals rcv'd: %d\n",
r.ru_nsignals);
(void) printf("\tvol cntxt swtchs: %d\n",
r.ru_nvcsw);
(void) printf("\tinv cntxt swtchs: %d\n",
r.ru_nivcsw);
}
#endif
/*
* Utility function to print a packed nvlist by unpacking
* and calling the libnvpair pretty printer. Frees all
* allocated memory internally.
*/
static void
{
char *buf;
return;
}
} else {
int result;
if (result == 0) {
} else {
(void) printf("%s\tunpack of nvlist"
}
}
}
static void
{
char zone_name[ZONENAME_MAX];
char zone_root[MAXPATHLEN];
}
} else {
zone_zfs = "";
}
(void *)args.extended_error);
if (is_system_labeled()) {
/* show the label as string */
M_LABEL, SHORT_NAMES) != 0) {
/* have to dump label as raw string */
(void) label_to_str(&zone_label,
}
}
(void) printf("%s\t label: %s\n",
if (label_str)
}
}
}
#ifdef _LP64
static void
{
char zone_name[ZONENAME_MAX];
char zone_root[MAXPATHLEN];
}
} else {
zone_zfs = "";
}
if (is_system_labeled()) {
/* show the label as string */
M_LABEL, SHORT_NAMES) != 0) {
/* have to dump label as raw string */
(void) label_to_str(&zone_label,
}
}
(void) printf("%s\t label: %s\n",
if (label_str)
}
}
}
#endif
static void
{
case ZONE_CREATE:
#ifdef _LP64
if (data_model == PR_MODEL_LP64)
else
#else
#endif
break;
}
}
static void
{
int size = rctlblk_size();
const char *s;
} else {
(void) printf("%s\t\t Privilege: 0x%x\n",
(void) printf("%s\t\t Value: %lld\n",
(void) printf("%s\t\tEnforced Value: %lld\n",
{
if (s == NULL) {
(void) printf("%s\t\t Local action: 0x%x\n",
} else {
(void) printf("%s\t\t Local action: %s\n",
}
if (act & RCTL_LOCAL_SIGNAL) {
(void) printf("%s\t\t "
"For signal %s\n",
}
}
if (s == NULL) {
(void) printf("%s\t\t Local flags: 0x%x\n",
} else {
(void) printf("%s\t\t Local flags: %s\n",
}
#ifdef _LP64
(void) printf("%s\t\t Recipient PID: %d\n",
#else
(void) printf("%s\t\t Recipient PID: %ld\n",
#endif
(void) printf("%s\t\t Firing Time: %lld\n",
}
}
static void
{
int entry;
case 0: /* getrctl */
case 1: /* setrctl */
/*
* If these offsets look a little odd, remember that they're
* into the _raw_ system call
*/
}
}
break;
case 4: /* setprojrctl */
(void) printf("%s\tNew rctlblk[%d]: 0x%lx\n",
}
}
}
}
void
{
case 0: /* futimens() */
break;
case 1: /* utimensat */
break;
default: /* unexpected subcode */
break;
}
}
#ifdef _LP64
static void
{
struct sockconfig_filter_props32 props;
const char *s = NULL;
int i;
if (props.sfp_autoattach) {
buf[0] = '\0';
case SOF_HINT_TOP: s = "top"; break;
case SOF_HINT_BOTTOM: s = "bottom"; break;
case SOF_HINT_BEFORE:
case SOF_HINT_AFTER:
"before" : "after";
}
if (s != NULL) {
}
}
(void) printf("\n");
if (props.sfp_socktuple_cnt == 0) {
(void) printf("\t\t<empty>\n");
return;
}
for (i = 0; i < props.sfp_socktuple_cnt; i++) {
(void) printf(
"\t\tfamily: %d, type: %d, proto: %d\n",
tup[i].sofst_protocol);
}
}
}
#endif /* _LP64 */
static void
{
struct sockconfig_filter_props props;
const char *s = NULL;
int i;
if (props.sfp_autoattach) {
buf[0] = '\0';
case SOF_HINT_TOP: s = "top"; break;
case SOF_HINT_BOTTOM: s = "bottom"; break;
case SOF_HINT_BEFORE:
case SOF_HINT_AFTER:
"before" : "after";
}
if (s != NULL) {
(void) printf(", placement: %s", s);
}
}
(void) printf("\n");
if (props.sfp_socktuple_cnt == 0) {
(void) printf("\t\t<empty>\n");
return;
}
for (i = 0; i < props.sfp_socktuple_cnt; i++) {
(void) printf(
"\t\tfamily: %d, type: %d, proto: %d\n",
tup[i].sofst_protocol);
}
}
}
void
{
case SOCKCONFIG_ADD_FILTER:
#ifdef _LP64
if (data_model == PR_MODEL_LP64)
else
#else
#endif
break;
default:
break;
}
}
void
{
static const zfs_share_t zero_share = {0};
static const dmu_objset_stats_t zero_objstats = {0};
static const struct drr_begin zero_drrbegin = {0};
static const zinject_record_t zero_injectrec = {0};
static const zfs_stat_t zero_zstat = {0};
(void) printf(" zfs_ioctl read failed\n");
return;
}
(void) printf(" zc_guid=%llu\n",
}
if (zc.zc_nvlist_conf_size) {
(void) printf(" nvlist_conf:\n");
}
if (zc.zc_nvlist_src_size) {
(void) printf(" nvlist_src:\n");
}
if (zc.zc_nvlist_dst_size) {
(void) printf(" nvlist_dst:\n");
}
(void) printf(" zc_cookie=%llu\n",
}
if (zc.zc_objset_type != 0) {
(void) printf(" zc_objset_type=%llu\n",
}
if (zc.zc_perm_action != 0) {
(void) printf(" zc_perm_action=%llu\n",
}
if (zc.zc_history != 0) {
(void) printf(" zc_history=%llu\n",
}
(void) printf(" zc_obj=%llu\n",
}
(void) printf(" zc_obj=0x%llx\n",
}
(void) printf(" zc_share:\n");
if (z->z_exportdata) {
(void) printf("\tz_exportdata=0x%llx\n",
(u_longlong_t)z->z_exportdata);
}
if (z->z_sharedata) {
(void) printf("\tz_sharedata=0x%llx\n",
(u_longlong_t)z->z_sharedata);
}
if (z->z_sharetype) {
(void) printf("\tz_sharetype=%llu\n",
(u_longlong_t)z->z_sharetype);
}
if (z->z_sharemax) {
(void) printf("\tz_sharemax=%llu\n",
(u_longlong_t)z->z_sharemax);
}
}
sizeof (zc.zc_objset_stats))) {
(void) printf(" zc_objset_stats:\n");
if (dds->dds_num_clones) {
(void) printf("\tdds_num_clones=%llu\n",
}
if (dds->dds_creation_txg) {
(void) printf("\tdds_creation_txg=%llu\n",
}
(void) printf("\tdds_guid=%llu\n",
}
if (dds->dds_is_snapshot) {
(void) printf("\tdds_is_snapshot=%u\n",
}
if (dds->dds_inconsistent) {
(void) printf("\tdds_inconsitent=%u\n",
}
if (dds->dds_origin[0]) {
}
}
sizeof (zc.zc_begin_record))) {
(void) printf(" zc_begin_record:\n");
(void) printf("\tdrr_magic=%llu\n",
}
if (drr->drr_versioninfo) {
(void) printf("\tdrr_versioninfo=%llu\n",
}
if (drr->drr_creation_time) {
(void) printf("\tdrr_creation_time=%llu\n",
}
if (drr->drr_toguid) {
(void) printf("\tdrr_toguid=%llu\n",
}
if (drr->drr_fromguid) {
(void) printf("\tdrr_fromguid=%llu\n",
}
if (drr->drr_toname[0]) {
}
}
sizeof (zc.zc_inject_record))) {
(void) printf(" zc_inject_record:\n");
(void) printf("\tzi_objset=%llu\n",
}
(void) printf("\tzi_object=%llu\n",
}
(void) printf("\tzi_start=%llu\n",
}
(void) printf("\tzi_end=%llu\n",
}
(void) printf("\tzi_guid=%llu\n",
}
(void) printf("\tzi_level=%lu\n",
}
(void) printf("\tzi_error=%lu\n",
}
(void) printf("\tzi_type=%llu\n",
}
(void) printf("\tzi_freq=%lu\n",
}
if (zi->zi_failfast) {
(void) printf("\tzi_failfast=%lu\n",
}
(void) printf("\tzi_iotype=%lu\n",
}
if (zi->zi_duration) {
(void) printf("\tzi_duration=%ld\n",
(long)zi->zi_duration);
}
(void) printf("\tzi_timer=%llu\n",
}
}
if (zc.zc_defer_destroy) {
(void) printf(" zc_defer_destroy=%d\n",
(int)zc.zc_defer_destroy);
}
if (zc.zc_temphold) {
(void) printf(" zc_temphold=%d\n",
(int)zc.zc_temphold);
}
if (zc.zc_action_handle) {
(void) printf(" zc_action_handle=%llu\n",
}
if (zc.zc_cleanup_fd >= 0)
if (zc.zc_sendobj) {
(void) printf(" zc_sendobj=%llu\n",
}
if (zc.zc_fromobj) {
(void) printf(" zc_fromobj=%llu\n",
}
if (zc.zc_createtxg) {
(void) printf(" zc_createtxg=%llu\n",
}
(void) printf(" zc_stat:\n");
(void) printf("\tzs_gen=%llu\n",
}
(void) printf("\tzs_mode=%llu\n",
}
(void) printf("\tzs_links=%llu\n",
}
(void) printf("\tzs_ctime[0]=%llu\n",
}
(void) printf("\tzs_ctime[1]=%llu\n",
}
}
}
/* expound verbosely upon syscall arguments */
/*ARGSUSED*/
void
{
/* for a failed system call */
#ifndef _LP64
/* We are a 32-bit truss; we can't grok a 64-bit process */
if (lp64)
return;
#endif
/* for reporting sleeping system calls */
switch (what) {
case SYS_gettimeofday:
if (!err)
break;
case SYS_getitimer:
" value");
break;
case SYS_setitimer:
" value");
"ovalue");
break;
case SYS_stime:
break;
case SYS_times:
if (!err)
break;
case SYS_utssys:
if (err)
break;
#ifdef _LP64
if (lp64)
else
#else
#endif
break;
case SYS_ioctl:
break;
case SYS_fstatat:
break;
case SYS_fstatat64:
break;
case SYS_stat:
case SYS_fstat:
case SYS_lstat:
break;
case SYS_stat64:
case SYS_fstat64:
case SYS_lstat64:
break;
case SYS_statvfs:
case SYS_fstatvfs:
if (err)
break;
#ifdef _LP64
if (!lp64) {
break;
}
#endif
break;
case SYS_statvfs64:
case SYS_fstatvfs64:
if (err)
break;
break;
case SYS_statfs:
case SYS_fstatfs:
if (err)
break;
#ifdef _LP64
if (lp64)
else
#else
#endif
break;
case SYS_fcntl:
break;
case SYS_msgsys:
break;
case SYS_semsys:
break;
case SYS_shmsys:
break;
case SYS_getdents:
break;
#ifdef _LP64
if (!lp64) {
break;
}
/* FALLTHROUGH */
#else
break;
#endif
case SYS_getdents64:
break;
break;
case SYS_getmsg:
break;
case SYS_getpmsg:
break;
case SYS_putmsg:
case SYS_putpmsg:
break;
case SYS_pollsys:
break;
case SYS_setgroups:
break;
case SYS_getgroups:
break;
case SYS_sigprocmask:
break;
case SYS_sigsuspend:
case SYS_sigtimedwait:
break;
case SYS_sigaltstack:
"new");
"old");
break;
case SYS_sigaction:
"new", NULL);
"old", r0);
break;
case SYS_signotify:
break;
case SYS_sigresend:
break;
case SYS_sigpending:
break;
case SYS_waitid:
break;
case SYS_sigsendsys:
break;
case SYS_priocntlsys:
break;
case SYS_mincore:
break;
case SYS_readv:
case SYS_writev:
prismember(&readfd, i)) ||
(what == SYS_writev &&
prismember(&writefd, i)))
}
break;
case SYS_getrlimit:
if (err)
break;
/*FALLTHROUGH*/
case SYS_setrlimit:
break;
#ifdef _LP64
if (lp64)
else
#else
#endif
break;
case SYS_getrlimit64:
if (err)
break;
/*FALLTHROUGH*/
case SYS_setrlimit64:
break;
break;
case SYS_uname:
break;
case SYS_adjtime:
break;
case SYS_lwp_info:
break;
case SYS_lwp_wait:
break;
case SYS_lwp_mutex_wakeup:
case SYS_lwp_mutex_unlock:
case SYS_lwp_mutex_trylock:
case SYS_lwp_mutex_register:
break;
case SYS_lwp_mutex_timedlock:
break;
case SYS_lwp_cond_wait:
break;
case SYS_lwp_cond_signal:
case SYS_lwp_cond_broadcast:
break;
case SYS_lwp_sema_trywait:
case SYS_lwp_sema_post:
break;
case SYS_lwp_sema_timedwait:
break;
case SYS_lwp_rwlock_sys:
break;
case SYS_lwp_create:
/* XXX print some values in ucontext ??? */
break;
case SYS_kaio:
break;
case SYS_nanosleep:
break;
case SYS_privsys:
case PRIVSYS_SETPPRIV:
case PRIVSYS_GETPPRIV:
if (!err)
}
break;
case SYS_ucredsys:
case UCREDSYS_UCREDGET:
case UCREDSYS_GETPEERUCRED:
if (err == 0)
break;
}
break;
case SYS_bind:
case SYS_connect:
break;
case SYS_sendto:
break;
case SYS_accept:
break;
case SYS_getsockname:
case SYS_getpeername:
break;
case SYS_cladm:
break;
case SYS_recvfrom:
break;
case SYS_recvmsg:
if (err)
break;
/* FALLTHROUGH */
case SYS_sendmsg:
break;
#ifdef _LP64
if (lp64)
else
#else
#endif
break;
case SYS_door:
break;
case SYS_sendfilev:
break;
}
break;
case SYS_memcntl:
break;
case SYS_lwp_park:
/*
* subcode 0: lwp_park(timespec_t *, id_t)
* subcode 4: lwp_set_park(timespec_t *, id_t)
*/
/* subcode 2: lwp_unpark_all(id_t *, int) */
break;
case SYS_ntp_gettime:
if (!err)
break;
case SYS_ntp_adjtime:
if (!err)
break;
case SYS_rusagesys:
if (!err)
#ifdef _LP64
if (!lp64)
else
#endif
}
break;
case SYS_port:
break;
case SYS_zone:
break;
case SYS_rctlsys:
break;
case SYS_utimesys:
break;
case SYS_sockconfig:
break;
}
}