Commit Graph

3 Commits

Author SHA1 Message Date
Marcel Moolenaar
7bf298bcad Don't use type unknown for partitions that we don't care about because
the chunk will never be added to the list in that case. Use type mbr
for GPT nested MBRs and use type part for any partition we don't know
or care about. Since the subtype is 0, this should not cause confusion.
2004-08-05 17:44:07 +00:00
Marcel Moolenaar
89eaefd6eb Fix two bugs in the calculation of the last LBA of the GPT covered
part of the disk. The first appears to be a typo and instead of
dividing the media size with the sector size, we multiplied. The
second is an off-by-1 error that's the result of mixing up count
and index. The code in question is only applicable for virgin disks
and is used to create the "whole" chunk, which covers only the GPT
usable portion of the disk.
2003-11-03 06:24:48 +00:00
Marcel Moolenaar
f5ea9b34c6 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.
2003-11-02 08:39:08 +00:00