Subject: hk(4), tcsh(1), zork(6), zoneinfo(8) (#398)
Index:	man,games,bin,share/hk.4,o.s,Makefile,Makefile 2.11BSD

Description:
	1) tcsh fails to link due to the base segment being too large

	2) zork fails to compile due to use of deprecated syscalls

	3) the HK (rk06/7) manpage was out of date with respect to disklabels

	4) the timezone info files were not being installed

Repeat-By:
	1) recompile tcsh.

	2) assemble zork on a system patched to #397

	3) update 397 brought disklabels to the HK driver, the manpage was 
	   not corrected

	4) observation during a "make install" from /usr/src

Fix:
	1) The system call compatibility stubs (sigblock, sigvec, and so on)
	   caused a modest amount of growth in tcsh's base segment.  The base
	   was pushed slightly over the 48kb limit.  Moving a small module
	   to overlay 1 fixed the problem.

	2) Several system calls have been deprecated.  While the kernel will
	   handle use of these system calls made by old binaries programs can
	   not rely on 'SYS_sigvec', 'SYS_setreuid', and others as existing.
	   The fix was to update zork/o.s to use the new system calls.

	3) The hk(4) manpage was edited and the fixed partition tables replaced
	   with references to disklabel(8).

	4) The umask was being set incorrectly in the Makefile.  A subshell 
	   should have been used.

	The following files are updated:

		/usr/src/bin/tcsh/Makefile
		/usr/src/games/pdp/zork/o.s
		/usr/src/man/man4/hk.4
		/usr/src/share/zoneinfo/Makefile
		/VERSION

	To apply this update cut where indicated and save to a file (/tmp/398).

	Then:

		patch -p0 < /tmp/398
		cd /usr/src/man/man4
		/usr/man/manroff hk.4 > /usr/man/cat4/hk.0

		cd /usr/src/share/zoneinfo
		make
		make install
		make clean

		cd /usr/src/games/pdp/zork
		make 
		make install
		make clean

		cd /usr/src/bin/tcsh
		rm -f tcsh
		make
		make install

	As always this and previous updates to 2.11BSD are available via
	anonymous FTP to either FTP.IIPO.GTEGSC.COM or MOE.2BSD.COM in the
	directory /pub/2.11BSD.
-----------------------------cut here--------------------------
*** /usr/src/bin/tcsh/Makefile.old	Sun Jan 28 18:22:22 1996
--- /usr/src/bin/tcsh/Makefile	Sat Dec 27 23:16:48 1997
***************
*** 1,4 ****
! #	Makefile	4.3.1	1996/1/28
  #
  # C Shell with process control; VM/UNIX VAX Makefile
  # Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
--- 1,4 ----
! #	Makefile	4.3.2	1997/12/27
  #
  # C Shell with process control; VM/UNIX VAX Makefile
  # Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
***************
*** 190,196 ****
  	ed.xmap.o	\
  	glob.o		\
  	sh.char.o	\
- 	sh.err.o	\
  	sh.exp.o	\
  	sh.hist.o	\
  	sh.init.o	\
--- 190,195 ----
***************
*** 213,218 ****
--- 212,218 ----
  OV1=			\
  	ed.chared.o	\
  	ed.refresh.o	\
+ 	sh.err.o	\
  	sh.dol.o
  
  OV2=			\
*** /usr/src/games/pdp/zork/o.s.old	Mon Jun 14 21:13:39 1993
--- /usr/src/games/pdp/zork/o.s	Sun Dec 28 12:59:30 1997
***************
*** 28,42 ****
  	mov	r0,environ		/save environment pointer
  	sys	SYS_getuid.		/setuid back to user's
  	mov	r0,-(sp)
! 	mov	r0,-(sp)
! 	tst	-(sp)
! 	sys	SYS_setreuid.
! 	cmp	(sp)+,(sp)+
  	sys	SYS_getgid.
! 	mov	r0,(sp)
! 	mov	r0,-(sp)
! 	tst	-(sp)
! 	sys	SYS_setregid.
  	cmp	(sp)+,(sp)+
  
  	clr	(sp)
--- 28,38 ----
  	mov	r0,environ		/save environment pointer
  	sys	SYS_getuid.		/setuid back to user's
  	mov	r0,-(sp)
! 	clr	-(sp)
! 	sys	SYS_setuid.
  	sys	SYS_getgid.
! 	mov	r0,2(sp)
! 	sys	SYS_setgid.
  	cmp	(sp)+,(sp)+
  
  	clr	(sp)
***************
*** 44,50 ****
  	mov	$7,-(sp)		/7 is EMT
  	mov	$sigtramp,-(sp)
  	tst	-(sp)
! 	sys	SYS_sigvec.		/intercept EMTs
  	add	$10,sp
  
  	mov	$timval,-(sp)
--- 40,46 ----
  	mov	$7,-(sp)		/7 is EMT
  	mov	$sigtramp,-(sp)
  	tst	-(sp)
! 	sys	SYS_sigaction.		/intercept EMTs
  	add	$10,sp
  
  	mov	$timval,-(sp)
***************
*** 72,78 ****
  	jmp	*$17332
  
  sigtramp:
! 	jsr	pc,(r0)			/Signal trampoline for sigvec
  	mov	sp,r0
  	add	$6,r0
  	mov	r0,-(sp)
--- 68,74 ----
  	jmp	*$17332
  
  sigtramp:
! 	jsr	pc,(r0)			/Signal trampoline for sigaction
  	mov	sp,r0
  	add	$6,r0
  	mov	r0,-(sp)
***************
*** 219,227 ****
  child:
  	clr	-(sp)
  	mov	$sigdef,-(sp)
! 	mov	$2,-(sp)
! 	cmp	-(sp),-(sp)		/2.10 system interface for sigvec
! 	sys	SYS_sigvec.		/enable break
  	add	$12,sp
  
  	mov	environ,-(sp)		/set environ pointer
--- 215,224 ----
  child:
  	clr	-(sp)
  	mov	$sigdef,-(sp)
! 	mov	$2,-(sp)		/SIGQUIT
! 	clr	-(sp)			/no trampoline routine
! 	clr	-(sp)			/2.11 interface (return @)
! 	sys	SYS_sigaction.
  	add	$12,sp
  
  	mov	environ,-(sp)		/set environ pointer
***************
*** 246,257 ****
  
  save:
  	tst	-(sp)
! 	mov	$600,-(sp)
! 	mov	$savfil,-(sp)
! 	tst	-(sp)
! 	sys	SYS_creat.		/create output file
! 	bcs	serr			/oops
! 	add	$10,sp
  	mov	r0,(pc)+		/save "save" file discriptor
  sfd:	-1				/ "save" file discriptor
  	mov	$17812.,-(sp)
--- 243,264 ----
  
  save:
  	tst	-(sp)
! 	mov	$600,-(sp)		/mode
! 	mov	$601,-(sp)		/O_CREAT|O_TRUNC|O_WRONLY
! 	mov	$savfil,-(sp)		/path
! 	tst	-(sp)			/2.11 syscall convention
! 	sys	SYS_open.		/create output file
! 	bcc	1f			/oops
! 
! / this bit of nonsense is needed because 'serr' insists that all syscalls
! / take 10(8) bytes of stack.  SYS_open takes 12 so we advance sp by 2 if the
! / open failed.  Stuff a -1 in the return value so the check for failure can /
! / be made.  Isn't assembly fun?! <grin>.
! 
! 	tst	(sp)+
! 	br	serr
! 1:
! 	add	$12,sp
  	mov	r0,(pc)+		/save "save" file discriptor
  sfd:	-1				/ "save" file discriptor
  	mov	$17812.,-(sp)
*** /usr/src/man/man4/hk.4.old	Sun Jan  3 14:21:57 1993
--- /usr/src/man/man4/hk.4	Sun Dec 28 11:44:16 1997
***************
*** 2,10 ****
  .\" All rights reserved.  The Berkeley software License Agreement
  .\" specifies the terms and conditions for redistribution.
  .\"
! .\"	@(#)hk.4	6.3 (2.11BSD GTE) 1/3/93
  .\"
! .TH HK 4 "January 3, 1993"
  .UC 2
  .SH NAME
  hk \- RK6-11/RK06 and RK07 moving head disk
--- 2,10 ----
  .\" All rights reserved.  The Berkeley software License Agreement
  .\" specifies the terms and conditions for redistribution.
  .\"
! .\"	@(#)hk.4	6.4 (2.11BSD GTE) 1997/12/28
  .\"
! .TH HK 4 "December 28, 1997"
  .UC 2
  .SH NAME
  hk \- RK6-11/RK06 and RK07 moving head disk
***************
*** 52,96 ****
  .I seek
  calls should specify a multiple of 512 bytes.
  .SH "DISK SUPPORT"
! The origin and size (in sectors) of the
! pseudo-disks on each drive are as follows:
! .nf
! .ta .5i +\w'disk  'u +\w'000000  'u +\w'000000  'u +\w'000 - 000  'u
  .PP
! .ne 10
! RK06 partitions:
! 	disk	 start	length	     cyls	comments
! 	hk?a	     0	  8316	  0 - 125	root
! 	hk?b	  8316	  8316	126 - 251	swap
! 	hk?c	     0   27126	  0 - 410*	whole pack plus badsect track
! 	hk?d	unused
! 	hk?e	unused
! 	hk?f	unused
! 	hk?g	 16632	 10428	251 - 409	tmp
! 	hk?h	     0	 27060	  0 - 409	whole pack minus badsect track
  .PP
! .ne 10
! RK07 partitions:
! 	disk	 start	length	     cyls	comments
! 	hk?a	     0	  8316	  0 - 125	root
! 	hk?b	  8316	  8316	126 - 251	swap
! 	hk?c	     0	 53790	  0 - 814*	whole pack plus badsect track
! 	hk?d	unused
! 	hk?e	unused
! 	hk?f	unused
! 	hk?g	 16632	 37092	252 - 813
! 	hk?h	     0	 53724	  0 - 814	whole pack minus badsect track
! .DT
! .fi
! .PP
! Those partitions marked with an asterisk (``*'') allow access to bad block
  information stored at the end of some packs.  Extreme care must be taken when
! creating file systems on these partitions to avoid overwriting any bad block
! information present.  I general it's best to use
! .IR newfs (8)
! to create file systems since it uses the ``safe'' partition sizes recored in
! .IR /etc/disktab .
! .PP
  .SH FILES
  .ta \w'/dev/MAKEDEV.local  'u
  /dev/hk[0-7][a-h]	block files
--- 52,72 ----
  .I seek
  calls should specify a multiple of 512 bytes.
  .SH "DISK SUPPORT"
! Disks must be labeled using either the standalone \fIdisklabel\fP program on
! the boot tape or with the \fIdisklabel\fP(8) program.  There are no partition
! tables coded into the \fIhk\fP drivers, these must be placed on the drive with
! \fIdisklabel\fP.
  .PP
! Traditionally the \fIhk?a\fP partition is used for the root filesystem, the
! \fIb\fP partition as a swap area and the \fIc\fP partition for disk to disk
! copying (it spans the entire disk).
  .PP
! The kernel uses the \fIc\fP partition to access the bad block
  information stored at the end of some packs.  Extreme care must be taken when
! creating file systems on this partition to avoid overwriting any bad block
! information present.  User data should use the \fIh\fP partition
! which should be at least one track (one cylinder might be best) shorter 
! than the \fIc\fP partition.
  .SH FILES
  .ta \w'/dev/MAKEDEV.local  'u
  /dev/hk[0-7][a-h]	block files
***************
*** 102,108 ****
  /dev/MAKEDEV.local	script to localize special files
  .DT
  .SH "SEE ALSO"
! ra(4),
  ram(4),
  rk(4),
  rl(4),
--- 78,84 ----
  /dev/MAKEDEV.local	script to localize special files
  .DT
  .SH "SEE ALSO"
! ra(4)
  ram(4),
  rk(4),
  rl(4),
***************
*** 110,116 ****
  si(4),
  xp(4),
  dtab(5),
! autoconfig(8)
  .SH DIAGNOSTICS
  \fBhk%d%c: hard error sn%d cs2=%b ds=%b er=%b\fR.  An unrecoverable
  error occurred during transfer of the specified sector of the specified
--- 86,93 ----
  si(4),
  xp(4),
  dtab(5),
! autoconfig(8),
! disklabel(8)
  .SH DIAGNOSTICS
  \fBhk%d%c: hard error sn%d cs2=%b ds=%b er=%b\fR.  An unrecoverable
  error occurred during transfer of the specified sector of the specified
***************
*** 158,164 ****
  .PP
  A program to analyze the logged error information (even in its
  present reduced form) is needed.
- .PP
- The partition tables for the file systems should be read off of each
- pack, as they are never quite what any single installation would prefer,
- and this would make packs more portable.
--- 135,137 ----
*** /usr/src/share/zoneinfo/Makefile.old	Thu Feb  6 22:04:10 1997
--- /usr/src/share/zoneinfo/Makefile	Sun Dec 28 23:27:19 1997
***************
*** 1,4 ****
! # @(#)Makefile	1.5 Makefile 1997/2/6
  
  DESTDIR=
  
--- 1,4 ----
! # @(#)Makefile	1.6 Makefile 1997/12/28
  
  DESTDIR=
  
***************
*** 42,49 ****
  all:		zdump zic ${ZICMAN} ${ZDUMAN}
  
  install:	zic $(DATA) $(MAN)
! 		umask 22
! 		./zic -d ${SHARDIR} $(DATA)
  		install -c -m 444 -o bin -g bin ${SHARDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
  		install -c -m 444 -o bin -g bin $(ZICMAN) ${MANDIR}/${ZICMAN}
  		install -c -m 444 -o bin -g bin $(ZDUMAN) ${MANDIR}/${ZDUMAN}
--- 42,48 ----
  all:		zdump zic ${ZICMAN} ${ZDUMAN}
  
  install:	zic $(DATA) $(MAN)
! 		(umask 22; ./zic -d ${SHARDIR} $(DATA))
  		install -c -m 444 -o bin -g bin ${SHARDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
  		install -c -m 444 -o bin -g bin $(ZICMAN) ${MANDIR}/${ZICMAN}
  		install -c -m 444 -o bin -g bin $(ZDUMAN) ${MANDIR}/${ZDUMAN}
*** /VERSION.old	Sat Dec 27 23:34:32 1997
--- /VERSION	Sat Dec 27 23:25:26 1997
***************
*** 1,5 ****
! Current Patch Level: 397
! Date: December 16, 1997
  
  2.11 BSD
  ============
--- 1,5 ----
! Current Patch Level: 398
! Date: December 28, 1997
  
  2.11 BSD
  ============
