- u.u_error = rdwri(UIO_WRITE, ip,
- (caddr_t)&u,
- ctob(UPAGES),
- 0, 1, (int *)0);
- if (u.u_error == 0)
- u.u_error = rdwri(UIO_WRITE, ip,
- (caddr_t)ctob(dptov(u.u_procp, 0)),
- ctob(u.u_dsize),
- ctob(UPAGES), 0, (int *)0);
- if (u.u_error == 0)
- u.u_error = rdwri(UIO_WRITE, ip,
- (caddr_t)ctob(sptov(u.u_procp, u.u_ssize - 1)),
- ctob(u.u_ssize),
- ctob(UPAGES)+ctob(u.u_dsize), 0, (int *)0);
-out:
- iput(ip);
- return (u.u_error == 0);
+#ifdef HPUXCOMPAT
+ /*
+ * BLETCH! If we loaded from an HPUX format binary file
+ * we have to dump an HPUX style user struct so that the
+ * HPUX debuggers can grok it.
+ */
+ if (u.u_pcb.pcb_flags & PCB_HPUXBIN)
+ error = hpuxdumpu(vp, ndp->ni_cred);
+ else
+#endif
+ error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&u, ctob(UPAGES), (off_t)0,
+ UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, ndp->ni_cred, (int *)0);
+ if (error == 0)
+ error = vn_rdwr(UIO_WRITE, vp,
+ (caddr_t)ctob(dptov(p, 0)),
+ (int)ctob(u.u_dsize), (off_t)ctob(UPAGES), UIO_USERSPACE,
+ IO_NODELOCKED|IO_UNIT, ndp->ni_cred, (int *)0);
+ if (error == 0)
+ error = vn_rdwr(UIO_WRITE, vp,
+ (caddr_t)ctob(sptov(p, u.u_ssize - 1)),
+ (int)ctob(u.u_ssize),
+ (off_t)ctob(UPAGES) + ctob(u.u_dsize), UIO_USERSPACE,
+ IO_NODELOCKED|IO_UNIT, ndp->ni_cred, (int *)0);
+ vput(vp);
+ return (error);
+}
+
+/*
+ * Nonexistent system call-- signal process (may want to handle it).
+ * Flag error in case process won't see signal immediately (blocked or ignored).
+ */
+/* ARGSUSED */
+nosys(p, args, retval)
+ struct proc *p;
+ void *args;
+ int *retval;
+{
+
+ psignal(p, SIGSYS);
+ return (EINVAL);