/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1990-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* list system call message
*/
#include "msglib.h"
#include <ccode.h>
#include <ctype.h>
#include <tm.h>
/*
* print buffer s,n on sp
*/
static int
{
register char* se;
register int c;
register int r = 0;
se = s + n;
PUT(' ');
PUT('"');
while (s < se)
{
c = *((unsigned char*)s++);
{
PUT('\\');
switch (c)
{
case CC_bel:
c = 'a';
break;
case '\b':
c = 'b';
break;
case '\f':
c = 'f';
break;
case '\n':
c = 'n';
break;
case '\r':
c = 'r';
break;
case '\t':
c = 't';
break;
case CC_vt:
c = 'v';
break;
case CC_esc:
c = 'E';
break;
case '"':
break;
default:
c = '0' + (c & 07);
break;
}
}
PUT(c);
}
PUT('"');
return r;
}
/*
* list msg on sp
*/
int
{
register unsigned long at;
register char* p;
register long n;
register int r;
int i;
long* np;
long* ne;
char** vp;
r = 0;
{
if (flags & MSG_LIST_ID)
if (flags & MSG_LIST_STAMP)
{
else
}
}
for (;;)
{
{
case MSG_ARG_array:
continue;
case MSG_ARG_file:
continue;
case MSG_ARG_input:
continue;
case MSG_ARG_output:
{
{
case MSG_CALL(MSG_getdents):
{
#endif
#else
#endif
}
break;
for (i = 0; i < 2; i++)
{
ip++;
}
break;
r += sfprintf(sp, " [ dev=%d ino=%u mode=0%o nlink=%d uid=%d gid=%d size=%lu", st->st_dev, st->st_ino, st->st_mode, st->st_nlink, st->st_uid, st->st_gid, st->st_size);
#endif
#endif
break;
case MSG_CALL(MSG_statfs):
r += sfprintf(sp, " [ bsize=%d frsize=%d blocks=%d bfree=%d bavail=%d files=%d ffree=%d favail=%d", fp->f_bsize, fp->f_frsize, fp->f_blocks, fp->f_bfree, fp->f_bavail, fp->f_files, fp->f_ffree, fp->f_favail);
#endif
#endif
#endif
break;
default:
break;
}
continue;
}
/*FALLTHROUGH*/
case MSG_ARG_number:
continue;
case MSG_ARG_string:
continue;
case MSG_ARG_vector:
else
{
while (p = *vp++)
}
continue;
}
break;
}
{
case 0:
break;
case MSG_ARG_file:
break;
default:
break;
}
return r;
}