#ifndef HAVE_STROPTS_H
#define RS_HIPRI 1
struct strbuf {
- int maxlen; /* no. of bytes in buffer */
- int len; /* no. of bytes returned */
- char *buf; /* pointer to data */
+ int maxlen; /* no. of bytes in buffer */
+ int len; /* no. of bytes returned */
+ const char *buf; /* pointer to data */
};
#define MORECTL 1
#define MOREDATA 2
tprintf("{fd=%d}", fds.fd);
continue;
}
- tprintf("{fd=%d, events=", fds.fd);
+ tprintf("{fd=");
+ printfd(tcp, fds.fd);
+ tprintf(", events=");
printflags(pollflags, fds.events, "POLL???");
tprintf("}");
}
} else {
static char outstr[1024];
char str[64];
- const char *flagstr;
+ const char *flagstr;
unsigned int cumlen;
if (syserror(tcp))
strcat(outstr, "]");
if (pts) {
- struct timespec ts;
char str[128];
sprintf(str, "%sleft ", cumlen ? ", " : "");
- if (umove(tcp, pts, &ts) == 0)
- sprintf(str + strlen(str), "{%lu, %lu}",
- ts.tv_sec, ts.tv_nsec);
- else
- strcat(str, "{...}");
+ sprint_timespec(str + strlen(str), tcp, pts);
if ((cumlen += strlen(str)) < sizeof(outstr))
strcat(outstr, str);
}
{
int rc = decode_poll(tcp, tcp->u_arg[2]);
if (entering(tcp)) {
- struct timespec ts;
- if (umove(tcp, tcp->u_arg[2], &ts) == 0)
- tprintf("{%lu, %lu}, ", ts.tv_sec, ts.tv_nsec);
- else
- tprintf("{...}, ");
+ print_timespec(tcp, tcp->u_arg[2]);
+ tprintf(", ");
print_sigset(tcp, tcp->u_arg[3], 0);
tprintf(", %lu", tcp->u_arg[4]);
}
sys_poll(tcp)
struct tcb *tcp;
{
- return 0;
+ return 0;
}
#endif
#endif /* TI_BIND */
-static int
-internal_stream_ioctl(tcp, arg)
-struct tcb *tcp;
-int arg;
+static int internal_stream_ioctl(struct tcb *tcp, int arg)
{
struct strioctl si;
struct ioctlent *iop;
case SI_GETUDATA:
if (entering(tcp))
break;
-#if 0
- tprintf("struct si_udata ");
-#endif
if (umove(tcp, (int) si.ic_dp, &udata) < 0)
tprintf("{...}");
else {
tprintf("servtype=%d, so_state=%d, ",
udata.servtype, udata.so_state);
tprintf("so_options=%d", udata.so_options);
-#if 0
- tprintf(", tsdusize=%d", udata.tsdusize);
-#endif
tprintf("}");
}
break;
}
if (exiting(tcp)) {
tprintf("}");
- if (timod && tcp->u_rval) {
+ if (timod && tcp->u_rval && !syserror(tcp)) {
tcp->auxstr = xlookup (tli_errors, tcp->u_rval);
return RVAL_STR + 1;
}