From owner-cvs-src@FreeBSD.ORG Sun Nov 2 00:39:10 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2742416A4CF; Sun, 2 Nov 2003 00:39:10 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EC2143FB1; Sun, 2 Nov 2003 00:39:09 -0800 (PST) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hA28d8XJ050365; Sun, 2 Nov 2003 00:39:08 -0800 (PST) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hA28d8Hf050364; Sun, 2 Nov 2003 00:39:08 -0800 (PST) (envelope-from marcel) Message-Id: <200311020839.hA28d8Hf050364@repoman.freebsd.org> From: Marcel Moolenaar Date: Sun, 2 Nov 2003 00:39:08 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libdisk Makefile create_chunk.c disk.c libdisk.h open_disk.c open_ia64_disk.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Nov 2003 08:39:10 -0000 marcel 2003/11/02 00:39:08 PST FreeBSD src repository Modified files: lib/libdisk Makefile create_chunk.c disk.c libdisk.h Added files: lib/libdisk open_disk.c open_ia64_disk.c Log: o Move Int_Open_Disk() from disk.c to open_disk.c for use by all platforms except ia64 and use Int_Open_Disk() in open_ia64_disk.c on ia64. We need to know more than GEOM can provide us so we're forced to read from the disk. Move uuid_type() to open_ia64_disk.c and remove all references on non-ia64. o Pass the GEOM conftxt to Int_Open_Disk() so that only Open_Disk() needs to know about GEOM and libdisk can more easily be used with media not handled by GEOM. o Create an ia64 specific definiton of struct disk on ia64, because we don't need/have most of the fields other platforms need and other fields not applicable on platforms other than ia64. o Do not compile change.c on ia64. It's too PC specific. o In Fixup_Names() in create_chunk.c, try all partition numbers that are valid for the GPT disk. We have the total number of partitions that can be allocated in the disk structure on ia64. Also, use the GPT partition naming if we're creating one under a chunk of type "whole". It's a GPT partition in that case. o In Create_Chunk(), compile-out the PC specific code on ia64 that checks BIOS geometry restrictions. o In Debug_Disk() in disk.c, dump the ia64 specific fields. o Save the partition index in the chunk on ia64 so that we can preserve it when we write the data back to disk. This avoids that partitions get moved around or swapped after installing FreeBSD, which may render a disk unusable. Revision Changes Path 1.39 +9 -2 src/lib/libdisk/Makefile 1.82 +13 -5 src/lib/libdisk/create_chunk.c 1.119 +13 -291 src/lib/libdisk/disk.c 1.59 +17 -6 src/lib/libdisk/libdisk.h 1.1 +278 -0 src/lib/libdisk/open_disk.c (new) 1.1 +273 -0 src/lib/libdisk/open_ia64_disk.c (new)