aboutsummaryrefslogtreecommitdiff
path: root/lib/libdisk/open_disk.c
Commit message (Collapse)AuthorAgeFilesLines
* - Sanitize disk parameters retrieved from GEOM, as they are not guaranteed toUlf Lilleengen2009-02-091-0/+3
| | | | | | | | | | have sane values. It caused sysinstall to crash when installing on certain SD cards. Discussed with: marcel Notes: svn path=/head/; revision=188408
* Add support for gpart:Marcel Moolenaar2008-04-241-6/+10
| | | | | | | | | o Correct for gpart's 1-based index, versus 0-based index used by legacy slicers. o Parse and understand the xs and xt parameters. Notes: svn path=/head/; revision=178451
* On PowerPC, geom_part has taken over the partitioning from geom_apple.Marcel Moolenaar2007-09-211-2/+7
| | | | | | | | | | Translate partitions of type "PART" to chunks of type "apple" on PowerPC. This fixes sysinstall. Approved by: re (kensmith) Notes: svn path=/head/; revision=172285
* Improve error handling in libdisk while parsing the kern.geom.conftxt sysctl.Rink Springer2007-08-051-19/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, any parse error will result in the calling program exiting with an unpleasant message. This change will cause libdisk to issue a warning and ignore lines it cannot parse instead of bluntly terminating the unfortunate enough program. This change will allow you to use sysinstall if you have a NTFS parition with a space in the name (such as 'Win Xp'). In such a case, a line like the following will appear in the kern.geom.conftxt output: 2 LABEL ntfs/Win Xp 209818635264 512 i 0 o 0 As the fields are space-separated, libdisk would go beserk and exit the program. This would happen if using FreeBSD 7.0 snapshot images (as GEOM_LABEL is in the installation kernel as well), thus making it impossible to install FreeBSD without renaming your NTFS paritions. Reported by: Dwight Berendse <dwight at berendse dot org> Nod from: phk Reviewed by: imp Approved by: re (bmah), imp (mentor) MFC after: 1 month Notes: svn path=/head/; revision=171734
* Initialise `sn' before using its value.Stefan Farfeleder2005-03-081-2/+1
| | | | Notes: svn path=/head/; revision=143306
* Don't barf when we encounter an UUID for GPT partitions. Instead, addMarcel Moolenaar2004-10-311-2/+2
| | | | | | | | | | | | the GPT partition on i386 and adm64 as type=gpt, subtype=0 and with the sname set to the UUID. This prevents sysinstall from bombing out. This also makes sure the GPT partition shows up in sysinstall so as to avoid accidental "clobberage". PR: bin/72896 Notes: svn path=/head/; revision=137092
* We have now so many GEOM classes that it is better to just skip unknownPawel Jakub Dawidek2004-09-131-12/+2
| | | | | | | | | | classes than exiting. Reviewed by: le OK'ed by: phk Notes: svn path=/head/; revision=135153
* Ignore geom_stripe providers.Lukas Ertl2004-09-131-0/+2
| | | | | | | MFC in: one week Notes: svn path=/head/; revision=135145
* Typo in comment.Lukas Ertl2004-08-021-1/+1
| | | | Notes: svn path=/head/; revision=133032
* Ignore geom_vinum providers.Lukas Ertl2004-08-021-0/+2
| | | | Notes: svn path=/head/; revision=133028
* PowerPC support.Peter Grehan2004-04-211-1/+6
| | | | | | | | submitted by: Suleiman Souhlal <refugee@segfaulted.com> approved by: phk, jhb Notes: svn path=/head/; revision=128541
* Make libdisk WARNS=4 clean.Jun Kuriyama2004-03-301-4/+8
| | | | | | | Glanced by: jhb Notes: svn path=/head/; revision=127595
* Change libdisk and sysinstall to use d_addr_t rather than u_long for diskJohn Baldwin2004-03-161-3/+3
| | | | | | | | | | | | | | | | | | | addresses. For arch's with 64-bit longs, this is a nop, but for i386 this allows sysinstall to properly handle disks and filesystems > 1 TB. Changes from the original patch include: - Use d_addr_t rather than inventing a blkcnt type based on int64_t. - Use strtoimax() rather than strtoull() to parse d_addr_t's from config files. - Use intmax_t casts and %jd rather than %llu to printf d_addr_t values. Tested on: i386 Tested by: kuriyama Submitted by: julian MFC after: 1 month Notes: svn path=/head/; revision=127081
* o Move Int_Open_Disk() from disk.c to open_disk.c for use by allMarcel Moolenaar2003-11-021-0/+278
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. Notes: svn path=/head/; revision=121888