Subject: Yet another set of patches: /netbsd goes multi-user on Ultrix root!
To: None <gallatin@isds.Duke.EDU>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 08/18/1994 14:52:22
In an e-mail, Andrew Gallatin writes:
>Thanks for the EPERM stuff.
>I managed to figure out the osetdomain/ogetdomain support myself last
>night, but I'm still fairly clueless about the iotcl support. Can you
>give me a hint?
I have a machine that's up, multi-user, with /usr mounted read-write
and the rest of my research group's world NFS-mounted read-write.
The root is readonly. Rsh works. csh and tcsh work -- I had to hack
kern_prot to set both effective and real/saved ids in osetre{gid,uid}.
Automaticall produced context diffs from the sup tree on sunlamp
(which doesn't seem to have been updated yet) follow. This is (I
think) a collection of everything I've hacked, including the two sets
of patches I posted earlier. Ugh.
Note that the root is still mounted read-only; so one needs to be
careful to point /tmp and /var/tmp to a writable partition I used
/usr/tmp. And netbsd calls Lance interfaces "le", not "ln". And I
don't start an Ultrix mountd; it seems to hang. Removing /etc/exports
worked for me.
Something about process groups and/or job control is broken;
csh/tcsh commands that do tty i/o seem to get backgrounded
when they're first created. Perhaps as an unwanted side
effect of setting the process group? I dunno.
I'd like to get that fixed, and hack up a telnetd and rlogind that
work with the NetBSD ptys. The Ultrix binaries appear to just hang.
Either the device numbers I hacked are wrong, or NetBSD has a sensible
mechanism for allocating pty's. Eithe way, if I can compile an
rlogind and telnetd, I can leave NetBSD running for "real" work.
The TGSETP "compatibility" below is a total hack. Ultrix has nearly all the
functionality of NetBSD's termios interface; but the special
characters are stored in a different order. Try "stty everything" and
"stty posix" and see the difference :). The same appears to be true
of the termios control flags, too. It'd be nice to change them -- not
all the world's a Sun! -- but that'd be kind of gross. If someone
wanted to write code that mapped the special control characters I'd be
happy.
Warning: I haven't even read these patches carefully. Use at your own
risk. Caveat Emptor. Especially the mounting of Ultrix partitions
read-write. It works for me; but the result looks _really_ bad to
Ultrix fsck. (I use fsck -b32 to repair the filesystem, under Ultrix,
then boot NetBSD in order to mount it.) I tried cross-compiling fsck,
with the Ultrix stdio and _nothing_ else (gcc -nostdin
-Ilots-of-netBSD-include-paths), but that loses. It links but when
run, it says the magic number is wrong.
The changes I made to pmax/pmax/mem.c are gross; I was trying to
discard all output intended for elcsd. It didn't work. (I though that
was the cause of Ultrix /bin/login not working, but it turned out to
be something else.) I suppose in principle one could write a device
that accepts Ultrix errorlog records, translates them to syslog
entries and puts them in /dev/log, but why bother?
What's the progress on compiling some native binaries? They'd
come in really useful right now...
--Jonathan
*** sys/compat/ultrix/ultrix_misc.c.DIST Mon Aug 1 13:22:03 1994
--- sys/compat/ultrix/ultrix_misc.c Thu Aug 18 05:36:27 1994
***************
*** 260,274 ****
return (unmount(p, uap, retval));
}
- #define SUNM_RDONLY 0x01 /* mount fs read-only */
- #define SUNM_NOSUID 0x02 /* mount fs with setuid disallowed */
- #define SUNM_NEWTYPE 0x04 /* type is string (char *), not int */
- #define SUNM_GRPID 0x08 /* (bsd semantics; ignored) */
- #define SUNM_REMOUNT 0x10 /* update existing mount */
- #define SUNM_NOSUB 0x20 /* prevent submounts (rejected) */
- #define SUNM_MULTI 0x40 /* (ignored) */
- #define SUNM_SYS5 0x80 /* Sys 5-specific semantics (rejected) */
struct sun_nfs_args {
struct sockaddr_in *addr; /* file server address */
caddr_t fh; /* file handle to be mounted */
--- 260,281 ----
return (unmount(p, uap, retval));
}
+ #define ULT_NM_RONLY 0x0001 /* mount read-only */
+ #define ULT_NM_SOFT 0x0002 /* soft mount (hard is default) */
+ #define ULT_NM_WSIZE 0x0004 /* set write size */
+ #define ULT_NM_RSIZE 0x0008 /* set read size */
+ #define ULT_NM_TIMEO 0x0010 /* set initial timeout */
+ #define ULT_NM_RETRANS 0x0020 /* set number of request retrys */
+ #define ULT_NM_HOSTNAME 0x0040 /* set hostname for error printf */
+ #define ULT_NM_PGTHRESH 0x0080 /* set page threshold for exec */
+ #define ULT_NM_INT 0x0100 /* allow hard mount keyboard interrupts */
+ #define ULT_NM_NOAC 0x0200 /* don't cache attributes */
+
+
+ #define ULT_FSTYPE_UFS 1
+ #define ULT_FSTYPE_NFS 5
+
struct sun_nfs_args {
struct sockaddr_in *addr; /* file server address */
caddr_t fh; /* file handle to be mounted */
***************
*** 292,357 ****
int flags;
caddr_t data;
};
! sun_mount(p, uap, retval)
struct proc *p;
! struct sun_mount_args *uap;
int *retval;
{
! int oflags = uap->flags, nflags, error;
extern char sigcode[], esigcode[];
char fsname[MFSNAMELEN];
#define szsigcode (esigcode - sigcode)
! if (oflags & (SUNM_NOSUB | SUNM_SYS5))
return (EINVAL);
! if ((oflags & SUNM_NEWTYPE) == 0)
! return (EINVAL);
! nflags = 0;
! if (oflags & SUNM_RDONLY)
! nflags |= MNT_RDONLY;
! if (oflags & SUNM_NOSUID)
! nflags |= MNT_NOSUID;
! if (oflags & SUNM_REMOUNT)
! nflags |= MNT_UPDATE;
! uap->flags = nflags;
! if (error = copyinstr((caddr_t)uap->type, fsname, sizeof fsname, (u_int *)0))
return (error);
! if (strcmp(fsname, "4.2") == 0) {
! uap->type = (caddr_t)ALIGN(PS_STRINGS - szsigcode - STACKGAPLEN);
! if (error = copyout("ufs", uap->type, sizeof("ufs")))
! return (error);
! } else if (strcmp(fsname, "nfs") == 0) {
! struct sun_nfs_args sna;
! struct sockaddr_in sain;
struct nfs_args na;
! struct sockaddr sa;
! if (error = copyin(uap->data, &sna, sizeof sna))
! return (error);
! if (error = copyin(sna.addr, &sain, sizeof sain))
return (error);
! bcopy(&sain, &sa, sizeof sa);
! sa.sa_len = sizeof(sain);
! uap->data = (caddr_t)ALIGN(PS_STRINGS - szsigcode - STACKGAPLEN);
! na.addr = (struct sockaddr *)((int)uap->data + sizeof na);
na.sotype = SOCK_DGRAM;
na.proto = IPPROTO_UDP;
! na.fh = (nfsv2fh_t *)sna.fh;
! na.flags = sna.flags;
! na.wsize = sna.wsize;
! na.rsize = sna.rsize;
! na.timeo = sna.timeo;
! na.retrans = sna.retrans;
! na.hostname = sna.hostname;
! if (error = copyout(&sa, na.addr, sizeof sa))
return (error);
! if (error = copyout(&na, uap->data, sizeof na))
return (error);
}
return (mount(p, uap, retval));
}
--- 299,484 ----
int flags;
caddr_t data;
};
! /*XXX* Ultrix mount(2) not the same as SunOS*/
!
! struct ult_mount_args {
! char *special;
! char *dir;
! int rdonly, type;
! caddr_t data;
! };
!
! struct osockaddr_in {
! short sin_family;
! u_short sin_port;
! struct in_addr sin_addr;
! char sin_zero[8];
! };
!
! struct ult_nfs_args {
! struct osockaddr_in *addr; /* file server address */
! nfsv2fh_t *fh; /* file handle to be mounted */
! int flags; /* flags */
! int wsize; /* write size in bytes */
! int rsize; /* read size in bytes */
! int timeo; /* initial timeout in .1 secs */
! int retrans; /* times to retry send */
! char *hostname; /* server's hostname */
! char *optstr; /* string of nfs mount options*/
! int gfs_flags; /* gnode flags (ugh) */
! int pg_thresh; /* paging threshold ? */
! };
!
! struct ult_ufs_args {
! u_long ufs_flags; /* mount flags?*/
! u_long ufs_pgthresh; /* minimum file size to page */
! };
!
! int
! ultrix_mount(p, uap, retval)
struct proc *p;
! struct ult_mount_args *uap;
int *retval;
{
! int error;
! int otype = uap->type;
extern char sigcode[], esigcode[];
char fsname[MFSNAMELEN];
+ char * fstype;
+ struct sun_mount_args fixed;
#define szsigcode (esigcode - sigcode)
+ caddr_t usp = (caddr_t)ALIGN(PS_STRINGS - szsigcode - STACKGAPLEN);
! fixed.flags = 0;
! /*
! * fix up Ultrix mount codes for UFS and NFS.
! * Other filesystem types (msdos, DEC ods-2) not yet done */
! if (otype == ULT_FSTYPE_UFS)
! fstype = "ufs";
! else if (otype == ULT_FSTYPE_NFS)
! fstype = "nfs";
! else
return (EINVAL);
!
! if (uap->rdonly)
! fixed.flags |= MNT_RDONLY;
! /* copy string-ified version of mount type in user space */
! fixed.type = (char *)usp;
! if (error = copyout(fstype, fixed.type, strlen(fstype)+1)) {
return (error);
+
+ }
+ usp += strlen(fstype)+1;
! #ifdef later
! parse ultrix mount option string and set flags
! #endif
! fixed.dir = uap->dir;
!
! if (otype == ULT_FSTYPE_UFS) {
! struct ufs_args ua;
!
! ua.fspec = uap->special;
! bzero(&ua.export, sizeof(ua.export));
! fixed.data = usp;
!
! if (error = copyout(&ua, fixed.data, sizeof ua)) {
! return(error);
! }
! } else if (otype == ULT_FSTYPE_NFS) {
! struct ult_nfs_args una;
struct nfs_args na;
! struct osockaddr_in osa;
! struct sockaddr_in *sap = (struct sockaddr_in *)& osa;
! bzero(&osa, sizeof(osa));
! bzero(&una, sizeof(una));
!
! if (error = copyin(uap->data, &una, sizeof una)) {
return (error);
! }
! #ifdef DEBUG_COMPAT
! /*XXX*/ printf("ultrix mount: ipa %x, fh ptr 0x%x, h 0x%x\n",
! una.addr, una.fh, una.hostname);
! /*XXX*/ printf("ultrix mount: flags %x gfl rsize %d w %d to %d retr %d\n",
! una.flags, una.gfs_flags, una.rsize, una.wsize, una.timeo, una.retrans);
! #endif
!
! if (error = copyin(una.addr, &osa, sizeof osa)) {
! printf("ult_mount: nfs copyin osa\n");
! /*return (error);*/
! }
!
! #ifdef DEBUG_COMPAT
! /*XXX*/ printf("ultrix mount: host %x\n", una.hostname);
! printf(" IP %x fam %d\n", ntohl(osa.sin_addr.s_addr),
! osa.sin_family);
! #endif
! sap->sin_family = (u_char)osa.sin_family;
! sap->sin_len = sizeof(*sap);
! fixed.data = usp;
! usp += sizeof (na);
! na.addr = (struct sockaddr *)usp;
! usp += sizeof(*sap);
! na.addrlen = sap->sin_len;
na.sotype = SOCK_DGRAM;
na.proto = IPPROTO_UDP;
! na.fh = una.fh;
! na.flags = /*una.flags;*/ NFSMNT_NOCONN | NFSMNT_RESVPORT;
! na.wsize = una.wsize;
! na.rsize = una.rsize;
! na.timeo = una.timeo;
! na.retrans = una.retrans;
! na.hostname = una.hostname;
! if (error = copyout(sap, na.addr, sizeof (*sap) )) {
return (error);
! }
! if (error = copyout(&na, fixed.data, sizeof na)) {
return (error);
+ }
+ }
+
+ /* juggle fields */
+ bcopy(&fixed, uap, sizeof(fixed));
+
+ #ifdef DEBUG_COMPAT
+ fsname[0] = 0;
+ copyinstr(fixed.type, fsname, sizeof fsname, (u_int*)0);
+ printf("mount: type \"%s\" ", fsname);
+
+ fsname[0] = 0;
+ error = copyinstr((caddr_t)fixed.dir, fsname, sizeof fsname,
+ (u_int*)0);
+ printf("on path \"%s\", flags 0x%x", fsname, fixed.flags);
+ if (error) printf("WARNING: copyinstr() failed\n");
+
+ if (otype == ULT_FSTYPE_UFS) {
+ struct ufs_args tem;
+ error = copyin(fixed.data, &tem, sizeof(tem));
+ if (error) printf("WARNING: copyin() ufs_args failed\n");
+ error = copyinstr((caddr_t)tem.fspec, fsname, sizeof fsname,
+ (u_int*)0);
+ if (error) printf("WARNING: copyinstr() fspec failed\n");
+ printf("special \"%s\"\n", fsname);
+ } else {
+ struct nfs_args na;
+ struct sockaddr_in sin;
+ if (error = copyin(fixed.data, &na, sizeof na)) {
+ printf("WARNING: nfs copyin na\n");
+ }
+ if (error = copyin(na.addr, &sin, sizeof sin)) {
+ printf("WARNING: nfs copyin sin\n");
+ }
+ fsname[0] = 0;
+ if (error = copyinstr(na.hostname, fsname, sizeof fsname,
+ (u_int*)0))
+ printf("WARNING: nfs hostname at 0x%x\n", na.hostname);
+ printf("hostname %s\n", fsname);
}
+ #endif
return (mount(p, uap, retval));
}
*** sys/compat/ultrix/syscalls.master.DIST Mon Aug 1 13:22:00 1994
--- sys/compat/ultrix/syscalls.master Thu Aug 18 02:10:36 1994
***************
*** 41,47 ****
18 COMPAT 2 sun_stat
19 STD 3 olseek lseek
20 STD 0 getpid
! 21 STD 4 sun_mount
22 STD 2 sun_unmount
23 COMPAT 1 setuid
24 STD 0 getuid
--- 41,47 ----
18 COMPAT 2 sun_stat
19 STD 3 olseek lseek
20 STD 0 getpid
! 21 STD 5 ultrix_mount
22 STD 2 sun_unmount
23 COMPAT 1 setuid
24 STD 0 getuid
***************
*** 169,175 ****
146 STD 2 okillpg
147 UNIMPL 0 nosys
148 UNIMPL 0 setquota
! 149 UNIMPL 0 quota
150 STD 3 ogetsockname
151 UNIMPL 4 sysmips
152 UNIMPL 4 cacheflush
--- 169,175 ----
146 STD 2 okillpg
147 UNIMPL 0 nosys
148 UNIMPL 0 setquota
! 149 STD 0 nullop quota
150 STD 3 ogetsockname
151 UNIMPL 4 sysmips
152 UNIMPL 4 cacheflush
***************
*** 185,196 ****
162 STD 1 sun_unmount
163 STD 0 async_daemon
164 STD 2 getfh
! 165 UNIMPL 2 ogetdomainname
! 166 UNIMPL 2 osetdomainname
167 UNIMPL 0 nosys
168 STD 4 sun_quotactl
169 STD 2 sun_exportfs
! 170 STD 4 sun_mount
171 UNIMPL 4 hdwconf
#ifdef SYSVMSG
172 UNIMPL 0 msgctl
--- 185,196 ----
162 STD 1 sun_unmount
163 STD 0 async_daemon
164 STD 2 getfh
! 165 STD 2 ogetdomainname
! 166 STD 2 osetdomainname
167 UNIMPL 0 nosys
168 STD 4 sun_quotactl
169 STD 2 sun_exportfs
! 170 STD 5 ultrix_mount
171 UNIMPL 4 hdwconf
#ifdef SYSVMSG
172 UNIMPL 0 msgctl
***************
*** 270,277 ****
230 UNIMPL 0 nosys
231 UNIMPL 0 nosys
232 UNIMPL 0 nosys
! 233 UNIMPL 0 nosys
! 234 UNIMPL 0 nosys
235 UNIMPL 0 nosys
236 UNIMPL 0 nosys
237 UNIMPL 0 nosys
--- 270,277 ----
230 UNIMPL 0 nosys
231 UNIMPL 0 nosys
232 UNIMPL 0 nosys
! 233 UNIMPL 1 utc_gettime
! 234 UNIMPL 2 utc_adjtime
235 UNIMPL 0 nosys
236 UNIMPL 0 nosys
237 UNIMPL 0 nosys
***************
*** 289,296 ****
249 UNIMPL 0 nosys
250 UNIMPL 0 nosys
251 UNIMPL 0 nosys
! 252 UNIMPL 0 audctl
! 253 UNIMPL 0 audgen
254 UNIMPL 0 startcpu
255 UNIMPL 0 stopcpu
256 STD 5 ultrix_getsysinfo
--- 289,296 ----
249 UNIMPL 0 nosys
250 UNIMPL 0 nosys
251 UNIMPL 0 nosys
! 252 STD 5 nullop audctl
! 253 STD 3 nullop audgen
254 UNIMPL 0 startcpu
255 UNIMPL 0 stopcpu
256 STD 5 ultrix_getsysinfo
*** sys/kern/tty.c.DIST Wed Aug 3 12:25:16 1994
--- sys/kern/tty.c Thu Aug 18 03:37:32 1994
***************
*** 641,647 ****
case TIOCSTAT:
case TIOCSTI:
case TIOCSWINSZ:
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS)
case TIOCLBIC:
case TIOCLBIS:
case TIOCLSET:
--- 641,647 ----
case TIOCSTAT:
case TIOCSTI:
case TIOCSWINSZ:
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_ULTRIX)
case TIOCLBIC:
case TIOCLBIS:
case TIOCLSET:
***************
*** 723,730 ****
*(struct winsize *)data = tp->t_winsize;
break;
case TIOCGPGRP: /* get pgrp of tty */
! if (!isctty(p, tp))
return (ENOTTY);
*(int *)data = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
break;
#ifdef TIOCHPCL
--- 723,734 ----
*(struct winsize *)data = tp->t_winsize;
break;
case TIOCGPGRP: /* get pgrp of tty */
! if (!isctty(p, tp)) {
! #ifdef COMPAT_ULTRIX
! /*DSG*/ printf("tty: getpgrp, not a tty\n");
! #endif
return (ENOTTY);
+ }
*(int *)data = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
break;
#ifdef TIOCHPCL
***************
*** 870,877 ****
case TIOCSPGRP: { /* set pgrp of tty */
register struct pgrp *pgrp = pgfind(*(int *)data);
! if (!isctty(p, tp))
return (ENOTTY);
else if (pgrp == NULL || pgrp->pg_session != p->p_session)
return (EPERM);
tp->t_pgrp = pgrp;
--- 874,885 ----
case TIOCSPGRP: { /* set pgrp of tty */
register struct pgrp *pgrp = pgfind(*(int *)data);
! if (!isctty(p, tp)) {
! #ifdef COMPAT_ULTRIX
! /*DSG*/ printf("tty: setpgrp, not a ctty\n");
! #endif
return (ENOTTY);
+ }
else if (pgrp == NULL || pgrp->pg_session != p->p_session)
return (EPERM);
tp->t_pgrp = pgrp;
***************
*** 888,894 ****
}
break;
default:
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS)
return (ttcompat(tp, cmd, data, flag, p));
#else
return (-1);
--- 896,902 ----
}
break;
default:
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_ULTRIX)
return (ttcompat(tp, cmd, data, flag, p));
#else
return (-1);
*** sys/kern/sys_generic.c.DIST Wed Jun 29 03:29:06 1994
--- sys/kern/sys_generic.c Thu Aug 18 02:54:51 1994
***************
*** 402,409 ****
* copied to/from the user's address space.
*/
size = IOCPARM_LEN(com);
! if (size > IOCPARM_MAX)
return (ENOTTY);
memp = NULL;
if (size > sizeof (stkbuf)) {
memp = (caddr_t)malloc((u_long)size, M_IOCTLOPS, M_WAITOK);
--- 402,413 ----
* copied to/from the user's address space.
*/
size = IOCPARM_LEN(com);
! if (size > IOCPARM_MAX) {
! #ifdef COMPAT_ULTRIX
! /*DSG*/ printf("ioctl: size %d too big\n", size);
! #endif
return (ENOTTY);
+ }
memp = NULL;
if (size > sizeof (stkbuf)) {
memp = (caddr_t)malloc((u_long)size, M_IOCTLOPS, M_WAITOK);
*** sys/kern/tty_pty.c.DIST Wed Jun 29 03:29:11 1994
--- sys/kern/tty_pty.c Thu Aug 18 03:34:46 1994
***************
*** 661,667 ****
case TIOCSETP:
case TIOCSETN:
#endif
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS)
case TIOCSETC:
case TIOCSLTC:
case TIOCLBIS:
--- 661,667 ----
case TIOCSETP:
case TIOCSETN:
#endif
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_ULTRIX)
case TIOCSETC:
case TIOCSLTC:
case TIOCLBIS:
*** sys/kern/kern_xxx.c.DIST Wed Jun 29 03:29:02 1994
--- sys/kern/kern_xxx.c Thu Aug 18 02:54:23 1994
***************
*** 140,146 ****
}
#endif /* COMPAT_43 */
! #if defined(COMPAT_09) || defined(COMPAT_SUNOS) || defined(COMPAT_HPUX)
struct ogetdomainname_args {
char *domainname;
u_int len;
--- 140,146 ----
}
#endif /* COMPAT_43 */
! #if defined(COMPAT_09) || defined(COMPAT_SUNOS) || defined(COMPAT_HPUX) || defined(COMPAT_ULTRIX)
struct ogetdomainname_args {
char *domainname;
u_int len;
***************
*** 177,183 ****
name = KERN_DOMAINNAME;
return (kern_sysctl(&name, 1, 0, 0, uap->domainname, uap->len));
}
! #endif /* COMPAT_09 || COMPAT_SUNOS || COMPAT_HPUX */
#ifdef COMPAT_09
struct outsname {
--- 177,183 ----
name = KERN_DOMAINNAME;
return (kern_sysctl(&name, 1, 0, 0, uap->domainname, uap->len));
}
! #endif /* COMPAT_09 || COMPAT_SUNOS || COMPAT_HPUX || defined(COMPAT_ULTRIX) */
#ifdef COMPAT_09
struct outsname {
*** sys/kern/kern_prot.c.DIST Wed Jun 29 03:29:00 1994
--- sys/kern/kern_prot.c Thu Aug 18 07:01:06 1994
***************
*** 387,393 ****
return (0);
}
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS)
struct setreuid_args {
int ruid;
int euid;
--- 387,393 ----
return (0);
}
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_ULTRIX)
struct setreuid_args {
int ruid;
int euid;
***************
*** 400,406 ****
{
register struct pcred *pc = p->p_cred;
struct seteuid_args args;
!
/*
* we assume that the intent of setting ruid is to be able to get
* back ruid priviledge. So we make sure that we will be able to
--- 400,407 ----
{
register struct pcred *pc = p->p_cred;
struct seteuid_args args;
! register int error;
!
/*
* we assume that the intent of setting ruid is to be able to get
* back ruid priviledge. So we make sure that we will be able to
***************
*** 407,417 ****
* do so, but do not actually set the ruid.
*/
if (uap->ruid != (uid_t)-1 && uap->ruid != pc->p_ruid &&
! uap->ruid != pc->p_svuid)
return (EPERM);
if (uap->euid == (uid_t)-1)
return (0);
args.euid = uap->euid;
return (seteuid(p, &args, retval));
}
--- 408,426 ----
* do so, but do not actually set the ruid.
*/
if (uap->ruid != (uid_t)-1 && uap->ruid != pc->p_ruid &&
! uap->ruid != pc->p_svuid
! #ifdef COMPAT_ULTRIX
! && (suser(pc->pc_ucred, &p->p_acflag))
! #endif
! )
return (EPERM);
if (uap->euid == (uid_t)-1)
return (0);
args.euid = uap->euid;
+ #ifdef COMPAT_ULTRIX
+ if (error = setuid(p, &args, retval))
+ return (error);
+ #endif
return (seteuid(p, &args, retval));
}
***************
*** 427,433 ****
{
register struct pcred *pc = p->p_cred;
struct setegid_args args;
!
/*
* we assume that the intent of setting rgid is to be able to get
* back rgid priviledge. So we make sure that we will be able to
--- 436,442 ----
{
register struct pcred *pc = p->p_cred;
struct setegid_args args;
! register int error;
/*
* we assume that the intent of setting rgid is to be able to get
* back rgid priviledge. So we make sure that we will be able to
***************
*** 434,443 ****
* do so, but do not actually set the rgid.
*/
if (uap->rgid != (gid_t)-1 && uap->rgid != pc->p_rgid &&
! uap->rgid != pc->p_svgid)
return (EPERM);
if (uap->egid == (gid_t)-1)
return (0);
args.egid = uap->egid;
return (setegid(p, &args, retval));
}
--- 443,461 ----
* do so, but do not actually set the rgid.
*/
if (uap->rgid != (gid_t)-1 && uap->rgid != pc->p_rgid &&
! uap->rgid != pc->p_svgid
! #ifdef COMPAT_ULTRIX
! && (suser(pc->pc_ucred, &p->p_acflag))
! #endif
! )
return (EPERM);
if (uap->egid == (gid_t)-1)
return (0);
+ args.egid = uap->egid;
+ #ifdef COMPAT_ULTRIX
+ if (error = setgid(p, &args, retval))
+ return (error);
+ #endif
args.egid = uap->egid;
return (setegid(p, &args, retval));
}
*** sys/kern/tty_compat.c.DIST Wed Aug 3 12:25:17 1994
--- sys/kern/tty_compat.c Thu Aug 18 07:37:50 1994
***************
*** 38,44 ****
/*
* mapping routines for old line discipline (yuck)
*/
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS)
#include <sys/param.h>
#include <sys/systm.h>
--- 38,44 ----
/*
* mapping routines for old line discipline (yuck)
*/
! #if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_ULTRIX)
#include <sys/param.h>
#include <sys/systm.h>
***************
*** 230,237 ****
--- 230,259 ----
tp->t_cflag |= HUPCL;
break;
+ case 0x40247455: /*TCGETP*/
+ { /* get termios struct */
+ struct termios *t = (struct termios *)data;
+
+ bcopy(&tp->t_termios, t, sizeof(struct termios) - 3);
+ /*XXX*/ /* structs dont match. should permute cc_t. */
+ break;
+
+ }
+ case 0x80047463: /*TIOCNMODEM*/
+ tp->t_cflag |= CLOCAL;
+ break;
default:
+
+ #ifdef COMPAT_ULTRIX
+ {
+ printf("compat ioctl(%x) : class '%c', num %d, size %d, inout %x",
+ com, IOCGROUP(com), com&0xFF, IOCPARM_LEN(com)&0xFF, (com >> 24) & 0xFF);
+ }
+ printf(": UNKNOWN, returning success\n");
+ return(0);
+ #else
return (-1);
+ #endif
}
return (0);
}
*** sys/ufs/ffs/ffs_vfsops.c.DIST Wed Jun 29 03:33:30 1994
--- sys/ufs/ffs/ffs_vfsops.c Thu Aug 18 14:25:06 1994
***************
*** 391,398 ****
--- 391,403 ----
}
/* XXX updating 4.2 FFS superblocks trashes rotational layout tables */
if (fs->fs_postblformat == FS_42POSTBLFMT && !ronly) {
+ #ifdef COMPAT_ULTRIX
+ printf("WARNING: 4.2BSD (Ultrix) filesystem mounted read-write!\n");
+ #else
+
error = EROFS; /* XXX what should be returned? */
goto out;
+ #endif
}
ump = malloc(sizeof *ump, M_UFSMNT, M_WAITOK);
bzero((caddr_t)ump, sizeof *ump);
*** sys/arch/pmax/dev/rz.c.DIST Tue Jun 14 03:27:45 1994
--- sys/arch/pmax/dev/rz.c Tue Aug 16 03:15:30 1994
***************
*** 89,94 ****
--- 89,104 ----
* (including the boot area).
*/
static struct size rzdefaultpart[MAXPARTITIONS] = {
+ #ifdef GENERIC /* greedy machines have 64 meg of swap */
+ 0, 32768, /* A */
+ 32768, 131072, /* B */
+ 0, 0, /* C */
+ 17408, 0, /* D */
+ 115712, 0, /* E */
+ 218112, 0, /* F */
+ 163840, 0, /* G */
+ 115712, 0, /* H */
+ #else
0, 16384, /* A */
16384, 65536, /* B */
0, 0, /* C */
***************
*** 97,102 ****
--- 107,113 ----
218112, 0, /* F */
81920, 0, /* G */
115712, 0, /* H */
+ #endif
};
#define RAWPART 2 /* 'c' partition */ /* XXX */
***************
*** 695,702 ****
msg = readdisklabel(dev, rzstrategy, lp, &cd);
if (msg == NULL)
return;
! #if 0
printf("rz%d: WARNING: %s\n", unit, msg);
sc->sc_label.d_magic = DISKMAGIC;
sc->sc_label.d_magic2 = DISKMAGIC;
sc->sc_label.d_type = DTYPE_SCSI;
--- 706,715 ----
msg = readdisklabel(dev, rzstrategy, lp, &cd);
if (msg == NULL)
return;
!
printf("rz%d: WARNING: %s\n", unit, msg);
+ #if 1
+ bzero(lp, sizeof (*lp));
sc->sc_label.d_magic = DISKMAGIC;
sc->sc_label.d_magic2 = DISKMAGIC;
sc->sc_label.d_type = DTYPE_SCSI;
***************
*** 709,717 ****
sc->sc_label.d_sbsize = SBSIZE;
for (i = 0; i < MAXPARTITIONS; i++) {
sc->sc_label.d_partitions[i].p_size =
! rzdefaultpart[i].nblocks;
sc->sc_label.d_partitions[i].p_offset =
rzdefaultpart[i].strtblk;
}
sc->sc_label.d_partitions[RAWPART].p_size = sc->sc_blks;
#endif
--- 722,734 ----
sc->sc_label.d_sbsize = SBSIZE;
for (i = 0; i < MAXPARTITIONS; i++) {
sc->sc_label.d_partitions[i].p_size =
! (rzdefaultpart[i].nblocks) ?
! rzdefaultpart[i].nblocks: sc->sc_blks;
sc->sc_label.d_partitions[i].p_offset =
rzdefaultpart[i].strtblk;
+ printf(" default rz%d%c: start %d len %d\n",
+ unit, "abcdefgh"[i],
+ rzdefaultpart[i].strtblk, rzdefaultpart[i].nblocks);
}
sc->sc_label.d_partitions[RAWPART].p_size = sc->sc_blks;
#endif
***************
*** 740,746 ****
--- 757,770 ----
lp = &sc->sc_label;
if (part >= lp->d_npartitions || lp->d_partitions[part].p_size == 0)
+ {
+ printf("rzopen: ENXIO on rz%d%c unit %d part %d\n",
+ unit, "abcdefg"[part], unit, part);
+ printf("# partions %d, size of %d = %d\n",
+ lp->d_npartitions, lp->d_partitions[part].p_size);
return (ENXIO);
+ }
+
/*
* Warn if a partition is opened that overlaps another
* already open, unless either is the `raw' partition
*** sys/arch/pmax/dev/if_le.c.DIST Mon Jul 25 04:31:59 1994
--- sys/arch/pmax/dev/if_le.c Wed Aug 17 02:01:48 1994
***************
*** 784,790 ****
}
#endif
m->m_flags |= flags;
- et.ether_type = eth_type;
ether_input(&le->sc_if, &et, m);
}
--- 784,789 ----
*** sys/arch/pmax/pmax/conf.c.DIST Mon May 30 04:08:16 1994
--- sys/arch/pmax/pmax/conf.c Wed Aug 17 22:47:46 1994
***************
*** 98,106 ****
struct bdevsw bdevsw[] =
{
! bdev_disk_init(NRZ,rz), /* 0: SCSI disk */
! bdev_swap_init(), /* 1: swap pseudo-device */
bdev_disk_init(NVN,vn), /* 2: vnode disk driver (swap to files) */
};
int nblkdev = sizeof (bdevsw) / sizeof (bdevsw[0]);
--- 98,127 ----
struct bdevsw bdevsw[] =
{
! bdev_notdef(), /* 0: SCSI disk */
! bdev_notdef(), /* 1: vax ht */
bdev_disk_init(NVN,vn), /* 2: vnode disk driver (swap to files) */
+ bdev_notdef(), /* 3: vax rk*/
+ bdev_swap_init(), /* 4: swap pseudo-device*/
+ bdev_notdef(), /* 5: vax tm */
+ bdev_notdef(), /* 6: vax ts */
+ bdev_notdef(), /* 7: vax mt */
+ bdev_notdef(), /* 8: vax tu */
+ bdev_notdef(), /* 9: ?? */
+ bdev_notdef(), /*10: ut */
+ bdev_notdef(), /*11: 11/730 idc */
+ bdev_notdef(), /*12: rx */
+ bdev_notdef(), /*13: uu */
+ bdev_notdef(), /*14: rl */
+ bdev_notdef(), /*15: tmscp */
+ bdev_notdef(), /*16: cs */
+ bdev_notdef(), /*17: md */
+ bdev_notdef(), /*18: st */
+ bdev_notdef(), /*19: sd */
+ bdev_notdef(), /*20: tz */
+ bdev_disk_init(NRZ,rz), /*21: SCSI disk */
+ bdev_notdef(), /*22: ?? */
+ bdev_notdef(), /*23: mscp */
};
int nblkdev = sizeof (bdevsw) / sizeof (bdevsw[0]);
***************
*** 266,280 ****
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
! cdev_ctty_init(1,ctty), /* 1: controlling terminal */
! cdev_mm_init(1,mm), /* 2: /dev/{null,mem,kmem,...} */
! cdev_swap_init(1,sw), /* 3: /dev/drum (swap pseudo-device) */
! cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */
! cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */
cdev_log_init(1,log), /* 6: /dev/klog */
cdev_fd_init(1,fd), /* 7: file descriptor pseudo-dev */
cdev_pm_init(NPM,pm), /* 8: frame buffer */
! cdev_disk_init(NRZ,rz), /* 9: SCSI disk */
cdev_tape_init(NTZ,tz), /* 10: SCSI tape */
cdev_vn_init(NVN,vn), /* 11: vnode disk */
cdev_bpf_init(NBPFILTER,bpf), /* 12: berkeley packet filter */
--- 287,301 ----
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
! cdev_swap_init(1,sw), /* 1: /dev/drum (swap pseudo-device) */
! cdev_ctty_init(1,ctty), /* 2: controlling terminal */
! cdev_mm_init(1,mm), /* 3: /dev/{null,mem,kmem,...} */
! cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */
! cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */
cdev_log_init(1,log), /* 6: /dev/klog */
cdev_fd_init(1,fd), /* 7: file descriptor pseudo-dev */
cdev_pm_init(NPM,pm), /* 8: frame buffer */
! cdev_notdef(), /* 9: old slot for SCSI disk */
cdev_tape_init(NTZ,tz), /* 10: SCSI tape */
cdev_vn_init(NVN,vn), /* 11: vnode disk */
cdev_bpf_init(NBPFILTER,bpf), /* 12: berkeley packet filter */
***************
*** 284,289 ****
--- 305,378 ----
cdev_tty_init(NDC,dc), /* 16: dc7085 serial interface */
cdev_tty_init(NSCC,scc), /* 17: scc 82530 serial interface */
cdev_pm_init(NMFB,mfb), /* 18: mono frame buffer */
+ cdev_notdef(), /* 19: mt */
+ cdev_ptc_init(NPTY,ptc), /* 20: pty master */
+ cdev_tty_init(NPTY,pts), /* 21: pty slave */
+ cdev_notdef(), /* 22: dmf */
+ cdev_notdef(), /* 23: vax 730 idc */
+ cdev_notdef(), /* 24: dn-11 */
+
+ /* 25-28 CSRG reserved to local sites, DEC sez: */
+ cdev_notdef(), /* 25: gpib */
+ cdev_notdef(), /* 26: lpa */
+ cdev_notdef(), /* 27: psi */
+ cdev_notdef(), /* 28: ib */
+ cdev_notdef(), /* 29: ad */
+ cdev_notdef(), /* 30: rx */
+ cdev_notdef(), /* 31: ik */
+ cdev_notdef(), /* 32: rl-11 */
+ cdev_notdef(), /* 33: dhu/dhv */
+ cdev_notdef(), /* 34: Vax Able dmz, mips dc */
+ cdev_notdef(), /* 35: qv */
+ cdev_notdef(), /* 36: tmscp */
+ cdev_notdef(), /* 37: vs */
+ cdev_notdef(), /* 38: vax cn console */
+ cdev_notdef(), /* 39: lta */
+ cdev_notdef(), /* 40: crl (Venus, aka 8600 aka 11/790 console RL02) */
+ cdev_notdef(), /* 41: cs */
+ cdev_notdef(), /* 42: qd, Qdss, vcb02 */
+ cdev_mm_init(1,mm), /* 43: errlog (VMS-lookalike puke) */
+ cdev_notdef(), /* 44: dmb */
+ cdev_notdef(), /* 45: vax ss, mips scc */
+ cdev_notdef(), /* 46: st */
+ cdev_notdef(), /* 47: sd */
+ cdev_notdef(), /* 48: Ultrix /dev/trace */
+ cdev_notdef(), /* 49: sm (sysV shm?) */
+ cdev_notdef(), /* 50 sg */
+ cdev_notdef(), /* 51: sh tty */
+ cdev_notdef(), /* 52: its */
+ cdev_notdef(), /* 53: nodev */
+ cdev_notdef(), /* 54: nodev */
+ cdev_notdef(), /* 55: tz */
+ cdev_disk_init(NRZ,rz), /* 56: rz scsi, Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 57: nodev */
+ cdev_notdef(), /* 58: fc */
+ cdev_notdef(), /* 59: mscp, again Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 60: mscp, again Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 61: mscp, again Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 62: mscp, again Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 63: mscp, again Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 64: mscp, again Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 65: mscp, again Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 66: mscp, again Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 67: mscp, again Ultrix gross coupling to PrestoServe driver */
+ cdev_notdef(), /* 68: ld */
+ cdev_notdef(), /* 69: /dev/audit */
+ cdev_notdef(), /* 70: Mogul (nee' CMU) packetfilter */
+ cdev_notdef(), /* 71: xcons, mips Ultrix /dev/xcons virtual console nightmare */
+ cdev_notdef(), /* 72: xa */
+ cdev_notdef(), /* 73: utx */
+ cdev_notdef(), /* 74: sp */
+ cdev_notdef(), /* 75: pr Ultrix PrestoServe NVRAM pseudo-device control device */
+ cdev_notdef(), /* 76: ultrix disk shadowing */
+ cdev_notdef(), /* 77: ek */
+ cdev_notdef(), /* 78: msdup ? */
+ cdev_notdef(), /* 79: so-called multimedia audio A */
+ cdev_notdef(), /* 80: so-called multimedia audio B */
+ cdev_notdef(), /* 81: so-called multimedia video in */
+ cdev_notdef(), /* 82: so-called multimedia video out */
+ cdev_notdef(), /* 83: fd */
+ cdev_notdef(), /* 84: DTi */
};
int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);
***************
*** 348,354 ****
/* NOTREACHED */
}
! #define MAXDEV 19
static int chrtoblktbl[MAXDEV] = {
/* VCHR */ /* VBLK */
/* 0 */ NODEV,
--- 437,443 ----
/* NOTREACHED */
}
! #define MAXDEV 60
static int chrtoblktbl[MAXDEV] = {
/* VCHR */ /* VBLK */
/* 0 */ NODEV,
***************
*** 362,368 ****
/* 8 */ NODEV,
/* 9 */ 0,
/* 10 */ NODEV,
! /* 11 */ 2,
/* 12 */ NODEV,
/* 13 */ NODEV,
/* 14 */ NODEV,
--- 451,457 ----
/* 8 */ NODEV,
/* 9 */ 0,
/* 10 */ NODEV,
! /* 11 */ NODEV,
/* 12 */ NODEV,
/* 13 */ NODEV,
/* 14 */ NODEV,
***************
*** 370,375 ****
--- 459,505 ----
/* 16 */ NODEV,
/* 17 */ NODEV,
/* 18 */ NODEV,
+ /* 19 */ NODEV,
+ /* 20 */ NODEV,
+ /* 21 */ NODEV,
+ /* 22 */ NODEV,
+ /* 23 */ NODEV,
+ /* 24 */ NODEV,
+ /* 25 */ NODEV,
+ /* 26 */ NODEV,
+ /* 27 */ NODEV,
+ /* 28 */ NODEV,
+ /* 29 */ NODEV,
+ /* 30 */ NODEV,
+ /* 31 */ NODEV,
+ /* 32 */ NODEV,
+ /* 33 */ NODEV,
+ /* 34 */ NODEV,
+ /* 35 */ NODEV,
+ /* 36 */ NODEV,
+ /* 37 */ NODEV,
+ /* 38 */ NODEV,
+ /* 39 */ NODEV,
+ /* 40 */ NODEV,
+ /* 41 */ NODEV,
+ /* 42 */ NODEV,
+ /* 43 */ NODEV,
+ /* 44 */ NODEV,
+ /* 45 */ NODEV,
+ /* 46 */ NODEV,
+ /* 47 */ NODEV,
+ /* 48 */ NODEV,
+ /* 49 */ NODEV,
+ /* 50 */ NODEV,
+ /* 51 */ NODEV,
+ /* 52 */ NODEV,
+ /* 53 */ NODEV,
+ /* 54 */ NODEV,
+ /* 55 */ NODEV,
+ /* 56 */ 21,
+ /* 57 */ NODEV,
+ /* 58 */ NODEV,
+ /* 59 */ NODEV,
};
/*
* Routine to convert from character to block device number.
*** sys/arch/pmax/pmax/autoconf.c.DIST Wed Aug 17 18:09:43 1994
--- sys/arch/pmax/pmax/autoconf.c Wed Aug 17 18:05:25 1994
***************
*** 38,44 ****
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
! * $Id: autoconf.c,v 1.1 1994/05/30 11:08:11 jonathan Exp $
*/
/*
--- 38,44 ----
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
! * $Id: autoconf.c,v 1.2 1994/08/17 23:15:22 jonathan Exp jonathan $
*/
/*
***************
*** 228,234 ****
u_long bootdev; /* should be dev_t, but not until 32 bits */
static char devname[][2] = {
! 'r','z', /* 0 = rz */
};
#define PARTITIONMASK 0x7
--- 228,257 ----
u_long bootdev; /* should be dev_t, but not until 32 bits */
static char devname[][2] = {
! 0, 0, /* 0 = rz */
! 0, 0, /* 1 = vax ht */
! 0, 0, /* 2 = ?? */
! 'r','k', /* 3 = rk */
! 0, 0, /* 4 = sw */
! 't','m', /* 5 = tm */
! 't','s', /* 6 = ts */
! 'm','t', /* 7 = mt */
! 'r','t', /* 8 = rt*/
! 0, 0, /* 9 = ?? */
! 'u','t', /* 10 = ut */
! 'i','d', /* 11 = 11/725 idc */
! 'r','x', /* 12 = rx */
! 'u','u', /* 13 = uu */
! 'r','l', /* 14 = rl */
! 't','u', /* 15 = tmscp */
! 'c','s', /* 16 = cs */
! 'm','d', /* 17 = md */
! 's','t', /* 18 = st */
! 's','d', /* 19 = sd */
! 't','z', /* 20 = tz */
! 'r','z', /* 21 = rz */
! 0, 0, /* 22 = ?? */
! 'r','a', /* 23 = rz */
};
#define PARTITIONMASK 0x7
*** sys/arch/pmax/pmax/swapgeneric.c.DIST Thu Jun 16 03:22:16 1994
--- sys/arch/pmax/pmax/swapgeneric.c Mon Aug 15 20:15:50 1994
***************
*** 68,74 ****
char *gc_name;
dev_t gc_root;
} genericconf[] = {
! { (caddr_t)&rzdriver, "rz", makedev(0, 0), },
{ 0 },
};
--- 68,74 ----
char *gc_name;
dev_t gc_root;
} genericconf[] = {
! { (caddr_t)&rzdriver, "rz", makedev(21, 0), },
{ 0 },
};
*** sys/arch/pmax/pmax/mem.c.DIST Mon May 30 04:08:32 1994
--- sys/arch/pmax/pmax/mem.c Wed Aug 17 22:47:20 1994
***************
*** 70,75 ****
--- 70,76 ----
int error = 0;
caddr_t zbuf = NULL;
extern vm_offset_t avail_end;
+ register int devminor = minor(dev);
while (uio->uio_resid > 0 && error == 0) {
iov = uio->uio_iov;
***************
*** 80,86 ****
panic("mmrw");
continue;
}
! switch (minor(dev)) {
/* minor device 0 is physical memory */
case 0:
--- 81,91 ----
panic("mmrw");
continue;
}
! #ifdef COMPAT_ULTRIX
! if (major(dev) == 43)
! devminor = 2;
! #endif
! switch (devminor) {
/* minor device 0 is physical memory */
case 0:
*** sys/arch/pmax/pmax/trap.c.DIST Wed Jun 15 03:25:23 1994
--- sys/arch/pmax/pmax/trap.c Thu Aug 18 05:43:47 1994
***************
*** 182,191 ****
extern struct sysent ultrix_sysent[];
extern int nultrix_sysent;
extern char *ultrix_syscallnames[];
#endif
! #if defined(COMPAT_ULTRIX) && defined(SYSCALL_DEBUG)
! int ultrix_scdebug = 1;
void
ultrix_scdebug_call(p, code, narg, args)
--- 182,200 ----
extern struct sysent ultrix_sysent[];
extern int nultrix_sysent;
extern char *ultrix_syscallnames[];
+ #define DEBUG_COMPAT 1
#endif
! #if (defined(SYSCALL_DEBUG) && defined(COMPAT_ULTRIX))
! #ifndef DEBUG_COMPAT
! #define DEBUG_COMPAT
! #endif
! #endif
!
! #if defined(DEBUG_COMPAT)
! int ultrix_scdebug = 0;
!
! int nosys();
void
ultrix_scdebug_call(p, code, narg, args)
***************
*** 194,200 ****
{
int i;
! if (!ultrix_scdebug)
return;
printf("proc %d: ultrix syscall ", p->p_pid);
--- 203,210 ----
{
int i;
! if (!ultrix_scdebug &&
! !(code < nultrix_sysent && ultrix_sysent[code].sy_call == nosys))
return;
printf("proc %d: ultrix syscall ", p->p_pid);
***************
*** 214,220 ****
struct proc *p;
int code, error, retval;
{
! if (!ultrix_scdebug)
return;
printf("proc %d: ultrix syscall ", p->p_pid);
--- 224,231 ----
struct proc *p;
int code, error, retval;
{
! if (!ultrix_scdebug && !((error == ENOSYS) || (error == EACCES)) )
!
return;
printf("proc %d: ultrix syscall ", p->p_pid);
***************
*** 492,498 ****
if (i) {
locr0[V0] = i;
locr0[A3] = 1;
! #if defined(SYSCALL_DEBUG) && defined(COMPAT_ULTRIX)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_call(p,
code, callp->sy_narg,
--- 503,509 ----
if (i) {
locr0[V0] = i;
locr0[A3] = 1;
! #if defined(DEBUG_COMPAT)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_call(p,
code, callp->sy_narg,
***************
*** 535,541 ****
if (i) {
locr0[V0] = i;
locr0[A3] = 1;
! #if defined(SYSCALL_DEBUG) && defined(COMPAT_ULTRIX)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_call(p,
code, callp->sy_narg,
--- 546,552 ----
if (i) {
locr0[V0] = i;
locr0[A3] = 1;
! #if defined(DEBUG_COMPAT)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_call(p,
code, callp->sy_narg,
***************
*** 575,581 ****
if (i) {
locr0[V0] = i;
locr0[A3] = 1;
! #if defined(SYSCALL_DEBUG) && defined(COMPAT_ULTRIX)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_call(p,
code, callp->sy_narg,
--- 586,592 ----
if (i) {
locr0[V0] = i;
locr0[A3] = 1;
! #if defined(DEBUG_COMPAT)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_call(p,
code, callp->sy_narg,
***************
*** 596,602 ****
}
}
}
! #if defined(SYSCALL_DEBUG) && defined(COMPAT_ULTRIX)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_call(p, code, callp->sy_narg, args.i);
#endif
--- 607,613 ----
}
}
}
! #if defined(DEBUG_COMPAT)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_call(p, code, callp->sy_narg, args.i);
#endif
***************
*** 656,662 ****
locr0[A3] = 1;
}
done:
! #if defined(COMPAT_ULTRIX) && defined(SYSCALL_DEBUG)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_ret(p, code, i, rval[0]);
#endif
--- 667,673 ----
locr0[A3] = 1;
}
done:
! #if defined(DEBUG_COMPAT)
if (p->p_emul == EMUL_ULTRIX)
ultrix_scdebug_ret(p, code, i, rval[0]);
#endif
------------------------------------------------------------------------------