nfs_trace.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 1992 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Portions of this source code were derived from Berkeley 4.3 BSD
* under license from the Regents of the University of California.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#include <rpcsvc/nfs_prot.h>
static void
p_void(void)
{
}
static struct statent {
char *str;
} stattab[] = {
{ NFS_OK, "NFS_OK" },
{ NFSERR_PERM, "NFSERR_PERM" },
{ NFSERR_NOENT, "NFSERR_NOENT" },
{ NFSERR_IO, "NFSERR_IO" },
{ NFSERR_NXIO, "NFSERR_NXIO" },
{ NFSERR_ACCES, "NFSERR_ACCES" },
{ NFSERR_EXIST, "NFSERR_EXIST" },
{ NFSERR_NODEV, "NFSERR_NODEV" },
{ NFSERR_NOTDIR, "NFSERR_NOTDIR" },
{ NFSERR_ISDIR, "NFSERR_ISDIR" },
{ NFSERR_FBIG, "NFSERR_FBIG" },
{ NFSERR_NOSPC, "NFSERR_NOSPC" },
{ NFSERR_ROFS, "NFSERR_ROFS" },
{ NFSERR_NAMETOOLONG, "NFSERR_NAMETOOLONG" },
{ NFSERR_NOTEMPTY, "NFSERR_NOTEMPTY" },
{ NFSERR_DQUOT, "NFSERR_DQUOT" },
{ NFSERR_STALE, "NFSERR_STALE" },
{ NFSERR_WFLUSH, "NFSERR_WFLUSH" },
};
static void
{
int i;
for (i = 0; i < STATTABSIZE; i++) {
return;
}
}
}
#ifdef DEBUG
struct internal_fh {
/* must be 12 bytes! */
};
#endif
static void
{
#ifdef DEBUG
/*LINTED: alignment ok*/
(void) nfstrace("fh=[0x%llx/%#o/%#o/%#o]",
#else /* DEBUG */
/*LINTED: alignment ok*/
#endif /* DEBUG */
}
static void
p_diropargs(diropargs *d)
{
}
static void
{
char *s;
/*LINTED: alignment ok*/
s[strlen(s) - 1] = 0;
(void) nfstrace("%s", s);
}
static void
{
(void) nfstrace("type = %u, mode = %o, nlink = %u, uid = %u, \
gid = %u, size = %u, blocksize = %u, rdev = %u, blocks = %u, \
fsid = %u, fileid = %u",
(void) nfstrace(", atime=");
(void) nfstrace(", mtime=");
(void) nfstrace(", ctime=");
}
static void
{
(void) nfstrace("mode=%o, uid=%u, gid=%u, size=%u",
(void) nfstrace(", atime=");
(void) nfstrace(", mtime=");
}
static void
p_diropres(diropres *d)
{
(void) nfstrace(", ");
(void) nfstrace(", ");
}
}
static void
{
(void) nfstrace(", ");
}
static void
{
(void) nfstrace(", ");
}
}
static void
{
}
}
static void
p_readargs(readargs *r)
{
}
static void
{
(void) nfstrace(", ");
(void) nfstrace(", len=%u, data=(data)",
}
}
static void
p_writeargs(writeargs *w)
{
(void) nfstrace(", offset=%u, len=%u, data=(data)",
}
static void
{
p_diropargs(&c->where);
(void) nfstrace(", ");
p_sattr(&c->attributes);
}
static void
{
p_diropargs(&r->from);
(void) nfstrace(", ");
p_diropargs(&r->to);
}
static void
{
(void) nfstrace(", ");
}
static void
{
}
static void
{
(void) nfstrace(
", tsize=%d, bsize=%d, blocks=%d, bfree=%d, bavail=%d",
}
}
static void
{
(void) nfstrace(", cookie=%d, count=%d",
/*LINTED: alignment ok*/
}
static void
{
while (p != NULL) {
(void) nfstrace("(fileid=%u, name=%s, cookie=%u), ",
/*LINTED: alignment ok*/
p = p->nextentry;
}
}
static void
{
}
}
static struct procinfo {
char *name;
void (*pargs)();
void (*pres)();
} procs[] = {
};
void
{
(void) nfstrace(")\n");
}
void
{
(void) nfstrace(")\n");
}