Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ssc-vax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!hogpc!houti!ariel!vax135!cornell!uw-beaver!ssc-vax!jeff From: jeff@ssc-vax.UUCP Newsgroups: net.bugs.4bsd Subject: small bug in stand/hp.c Message-ID: <119@ssc-vax.UUCP> Date: Tue, 1-May-84 21:23:12 EDT Article-I.D.: ssc-vax.119 Posted: Tue May 1 21:23:12 1984 Date-Received: Thu, 3-May-84 08:25:04 EDT Organization: Boeing Aerospace, Seattle Lines: 44 Subject: small bug in hp.c Index: /sys/stand/hp.c 4.2BSD Description: Placement of 'st' (drive table ptr) initialization causes no such after 1st open call (when hp_type[unit] is non-0.) Thus, stand-alone programs which reopen a disk multiple times fail after the first open because a garbage io->i_boff is recalculated using a nonsense st->off address in turn causing totally wild disk addresses to be calculated in the strategy routine. (This is, for instance, why the program described in format(8V) doesn't work without a reload from the floppy if you try to format a second pack using only one invocation of the program.) Repeat-By: See above. Fix: *** hp.c Tue May 1 17:39:57 1984 --- ,hp.c Sun Sep 25 18:06:33 1983 *************** *** 117,124 hpbad[unit].bt_bad[i].bt_trksec = -1; } } ! } else ! st = &hpst[hp_type[unit]]; if (io->i_boff < 0 || io->i_boff > 7 || st->off[io->i_boff]== -1) _stop("hp bad minor"); --- 117,123 ----- hpbad[unit].bt_bad[i].bt_trksec = -1; } } ! } if (io->i_boff < 0 || io->i_boff > 7 || st->off[io->i_boff]== -1) _stop("hp bad minor"); ------------------------------------------------------------------ - jeffrey jongeward boeing aerospace co., seattle uw-beaver!ssc-vax!jeff