From owner-svn-src-all@FreeBSD.ORG Sat Sep 19 03:33:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B33A106566B; Sat, 19 Sep 2009 03:33:18 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A8788FC17; Sat, 19 Sep 2009 03:33:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8J3XI0o008488; Sat, 19 Sep 2009 03:33:18 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8J3XIGg008486; Sat, 19 Sep 2009 03:33:18 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200909190333.n8J3XIGg008486@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sat, 19 Sep 2009 03:33:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197322 - head/lib/libdisk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Sep 2009 03:33:18 -0000 Author: nyan Date: Sat Sep 19 03:33:18 2009 New Revision: 197322 URL: http://svn.freebsd.org/changeset/base/197322 Log: Correct BIOS header sanitizing on pc98. MFC after: 3 days Modified: head/lib/libdisk/change.c Modified: head/lib/libdisk/change.c ============================================================================== --- head/lib/libdisk/change.c Sat Sep 19 01:49:36 2009 (r197321) +++ head/lib/libdisk/change.c Sat Sep 19 03:33:18 2009 (r197322) @@ -36,14 +36,17 @@ Sanitize_Bios_Geom(struct disk *disk) if (disk->bios_cyl >= 65536) sane = 0; - if (disk->bios_hd > 256) - sane = 0; #ifdef PC98 + if (disk->bios_hd >= 256) + sane = 0; if (disk->bios_sect >= 256) + sane = 0; #else + if (disk->bios_hd > 256) + sane = 0; if (disk->bios_sect > 63) -#endif sane = 0; +#endif if (disk->bios_cyl * disk->bios_hd * disk->bios_sect != disk->chunks->size) sane = 0;