strpeek
struct strpeek peek;
register struct strpeek *peekp;
struct strpeek strpeek;
if (Pread(Proc, &strpeek, sizeof (strpeek), offset)
== sizeof (strpeek)) {
print_strbuf(pri, &strpeek.ctlbuf, "ctl", FALSE);
print_strbuf(pri, &strpeek.databuf, "dat", FALSE);
strflags(pri, strpeek.flags));
struct strpeek32 strpeek;
if (Pread(Proc, &strpeek, sizeof (strpeek), offset)
== sizeof (strpeek)) {
print_strbuf32(pri, &strpeek.ctlbuf, "ctl", FALSE);
print_strbuf32(pri, &strpeek.databuf, "dat", FALSE);
strflags(pri, strpeek.flags));
static struct strpeek peek;
struct strpeek *peekp;
struct strpeek arg;
strpeek.ctlbuf.maxlen = (int)sizeof (ctltype);
strpeek.ctlbuf.len = 0;
strpeek.ctlbuf.buf = (char *)&ctltype;
strpeek.databuf.maxlen = 0;
strpeek.databuf.len = 0;
strpeek.databuf.buf = NULL;
strpeek.flags = 0;
retval = ioctl(fd, I_PEEK, &strpeek);
((retval > 0) && (strpeek.ctlbuf.len >=
pptr = (union T_primitives *)strpeek.ctlbuf.buf;
if ((retval > 0) && (strpeek.ctlbuf.len <= 0)) {
if ((retval > 0) && (strpeek.ctlbuf.len > 0)) {
struct strpeek strpeek;
STRUCT_DECL(strpeek, strpeek);
STRUCT_INIT(strpeek, mode);
error = copyin((caddr_t)arg, STRUCT_BUF(strpeek),
STRUCT_SIZE(strpeek));
if (STRUCT_FGET(strpeek, flags) & RS_HIPRI) {
len = STRUCT_FGET(strpeek, databuf.maxlen);
STRUCT_FSET(strpeek, databuf.len, len);
iov.iov_base = STRUCT_FGETP(strpeek, databuf.buf);
STRUCT_FSET(strpeek, databuf.len, len - uio.uio_resid);
STRUCT_FSET(strpeek, flags, 0);
STRUCT_FSET(strpeek, ctlbuf.len, -1);
error = copyout(STRUCT_BUF(strpeek), (caddr_t)arg,
STRUCT_SIZE(strpeek));
STRUCT_DECL(strpeek, strpeek);
STRUCT_INIT(strpeek, flag);
error = strcopyin((void *)arg, STRUCT_BUF(strpeek),
STRUCT_SIZE(strpeek), copyflag);
if ((STRUCT_FGET(strpeek, flags) & RS_HIPRI) &&
(STRUCT_FGET(strpeek, flags) & RS_HIPRI)) {
STRUCT_FSET(strpeek, flags, RS_HIPRI);
STRUCT_FSET(strpeek, flags, 0);
if (STRUCT_FGET(strpeek, ctlbuf.maxlen) < 0)
STRUCT_FSET(strpeek, ctlbuf.len, -1);
else if (STRUCT_FGET(strpeek, ctlbuf.maxlen) == 0)
STRUCT_FSET(strpeek, ctlbuf.len, 0);
iov.iov_base = STRUCT_FGETP(strpeek, ctlbuf.buf);
iov.iov_len = STRUCT_FGET(strpeek, ctlbuf.maxlen);
ASSERT(STRUCT_FGET(strpeek, flags) == 0 ?
STRUCT_FSET(strpeek, ctlbuf.len, -1);
STRUCT_FSET(strpeek, ctlbuf.len,
STRUCT_FGET(strpeek, ctlbuf.maxlen) -
if (STRUCT_FGET(strpeek, databuf.maxlen) < 0)
STRUCT_FSET(strpeek, databuf.len, -1);
else if (STRUCT_FGET(strpeek, databuf.maxlen) == 0)
STRUCT_FSET(strpeek, databuf.len, 0);
iov.iov_base = STRUCT_FGETP(strpeek, databuf.buf);
iov.iov_len = STRUCT_FGET(strpeek, databuf.maxlen);
STRUCT_FSET(strpeek, databuf.len, -1);
STRUCT_FSET(strpeek, databuf.len,
STRUCT_FGET(strpeek, databuf.maxlen) -
if ((fmp == NULL) && STRUCT_FGET(strpeek, databuf.maxlen) > 0) {
STRUCT_FSET(strpeek, databuf.len, STRUCT_FGET(strpeek,
if (STRUCT_FGET(strpeek, databuf.len) == 0) {
STRUCT_FSET(strpeek, databuf.len, -1);
error = strcopyout(STRUCT_BUF(strpeek), (void *)arg,
STRUCT_SIZE(strpeek), copyflag);
if (STRUCT_FGET(strpeek, ctlbuf.len) == -1 &&
STRUCT_FGET(strpeek, databuf.len) == -1)