summaryrefslogtreecommitdiffstats
path: root/lib/libdisk
Commit message (Collapse)AuthorAgeFilesLines
* Teach libdisk that AMD64 works just like i386peter2003-04-305-8/+14
|
* Only define platform once -- in a C file.obrien2003-04-302-20/+23
|
* Fix a compiler warning.phk2003-04-231-0/+2
| | | | Submitted by: David Leimbach <leimy2k@mac.com>
* Fix compilation errors.phk2003-04-221-2/+1
| | | | I wonder how I managed to cross-compile this yesterday.
* Update libdisk to use the explicing encoding function for sunlabel dataphk2003-04-212-11/+13
| | | | structures.
* Use sized cast matching the sized pointer.phk2003-04-041-1/+1
|
* Libdisk does not need to include <sys/diskslice.h> any more.phk2003-04-049-9/+0
| | | | | | | | | Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h> Move i386/pc98 specific bits from <sys/reboot.h> to <i386/include/bootinfo.h> as well. Adjust includes in sys/boot accordingly.
* The .Nm librarycharnier2003-03-241-2/+3
|
* Ignore GBDE devices.phk2003-03-171-0/+2
| | | | Spotted by: Lucky Green <shamrock@cypherpunks.to>
* Fix build error.nyan2003-02-061-1/+0
|
* - Remove unused old disk pointers from Write_FreeBSD() and Fill_Disklabel()jhb2003-02-047-21/+18
| | | | | functions. - Clean up a few signed/unsigned warnings.
* Remove mostly unused disk arguments from Fixup_*_Names() functions.jhb2003-02-041-9/+9
|
* Use the fstype obtained from the GEOM dumpconf output to set the fstypejhb2003-01-101-1/+1
| | | | | | | of BSD part chunks when opening a disk. Reviewed by: phk MFC after: 2 days
* - Make New_Disk() non-static so it can be used in Create_Chunk_DWIM().jhb2003-01-103-3/+21
| | | | | | | | | | | | | | - In Create_Chunk_DWIM(), if there is a freebsd chunk that has no children chunks, then trying to add a child part chunk will fail even though there is free space. Handle this special case by adding an unused chunk the full size of the freebsd chunk as a child of the freebsd chunk before adding the new part chunk. This situation can happen when changing the type of an existing slice to be a FreeBSD slice type or when installing onto a blank disk on Alpha (which has no slices.) Reviewed by: phk MFC after: 2 days
* Rename the dos_partition structure for pc98 to pc98_partition.nyan2003-01-041-2/+2
|
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* Return an error if the size of the sector is zero. This is for removablenyan2002-12-261-0/+6
| | | | | | | | devices that is not inserted any media. This is MFC candidate. Submitted by: ISAKA Yoji <isaka@cory.jp>
* Consistently mark std(in|out|err) with .Dv, because that's how theyru2002-12-041-1/+2
| | | | | | | are marked up in stdio(3), and because they are defined expressions of type "FILE *". Approved by: re
* Break up a bunch of crazy if statements to use a case statement insteadjhb2002-12-021-14/+16
| | | | | | | | | | | to be cleaner. Also, when deleting a chunk, try to find the mother chunk as a whole chunk by default if this isn't a BSD partition or a unused or whole chunk. Before we just did this for FreeBSD and FAT slices, which means that other chunk types such as EFI and mbr (mbr is used for slices that don't have their own chunk type). Submitted by: nyan (mostly) Approved by: re
* - Ease sanity check to get cylinders.nyan2002-11-171-6/+12
| | | | - Get the slice name from the result of kern.geom.conftxt.
* Fixed style(9)nyan2002-11-1514-410/+485
|
* Handle EFI partitions the same as regular FAT partitions. The onlymarcel2002-11-132-0/+4
| | | | | | difference between the two from a low-level point of view is that the partition type is different. This change adds EFI related cases to existing switch statements with existing FAT related cases.
* - Document the chunk_name() function that replaces chunk_n[].davidc2002-11-111-5/+10
| | | | - Rearrange things a tiny bit.
* Remove parameter names from function prototypes (at least one collideddavidc2002-11-111-36/+37
| | | | | | with stdlib.h). discussed with: phk
* Remove debugging printfs.phk2002-11-111-7/+0
|
* MBR slices are named the same on ia64 as they are on i386.marcel2002-11-111-4/+4
|
* Write the boot block to the first 16 sectors of all partitions, instead ofjake2002-11-101-12/+13
| | | | | | | | | | always to the first 16 sectors of the disk. The firmware reads the boot code from a partition, defaulting to 'a' if none is specified, which only corresponds to the first 16 sectors of the disk if 'a' is first. Solaris often makes the swap partition first, instead of the root partition, and users expect to be able to do the same with freebsd as well. This also allows one to temporarily boot from another partition if the boot block on the root partition gets scrambled somehow.
* Add efi to the list of types for which we need to return tha name.marcel2002-11-101-1/+4
| | | | | Also, return chunk type efi in case we find an EFI partition in the GPT. We used to return FAT due to a lack of EFI type.
* Add an efi chunk type. We need to be able to create an EFI partitionmarcel2002-11-101-0/+1
| | | | | on ia64, because that's where we need to put the loader and the kernel.
* General cleanup:marcel2002-11-101-96/+68
| | | | | | | | | | | | | | | | | | | | | | | o Remove all code guarded by !defined(__ia64__). This file is specifically written for ia64, o Handle the case when read_block() or write_block() fails. We don't want sysinstall(8) to signal a thumbs-up on error, o Set the starting (cyl,hd,sect) triple to 0xFFFFFF when either bios_hd or bios_sect is zero or the LBA us not representable with the triple. In that case automaticly initialize the ending triple with 0xFFFFFF as well, o Reindent Write_Int32() as it was different than the rest of the file, o Remove some unused variables that appeared to be used but were effectively useless. o Plug a memory leak: The second timne we read the MBR, we write out a modified block, but didn't free the memory after writing. o Replace d1->sector_size with 512 when we read/write the MBR. We ignore the sector size in cases we shouldn't but adhered to it in cases it would be wrong if the sector_size wasn't 512. This file should eventually be rewritten to write out a GPT. For now, a MBR will do...
* - Recognize FAT partition on MBR and PC98 disks.nyan2002-11-081-20/+47
| | | | - Fix to convert to the name of partition.
* MFi386: revision 1.4.nyan2002-11-081-1/+0
|
* Don't set a variable to a bogus value right before setting it to thejhb2002-11-082-2/+0
| | | | correct value in the next statement.
* Don't set a value to a variable that we don't use.jhb2002-11-081-1/+0
|
* - Merge Write_FreeBSD() into Write_Disk().jhb2002-11-081-40/+32
| | | | - Miscellaneous cleanups.
* Fixed pc98 support.nyan2002-11-072-6/+5
| | | | (merged i386 changes from chunk.c 1.41 and disk.c 1.100)
* Get this closer to working. The Write_Disk() function's for loop neededjhb2002-11-071-20/+13
| | | | | | | to use the same start condition as the i386 version. However, since Alpha's only have one fake "slice" from sysinstall's perspective we don't need to use a loop, but can just write out the BSD label in the first fake "slice".
* Remove unused MBR gunk leftover from i386.jhb2002-11-031-11/+1
|
* Fix to compile for pc98.nyan2002-11-031-0/+8
|
* Initialize d->bios_cyl. We know the media size in sectors, the numbermarcel2002-11-031-4/+10
| | | | | | | of heads end the number of sectors per track. If there's an obvious insanity (heads and sectors are both zero or the media size is not an integral multiple of heads times sector) we set the number of cylinders to zero.
* Add support for GPT:marcel2002-11-021-5/+45
| | | | | | | | | | 1. When the parition type is not an integer, try to parse the type as an UUID. If that succeeds, map the UUID to chunk_e. 2. For GPT partitions, pass the type constructed in point 1 above to Add_Chunk. While here, fix the MBREXT case by only checking if the first 3 characters are MBR. This avoids duplication.
* Add support for ia64. This is almost identical to i386, except thatmarcel2002-11-021-0/+20
| | | | | with GPT chunks of type "part" do not necessarily live under chunks of type "freebsd". We don't necessarily have a disklabel.
* Don't claim all MBR's have subtype 165 on i386.phk2002-11-022-3/+2
| | | | Spotted by: Frode Nordahl <frode@nordahl.net>
* Fill in partition 2 with with "whole disk" parameters.phk2002-11-011-0/+8
|
* Style(9) improvements.phk2002-10-311-6/+6
|
* Set the sector size for the disk.phk2002-10-311-0/+2
|
* Restore to pc98 support.nyan2002-10-313-50/+108
|
* Use ${MACHINE} variable instead of using '.if .endif' each machines.nyan2002-10-311-18/+1
|
* Add '#include <err.h>' for warn().nyan2002-10-311-0/+1
|
* Actually save the bootblock in the disk structure. Write the bootblockjake2002-10-312-2/+9
| | | | to the right place on the disk instead of srewn all over it.
OpenPOWER on IntegriCloud