From owner-freebsd-hackers Tue Jun 20 13:53:28 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id NAA15592 for hackers-outgoing; Tue, 20 Jun 1995 13:53:28 -0700 Received: from deep-thought.demos.su (root@deep-thought.demos.su [192.91.186.133]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id NAA15574 ; Tue, 20 Jun 1995 13:53:03 -0700 Received: by deep-thought.demos.su id AAA00634; (8.6.11/D) Wed, 21 Jun 1995 00:52:20 +0400 To: Bruce Evans , hackers@freebsd.org, phk@freebsd.org Message-ID: Organization: DEMOS Date: Wed, 21 Jun 1995 00:52:20 +0400 (MSD) X-Mailer: Mail/@ [v2.38 FreeBSD] From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= aka "Andrey A. Chernov, Black Mage" X-Class: Fast Subject: Boot2 fix for review Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 1231 Sender: hackers-owner@freebsd.org Precedence: bulk *** disk.c.old Tue May 30 14:55:00 1995 --- disk.c Wed Jun 21 00:48:17 1995 *************** *** 135,144 **** /* This is a good idea for all disks */ bsize = dl->d_partitions[part].p_size; bend = boff + bsize - 1 ; ! if (bend / spc > 1024) { ! printf("partition is out of reach from the bios\n"); ! return 1; ! } #ifdef DO_BAD144 do_bad144 = 0; --- 135,142 ---- /* This is a good idea for all disks */ bsize = dl->d_partitions[part].p_size; bend = boff + bsize - 1 ; ! if (bend / spc > 1024) ! printf("root partition size > 1024, BIOS can't load kernel stored beyond this limit\n"); #ifdef DO_BAD144 do_bad144 = 0; *************** *** 212,217 **** --- 210,219 ---- int cyl, head, sec, nsec; cyl = sector/spc; + if (cyl > 1023) { + printf("Error: C:%d > 1023\n", cyl); + return; + } head = (sector % spc) / spt; sec = sector % spt; nsec = spt - sec; -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849