Return to BSD News archive
Newsgroups: comp.bugs.2bsd Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!news.hawaii.edu!ames!night.primate.wisc.edu!sdd.hp.com!gatech!europa.chnt.gtegsc.com!wlbr!sms From: sms@wlv.iipo.gtegsc.com (Steven M. Schultz) Subject: libc/pdp/sys shrinks to 15 files from 118 (#242) Sender: news@wlbr.iipo.gtegsc.com (System Administrator) Organization: GTE Government Systems, Westlake Village Message-ID: <D8Jw32.71B@wlbr.iipo.gtegsc.com> X-Nntp-Posting-Host: wlv.iipo.gtegsc.com Date: Sun, 14 May 1995 04:21:01 GMT Lines: 1201 Subject: libc/pdp/sys shrinks to 15 files from 118 (#242) Index: lib/libc/pdp/sys/* 2.11BSD Description: The system call directory (/usr/src/lib/libc/pdp/sys) contains 118 files (137kb), 100+ of which are identical except for the system call name. It would be nice if most of the system call files could be generated dynamically and not require an individual file permanently resident on the disk. getppid(), geteuid() and getegid() rely on a lingering V7ism (getpid, getuid, getgid returning a 'long' value) rather than having their own system call numbers. When 4.3 was being ported this should have been fixed and was overlooked. Despite attempts to keep 'adb' current there were discrepancies in adb's system call translation table. System calls which did not exist were present, usw. Repeat-By: Observation. It was noticed that 4.4BSD did dynamically generate the system call files using 'printf(1)'. Also, 4.3 and later had unique system call numbers for geteuid, getegid, and getppid. Fix: The pdp/sys directory will end up containing 15 files (24kb) instead of 118 files (137kb). A space conservation measure that will be appreciated by folks with 80mb drives. Using new syscall numbers for geteuid, getegid, and getppid make life simpler for the Makefile. The concept of a special class of syscall ("PSEUDO") in SYS.h goes away, as does the special return "EXIT_alt_noerror". All in all the simplicity is worth a small change to the kernel. Old binaries will continue to work with the new kernel. New binaries created with the new geteuid, getegid and getppid syscall numbers will not run on old kernels however. In the retained syscall files (fork.s, etc) it was noticed that the common error return was not being used. Rather each file stored R0 to errno, loaded R0 with -1 and did a return. By using the common (x_error) return point enough space was saved that programs linking with libc.a shrink by 1 click (64 bytes). The system call table in 'adb' is updated - the new system calls are added and several old (some of which never existed) entries removed. You must have printf(1) installed on the system (patch #239). This is a somewhat complex update. The sequence of the steps is: update the syscall directory, there is a script provided which should be used for this, although if you are manually inclined you can execute the appropriate commands yourself ;-) update the kernel. update adb. rebuild kernel and reboot. rebuild libc.a rebuild adb. The shar file included below contains: /tmp/libc.pdp.sys.fix - script which moves the sys directory to sys.old, creates a new sys directory and populates it with the few remaining (architecture dependent) files that can not be mechanically generated and creates the Makefile. NOTE: After you have finished installing the new kernel and libc.a you will want to remove /usr/src/lib/libc/pdp/sys.old! /tmp/libc.pdp.sys.patch - patch file to update pdp/sys *after* running the script libc.pdp.sys.fix /tmp/sys.patch - the patch file to update the kernel And now on with the installation... 1) Cut where indicated and save to a tmp file (/tmp/foo). 2) unshar the file with "sh /tmp/foo" 3) run the script with "sh /tmp/libc.pdp.sys.fix" 4) apply the patches: patch -p0 < /tmp/libc.pdp.sys.patch patch -p0 < /tmp/sys.patch 5) remake the kernel and reboot. If 'ld' gives a "431 file too big" error you will need to adjust the overlay structure. There are hints in the kernel Makefile about how to do this, but if you have problems let me know and I will try to help: cd /sys/YOUR_KERNEL_NAME make make install reboot 6) install the new system calls in libc.a. First we must delete a module with a truncated filename. When the long filename support was added the file 'getdtablesiz.s' was not renamed to 'getdtablesize.s'. The new automagically generated object file is 'getdtablesize.o'. Both the old getdtablesiz.o and getdtablesize.o define the same global symbol so the old file must be manually deleted. ar dv /lib/libc.a getdtablesiz.o ar dv /usr/lib/libc_p.a getdtablesiz.o cd /usr/src/lib/libc/pdp/sys make ar r /lib/libc.a *.o cd profiled ar r /usr/lib/libc_p.a *.o ranlib /lib/libc.a /usr/lib/libc_p.a cd .. make clean 7) Last we remake 'adb': cd /usr/src/bin/adb make make install make clean All done. As always all updates to 2.11BSD are available via anonymous ftp on FTP.IIPO.GTEGSC.COM in the directory /pub/2.11BSD. =======================cut here====================== #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # /tmp/libc.pdp.sys.fix # /tmp/libc.pdp.sys.patch # /tmp/sys.patch # This archive created: Sat May 13 00:15:13 1995 export PATH; PATH=/bin:/usr/bin:$PATH if test -f '/tmp/libc.pdp.sys.fix' then echo shar: "will not over-write existing file '/tmp/libc.pdp.sys.fix'" else sed 's/^X//' << \SHAR_EOF > '/tmp/libc.pdp.sys.fix' X#!/bin/sh X X# X# Move the current syscall directory aside and create X# the new one (and the profiled subdirectory) X# Xcd /usr/src/lib/libc/pdp Xmv sys sys.old Xmkdir sys sys/profiled X X# X# Copy over only those files that remain - these are the only ones X# which can not be automatically generated by the Makefile. These X# files are patched later (using libc.pdp.sys.patch). X# Xcp -p sys.old/SYS.h sys Xcp -p sys.old/_exit.s sys Xcp -p sys.old/brk.s sys Xcp -p sys.old/execl.s sys Xcp -p sys.old/execle.s sys Xcp -p sys.old/execv.s sys Xcp -p sys.old/fork.s sys Xcp -p sys.old/pipe.s sys Xcp -p sys.old/ptrace.s sys Xcp -p sys.old/sbrk.s sys Xcp -p sys.old/sigreturn.s sys Xcp -p sys.old/sigvec.s sys Xcp -p sys.old/vfork.s sys X X# X# Next create the magic Makefile in the new syscall directory. X# X Xcat > sys/Makefile <<\MAKEFILE_EOF X# Placed in the public domain - 1995/05/06 X# X# @(#)Makefile 1.1 (2.11BSD) 1995/05/08 X XCPP= /lib/cpp XLD= /bin/ld XAS= /bin/as X X# modules which can not use SYSCALL and must be assembled from sources. The X# rest of the system calls are generated with printf(1) and do not have X# source files associated with them. X XPDPSRCS= _exit.s brk.s execl.s execle.s execv.s fork.s pipe.s ptrace.s sbrk.s \ X sigreturn.s sigvec.s vfork.s X XPDPOBJS= _exit.o brk.o execl.o execle.o execv.o fork.o pipe.o ptrace.o sbrk.o \ X sigreturn.o sigvec.o vfork.o X X# these are generated with a second argument to SYSCALL of 'norm'. Have to X# split into more than one list because 'make' only permits 80 "lefts". X XNORM1= __sysctl.o accept.o access.o acct.o adjtime.o bind.o chdir.o chflags.o \ X chmod.o chown.o chroot.o close.o connect.o creat.o dup.o dup2.o \ X execve.o fchdir.o fchflags.o fchmod.o fchown.o fcntl.o flock.o fstat.o \ X fsync.o ftruncate.o getdtablesize.o getgroups.o getitimer.o \ X gethostname.o getsockname.o sethostid.o sethostname.o \ X getpeername.o getpriority.o getrlimit.o getrusage.o getsockopt.o \ X gettimeofday.o ioctl.o kill.o killpg.o link.o listen.o lstat.o mkdir.o X XNORM2= mknod.o mount.o open.o quota.o read.o readlink.o readv.o reboot.o \ X recv.o recvfrom.o recvmsg.o rename.o rmdir.o select.o send.o sendmsg.o \ X sendto.o setgroups.o setitimer.o setpgrp.o setpriority.o setquota.o \ X setregid.o setreuid.o setrlimit.o setsockopt.o settimeofday.o \ X shutdown.o sigstack.o socket.o socketpair.o stat.o symlink.o \ X truncate.o umount.o unlink.o utimes.o wait4.o write.o writev.o X X# these are generated with a second argument to SYSCALL of 'long' X XLONG= lseek.o X X# these are generated with a second argument to SYSCALL of 'error' X XERROR= sigpause.o X X# these are generated with a second argument to SYSCALL of 'noerror' X XNOERROR= getgid.o getegid.o gethostid.o getpagesize.o getpgrp.o getpid.o \ X getppid.o getuid.o geteuid.o profil.o sigblock.o sigsetmask.o sync.o \ X umask.o vhangup.o X XOBJS= ${PDPOBJS} ${NORM1} ${NORM2} ${LONG} ${ERROR} ${NOERROR} X XTAGSFILE=tags X X.s.o: X /lib/cpp -DPROF ${DEFS} $< | sed -e 's;^#;/;' | as -V -o $@ X -ld -X -r $*.o X mv a.out profiled/$*.o X /lib/cpp ${DEFS} $< | sed -e 's;^#;/;' | as -V -o $@ X -ld -X -r $*.o X mv a.out $*.o X Xsyslib syslib_p: ${OBJS} X @echo "building profiled syslib" X @cd profiled; ar cru ../syslib_p ${OBJS} X @echo "building normal syslib" X @ar cru syslib ${OBJS} X X${NORM1}: SYS.h /usr/include/syscall.h X @echo creating $*.o profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,norm)\n' | \ X ${CPP} -DPROF ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -X -r $*.o X @mv a.out profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,norm)\n' | \ X ${CPP} ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -x -r $*.o X @mv a.out $*.o X X${NORM2}: SYS.h /usr/include/syscall.h X @echo creating $*.o profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,norm)\n' | \ X ${CPP} -DPROF ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -X -r $*.o X @mv a.out profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,norm)\n' | \ X ${CPP} ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -x -r $*.o X @mv a.out $*.o X X${LONG}: SYS.h /usr/include/syscall.h X @echo creating $*.o profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,long)\n' | \ X ${CPP} -DPROF ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -X -r $*.o X @mv a.out profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,long)\n' | \ X ${CPP} ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -x -r $*.o X @mv a.out $*.o X X${ERROR}: SYS.h /usr/include/syscall.h X @echo creating $*.o profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,error)\n' | \ X ${CPP} -DPROF ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -X -r $*.o X @mv a.out profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,error)\n' | \ X ${CPP} ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -x -r $*.o X @mv a.out $*.o X X${NOERROR}: SYS.h /usr/include/syscall.h X @echo creating $*.o profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,noerror)\n' | \ X ${CPP} -DPROF ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -X -r $*.o X @mv a.out profiled/$*.o X @printf '#include "SYS.h"\nSYSCALL($*,noerror)\n' | \ X ${CPP} ${DEFS} | sed -e 's;^#;/;' | ${AS} -o $*.o X @${LD} -x -r $*.o X @mv a.out $*.o X Xclean: X rm -f *.o profiled/*.o a.out syslib syslib_p XMAKEFILE_EOF SHAR_EOF chmod 755 '/tmp/libc.pdp.sys.fix' fi if test -f '/tmp/libc.pdp.sys.patch' then echo shar: "will not over-write existing file '/tmp/libc.pdp.sys.patch'" else sed 's/^X//' << \SHAR_EOF > '/tmp/libc.pdp.sys.patch' X*** /usr/src/lib/libc/pdp/sys/SYS.h.old Sat Mar 13 21:21:43 1993 X--- /usr/src/lib/libc/pdp/sys/SYS.h Mon May 8 23:25:11 1995 X*************** X*** 3,9 **** X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)SYS.h 1.4 (2.11BSD GTE) 3/13/93 X */ X X #include <syscall.h> X--- 3,9 ---- X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)SYS.h 1.5 (2.11BSD GTE) 1995/05/08 X */ X X #include <syscall.h> X*************** X*** 35,44 **** X SYS(s); \ X EXIT_/**/r X X- #define PSEUDO(f, s, r) ENTRY(f); \ X- SYS(s); \ X- EXIT_/**/r X- X .globl x_norm, x_error X X #define EXIT_norm jmp x_norm X--- 35,40 ---- X*************** X*** 52,57 **** X #define EXIT_error jmp x_error X X #define EXIT_noerror rts pc; X- X- #define EXIT_alt_noerror mov r1,r0; \ X- rts pc; X--- 48,50 ---- X*** /usr/src/lib/libc/pdp/sys/brk.s.old Sat Jan 31 11:38:54 1987 X--- /usr/src/lib/libc/pdp/sys/brk.s Mon May 8 23:12:42 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)brk.s 2.5 (Berkeley) 1/31/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)brk.s 2.6 (2.11BSD GTE) 1995/05/08\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 23,31 **** X 1: X SYS(sbrk) / ask for break X bes 2f X! mov 2(sp),curbrk / and rember it if it succeeded X rts pc X 2: X! mov r0,_errno X! mov $-1,r0 X! rts pc X--- 23,29 ---- X 1: X SYS(sbrk) / ask for break X bes 2f X! mov 2(sp),curbrk / and remember it if it succeeded X rts pc X 2: X! jmp x_error X*** /usr/src/lib/libc/pdp/sys/execl.s.old Thu Jan 29 05:52:08 1987 X--- /usr/src/lib/libc/pdp/sys/execl.s Mon May 8 23:14:03 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)execl.s 2.5 (Berkeley) 1/29/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)execl.s 2.6 (2.11BSD GTE) 1995/05/08\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 25,30 **** X tst -(sp) / simulate return address stack spacing X SYS(execve) / and go for it ... X add $8.,sp / if we get back it's an error X! mov r0,_errno X! mov $-1,r0 X! rts pc X--- 25,28 ---- X tst -(sp) / simulate return address stack spacing X SYS(execve) / and go for it ... X add $8.,sp / if we get back it's an error X! jmp x_error X*** /usr/src/lib/libc/pdp/sys/execle.s.old Thu Jan 29 05:52:08 1987 X--- /usr/src/lib/libc/pdp/sys/execle.s Mon May 8 23:14:37 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)execle.s 2.5 (Berkeley) 1/29/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)execle.s 2.6 (2.11BSD GTE) 1995/05/08\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 27,32 **** X tst -(sp) / simulate return address stack spacing X SYS(execve) / and go for it ... X add $8.,sp / if we get back it's an error X! mov r0,_errno X! mov $-1,r0 X! rts pc X--- 27,30 ---- X tst -(sp) / simulate return address stack spacing X SYS(execve) / and go for it ... X add $8.,sp / if we get back it's an error X! jmp x_error X*** /usr/src/lib/libc/pdp/sys/execv.s.old Thu Jan 29 05:52:09 1987 X--- /usr/src/lib/libc/pdp/sys/execv.s Mon May 8 23:15:13 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)execv.s 2.5 (Berkeley) 1/29/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)execv.s 2.6 (2.11BSD GTE) 1995/05/08\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 23,28 **** X tst -(sp) / simulate return address stack spacing X SYS(execve) / and go for it ... X add $8.,sp / if we get back it's an error X! mov r0,_errno X! mov $-1,r0 X! rts pc X--- 23,26 ---- X tst -(sp) / simulate return address stack spacing X SYS(execve) / and go for it ... X add $8.,sp / if we get back it's an error X! jmp x_error X*** /usr/src/lib/libc/pdp/sys/fork.s.old Thu Jan 29 05:52:11 1987 X--- /usr/src/lib/libc/pdp/sys/fork.s Wed May 10 23:11:57 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)fork.s 2.5 (Berkeley) 1/29/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)fork.s 2.6 (2.11BSD GTE) 1995/05/10\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 14,31 **** X */ X #include "SYS.h" X X- .comm _par_uid,2 X- X ENTRY(fork) X SYS(fork) X br 1f / child returns here X! bes 2f / parent returns here X rts pc X 1: X- mov r0,_par_uid X clr r0 / child gets a zero X rts pc X 2: X! mov r0,_errno X! mov $-1,r0 X! rts pc X--- 14,26 ---- X */ X #include "SYS.h" X X ENTRY(fork) X SYS(fork) X br 1f / child returns here X! bcs 2f / parent returns here X rts pc X 1: X clr r0 / child gets a zero X rts pc X 2: X! jmp x_error X*** /usr/src/lib/libc/pdp/sys/pipe.s.old Thu Jan 29 05:52:27 1987 X--- /usr/src/lib/libc/pdp/sys/pipe.s Mon May 8 23:16:59 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)pipe.s 2.5 (Berkeley) 1/29/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)pipe.s 2.6 (2.11BSD GTE) 1995/05/08\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 25,30 **** X clr r0 X rts pc X 1: X! mov r0,_errno X! mov $-1,r0 X! rts pc X--- 25,28 ---- X clr r0 X rts pc X 1: X! jmp x_error X*** /usr/src/lib/libc/pdp/sys/ptrace.s.old Thu Jan 29 05:52:28 1987 X--- /usr/src/lib/libc/pdp/sys/ptrace.s Mon May 8 23:18:00 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)ptrace.s 2.5 (Berkeley) 1/29/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)ptrace.s 2.6 (2.11BSD GTE) 1995/05/08\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 17,22 **** X bes error / disambiguate X rts pc X error: X! mov r0,_errno X! mov $-1,r0 X! rts pc X--- 17,20 ---- X bes error / disambiguate X rts pc X error: X! jmp x_error X*** /usr/src/lib/libc/pdp/sys/sbrk.s.old Sat Jan 31 11:38:54 1987 X--- /usr/src/lib/libc/pdp/sys/sbrk.s Mon May 8 23:18:41 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)sbrk.s 2.5 (Berkeley) 1/31/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)sbrk.s 2.6 (2.11BSD GTE) 1995/05/08\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 37,42 **** X rts pc X 2: X cmp (sp)+,(sp)+ / (clean up stack) X! mov r0,_errno X! mov $-1,r0 X! rts pc X--- 37,40 ---- X rts pc X 2: X cmp (sp)+,(sp)+ / (clean up stack) X! jmp x_error X*** /usr/src/lib/libc/pdp/sys/sigreturn.s.old Thu Jan 29 05:52:41 1987 X--- /usr/src/lib/libc/pdp/sys/sigreturn.s Mon May 8 23:19:20 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)sigreturn.s 2.5 (Berkeley) 1/29/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)sigreturn.s 2.6 (2.11BSD GTE) 1995/05/08\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 47,52 **** X / The last two instructions represent a potential race condition ... X 1: X SYS(sigreturn) / attempt the sigreturn X! mov r0,_errno / if we return, it's an error! X! mov $-1,r0 X! rts pc X--- 47,50 ---- X / The last two instructions represent a potential race condition ... X 1: X SYS(sigreturn) / attempt the sigreturn X! jmp x_error X*** /usr/src/lib/libc/pdp/sys/sigvec.s.old Fri Sep 22 22:31:38 1989 X--- /usr/src/lib/libc/pdp/sys/sigvec.s Mon May 8 23:20:22 1995 X*************** X*** 5,11 **** X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)sigvec.s 2.5 (Berkeley) 1/29/87\0> X .even X #endif SYSLIBC_SCCS X X--- 5,11 ---- X */ X X #ifdef SYSLIBC_SCCS X! _sccsid: <@(#)sigvec.s 2.6 (2.11BSD GTE) 1995/05/08\0> X .even X #endif SYSLIBC_SCCS X X*************** X*** 33,40 **** X SYS(sigvec) / sigtramp X mov (sp)+,(sp) / (clean up stack) X bec 1f X! mov r0,_errno X! mov $-1,r0 X 1: X rts pc X X--- 33,39 ---- X SYS(sigvec) / sigtramp X mov (sp)+,(sp) / (clean up stack) X bec 1f X! jmp x_error X 1: X rts pc X SHAR_EOF chmod 640 '/tmp/libc.pdp.sys.patch' fi if test -f '/tmp/sys.patch' then echo shar: "will not over-write existing file '/tmp/sys.patch'" else sed 's/^X//' << \SHAR_EOF > '/tmp/sys.patch' X*** /usr/include/syscall.h.old Fri Jan 13 20:38:45 1995 X--- /usr/include/syscall.h Mon May 8 22:32:57 1995 X*************** X*** 3,9 **** X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)syscall.h 5.4.3 (2.11BSD GTE) 11/25/94 X */ X X #define SYS_exit 1 X--- 3,9 ---- X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)syscall.h 5.4.4 (2.11BSD GTE) 1995/05/08 X */ X X #define SYS_exit 1 X*************** X*** 30,38 **** X #define SYS_umount 22 X #define SYS___sysctl 23 X #define SYS_getuid 24 X! /* 25 is old: stime */ X #define SYS_ptrace 26 X! /* 27 is old: alarm */ X /* 28 is old: fstat */ X /* 29 is old: pause */ X /* 30 is old: utime */ X--- 30,38 ---- X #define SYS_umount 22 X #define SYS___sysctl 23 X #define SYS_getuid 24 X! #define SYS_geteuid 25 X #define SYS_ptrace 26 X! #define SYS_getppid 27 X /* 28 is old: fstat */ X /* 29 is old: pause */ X /* 30 is old: utime */ X*************** X*** 53,59 **** X /* 45 is unused */ X /* 46 is old: setgid */ X #define SYS_getgid 47 X! /* 48 is old: sigsys */ X /* 49 is unused */ X /* 50 is unused */ X #define SYS_acct 51 X--- 53,59 ---- X /* 45 is unused */ X /* 46 is old: setgid */ X #define SYS_getgid 47 X! #define SYS_getegid 48 X /* 49 is unused */ X /* 50 is unused */ X #define SYS_acct 51 X*** /usr/src/bin/adb/opset.c.old Mon Jan 16 19:41:09 1995 X--- /usr/src/bin/adb/opset.c Mon May 8 23:05:43 1995 X*************** X*** 1,5 **** X #if !defined(lint) && defined(DOSCCS) X! static char sccsid[] = "@(#)opset.c 2.1 (2.11BSD GTE) 1/16/95"; X #endif X X #include "defs.h" X--- 1,5 ---- X #if !defined(lint) && defined(DOSCCS) X! static char sccsid[] = "@(#)opset.c 2.2 (2.11BSD GTE) 1995/05/08"; X #endif X X #include "defs.h" X*************** X*** 142,148 **** X "wait4", X "creat", X "link", X! "unlink", X "execv", X "chdir", X "fchdir", X--- 142,148 ---- X "wait4", X "creat", X "link", X! "unlink", /* 10 */ X "execv", X "chdir", X "fchdir", X*************** X*** 152,167 **** X "chflags", X "fchflags", X "lseek", X! "getpid", X "mount", X "umount", X "__sysctl", X "getuid", X! NULL, /* 25 - old stime */ X "ptrace", X! "alarm", X NULL, /* 28 - old fstat */ X! "pause", X NULL, /* 30 - old utime */ X NULL, /* 31 - old stty */ X NULL, /* 32 - old gtty */ X--- 152,167 ---- X "chflags", X "fchflags", X "lseek", X! "getpid", /* 20 */ X "mount", X "umount", X "__sysctl", X "getuid", X! "geteuid", /* 25 */ X "ptrace", X! "getppid", X NULL, /* 28 - old fstat */ X! NULL, /* 29 - old pause */ X NULL, /* 30 - old utime */ X NULL, /* 31 - old stty */ X NULL, /* 32 - old gtty */ X*************** X*** 175,186 **** X "lstat", X "dup", X "pipe", X! "times", X "profil", X NULL, /* 45 - unused */ X NULL, /* 46 - old setgid */ X "getgid", X! "signal", X NULL, /* 49 - unused */ X NULL, /* 50 - unused */ X "acct", X--- 175,186 ---- X "lstat", X "dup", X "pipe", X! NULL, /* 43 - old times */ X "profil", X NULL, /* 45 - unused */ X NULL, /* 46 - old setgid */ X "getgid", X! "getegid", X NULL, /* 49 - unused */ X NULL, /* 50 - unused */ X "acct", X*************** X*** 202,208 **** X NULL, /* 67 - old vread */ X NULL, /* 68 - old vwrite */ X "sbrk", X! "sstk", X NULL, /* 71 - mmap */ X NULL, /* 72 - old vadvise */ X NULL, /* 73 - munmap */ X--- 202,208 ---- X NULL, /* 67 - old vread */ X NULL, /* 68 - old vwrite */ X "sbrk", X! NULL, /* 70 - old sstk */ X NULL, /* 71 - mmap */ X NULL, /* 72 - old vadvise */ X NULL, /* 73 - munmap */ X*************** X*** 217,232 **** X "setpgrp", X "setitimer", X "old wait", X! "swapon", X "getitimer", X "gethostname", X "sethostname", X "getdtablesize", X "dup2", X! "getdopt", X "fcntl", X "select", X! "setdopt", X "fsync", X "setpriority", X "socket", X--- 217,232 ---- X "setpgrp", X "setitimer", X "old wait", X! NULL, /* 85 - 4.3 swapon */ X "getitimer", X "gethostname", X "sethostname", X "getdtablesize", X "dup2", X! NULL, /* 91 - unused */ X "fcntl", X "select", X! NULL, /* 94 - unused */ X "fsync", X "setpriority", X "socket", X*************** X*** 234,240 **** X "accept", X "getpriority", X "send", X! "recv", X "sigreturn", X "bind", X "setsockopt", X--- 234,240 ---- X "accept", X "getpriority", X "send", X! "recv", /* 102 - recv */ X "sigreturn", X "bind", X "setsockopt", X*************** X*** 247,253 **** X "sigstack", X "recvmsg", X "sendmsg", X! "vtrace", X "gettimeofday", X "getrusage", X "getsockopt", X--- 247,253 ---- X "sigstack", X "recvmsg", X "sendmsg", X! NULL, /* 115 - 4.3 vtrace */ X "gettimeofday", X "getrusage", X "getsockopt", X*** /usr/src/sys/sys/init_sysent.c.old Sat Jan 14 00:42:01 1995 X--- /usr/src/sys/sys/init_sysent.c Mon May 8 22:38:37 1995 X*************** X*** 3,9 **** X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)init_sysent.c 1.7 (2.11BSD GTE) 1/14/95 X */ X X /* X--- 3,9 ---- X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)init_sysent.c 1.8 (2.11BSD GTE) 1995/05/08 X */ X X /* X*************** X*** 17,24 **** X X /* 1.1 processes and protection */ X int sethostid(),gethostid(),sethostname(),gethostname(),getpid(); X! int fork(),rexit(),execv(),execve(),owait(),wait4(); X int getuid(),setreuid(),getgid(),getgroups(),setregid(),setgroups(); X int getpgrp(),setpgrp(); X int ucall(); /* 2BSD calls */ X X--- 17,25 ---- X X /* 1.1 processes and protection */ X int sethostid(),gethostid(),sethostname(),gethostname(),getpid(); X! int getppid(), fork(),rexit(),execv(),execve(),owait(),wait4(); X int getuid(),setreuid(),getgid(),getgroups(),setregid(),setgroups(); X+ int geteuid(), getegid(); X int getpgrp(),setpgrp(); X int ucall(); /* 2BSD calls */ X X*************** X*** 130,138 **** X 1, umount, /* 22 = umount */ X 6, __sysctl, /* 23 = __sysctl */ X 0, getuid, /* 24 = getuid */ X! 0, nosys, /* 25 = old stime */ X 4, ptrace, /* 26 = ptrace */ X! 0, nosys, /* 27 = old alarm */ X 0, nosys, /* 28 = old fstat */ X 0, nosys, /* 29 = old pause */ X 0, nosys, /* 30 = old utime */ X--- 131,139 ---- X 1, umount, /* 22 = umount */ X 6, __sysctl, /* 23 = __sysctl */ X 0, getuid, /* 24 = getuid */ X! 0, geteuid, /* 25 = geteuid */ X 4, ptrace, /* 26 = ptrace */ X! 0, getppid, /* 27 = getppid */ X 0, nosys, /* 28 = old fstat */ X 0, nosys, /* 29 = old pause */ X 0, nosys, /* 30 = old utime */ X*************** X*** 153,159 **** X 0, nosys, /* 45 = nosys */ X 0, nosys, /* 46 = old setgid */ X 0, getgid, /* 47 = getgid */ X! 0, nosys, /* 48 = old sig */ X 0, nosys, /* 49 = reserved for USG */ X 0, nosys, /* 50 = reserved for USG */ X 1, sysacct, /* 51 = turn acct off/on */ X--- 154,160 ---- X 0, nosys, /* 45 = nosys */ X 0, nosys, /* 46 = old setgid */ X 0, getgid, /* 47 = getgid */ X! 0, getegid, /* 48 = getegid */ X 0, nosys, /* 49 = reserved for USG */ X 0, nosys, /* 50 = reserved for USG */ X 1, sysacct, /* 51 = turn acct off/on */ X*** /usr/src/sys/sys/kern_prot.c.old Sat Apr 30 16:15:11 1988 X--- /usr/src/sys/sys/kern_prot.c Mon May 8 22:43:32 1995 X*************** X*** 3,9 **** X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)kern_prot.c 1.1 (2.10BSD Berkeley) 12/1/86 X */ X X /* X--- 3,9 ---- X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)kern_prot.c 1.2 (2.11BSD GTE) 1995/05/08 X */ X X /* X*************** X*** 22,30 **** X { X X u.u_r.r_val1 = u.u_procp->p_pid; X! u.u_r.r_val2 = u.u_procp->p_ppid; X } X X getpgrp() X { X register struct a { X--- 22,36 ---- X { X X u.u_r.r_val1 = u.u_procp->p_pid; X! u.u_r.r_val2 = u.u_procp->p_ppid; /* XXX - compatibility */ X } X X+ getppid() X+ { X+ X+ u.u_r.r_val1 = u.u_procp->p_ppid; X+ } X+ X getpgrp() X { X register struct a { X*************** X*** 46,59 **** X { X X u.u_r.r_val1 = u.u_ruid; X! u.u_r.r_val2 = u.u_uid; X } X X getgid() X { X X u.u_r.r_val1 = u.u_rgid; X! u.u_r.r_val2 = u.u_gid; X } X X /* X--- 52,77 ---- X { X X u.u_r.r_val1 = u.u_ruid; X! u.u_r.r_val2 = u.u_uid; /* XXX */ X } X X+ geteuid() X+ { X+ X+ u.u_r.r_val1 = u.u_uid; X+ } X+ X getgid() X { X X u.u_r.r_val1 = u.u_rgid; X! u.u_r.r_val2 = u.u_gid; /* XXX */ X! } X! X! getegid() X! { X! X! u.u_r.r_val1 = u.u_gid; X } X X /* X*** /usr/src/sys/sys/syscalls.c.old Thu Dec 15 20:05:15 1994 X--- /usr/src/sys/sys/syscalls.c Mon May 8 22:35:16 1995 X*************** X*** 3,9 **** X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)syscalls.c 1.4 (2.11BSD GTE) 11/26/94 X */ X X /* X--- 3,9 ---- X * All rights reserved. The Berkeley software License Agreement X * specifies the terms and conditions for redistribution. X * X! * @(#)syscalls.c 1.5 (2.11BSD GTE) 1995/05/08 X */ X X /* X*************** X*** 36,44 **** X "umount", /* 22 = umount */ X "old setuid - nosys", /* 23 = old setuid */ X "getuid", /* 24 = getuid */ X! "old stime - nosys", /* 25 = old stime */ X "ptrace", /* 26 = ptrace */ X! "old alarm - nosys", /* 27 = old alarm */ X "old fstat - nosys", /* 28 = old fstat */ X "old pause", /* 29 = old pause */ X "old utime - nosys", /* 30 = old utime */ X--- 36,44 ---- X "umount", /* 22 = umount */ X "old setuid - nosys", /* 23 = old setuid */ X "getuid", /* 24 = getuid */ X! "geteuid", /* 25 = geteuid */ X "ptrace", /* 26 = ptrace */ X! "getppid", /* 27 = getppid */ X "old fstat - nosys", /* 28 = old fstat */ X "old pause", /* 29 = old pause */ X "old utime - nosys", /* 30 = old utime */ X*************** X*** 59,65 **** X "#45", /* 45 = nosys */ X "old setgid - nosys", /* 46 = old setgid */ X "getgid", /* 47 = getgid */ X! "old signal", /* 48 = old sig */ X "#49", /* 49 = reserved for USG */ X "#50", /* 50 = reserved for USG */ X "acct", /* 51 = turn acct off/on */ X--- 59,65 ---- X "#45", /* 45 = nosys */ X "old setgid - nosys", /* 46 = old setgid */ X "getgid", /* 47 = getgid */ X! "getegid", /* 48 = getegid */ X "#49", /* 49 = reserved for USG */ X "#50", /* 50 = reserved for USG */ X "acct", /* 51 = turn acct off/on */ X*** /VERSION.old Fri May 12 19:49:50 1995 X--- /VERSION Fri May 12 20:45:36 1995 X*************** X*** 1,4 **** X! Current Patch Level: 241 X X 2.11 BSD X ============ X--- 1,4 ---- X! Current Patch Level: 242 X X 2.11 BSD X ============ SHAR_EOF chmod 640 '/tmp/sys.patch' fi exit 0 # End of shell archive