summaryrefslogtreecommitdiffstats
path: root/sbin/gpt/create.c
Commit message (Collapse)AuthorAgeFilesLines
* /* -> /*- for license.marcel2005-08-311-1/+1
|
* Add an -f option (for force) to the create command. The -f optionmarcel2004-11-131-5/+15
| | | | | | | allows the user to force the creation of a GPT even when there's a MBR on the device. The MBR is simply wiped and any partitions described by it are lost. Without the -f option one cannot create a GPT when there's a MBR.
* Fix a braino: the partition size in the PMBR is in sectors, not bytesmarcel2004-11-121-5/+5
| | | | | | | | and 'mediasz' is in bytes. As it so happens, we define 'last' as the sector number of the last sector on the medium which also is the size of the PMBR partition. Therefore, use 'last' instead of 'mediasz'. Submitted by: Dan Markarian <markarian at apple dot com>
* Declare variables as static, like I intended.marcel2004-10-251-1/+1
| | | | Obtained from: Dan Markarian <markarian at apple dot com>
* Add byte swapping and UUID encoding/decoding to allow gpt to be compiledmarcel2004-10-251-28/+31
| | | | | | on big-endian machines. Obtained from: Dan Markarian <markarian at apple dot com>
* Use __FBSDID.marcel2004-08-071-2/+3
|
* o Newer EFI implementations require that a GPT is preceeded bymarcel2002-12-021-0/+35
| | | | | | | | | | | | | | | | | | a PMBR. Make sure the create command creates a PMBR as well (if not already present). o When parsing the MBR, explicitly check for a PMBR and create a PMBR map node if one is found. o When parsing the MBR, recurse to handle extended partitions. This allows us to flatten nested MBRs when migrating to a GPT. o Have the migrate command bail out if it encounters a partition it doesn't know how to migrate. This avoids data loss. o Change the output of the show command so that the UUIDs of the GPT partitions fit on the same line. o Show when partitions are extended partitions and add the PMBR type. Approved by: re (blanket)
* Remove inclusion of <sys/uuid.h>. We now include <sys/uuid.h> inmarcel2002-11-101-1/+0
| | | | | | <sys/gpt.h>. This avoids having to include both <sys/uuid.h> and <uuid.h>, which is considered by your friendly committer to be aestheticly displeasing (= ballyhoo barf barf :-)
* o Remove the fallback implementations of uuid_create(),marcel2002-11-021-0/+1
| | | | | uuid_from_string(), uuid_is_nil() and uuid_to_string(). o Include <uuid.h> where appropriate.
* o Add functionality to add a GPT partition,marcel2002-10-271-3/+3
| | | | | | | | | | | | o Use DCE compliant UUID functions and provide local implementations if they don't exist, o Move dumping of the map to show.c and print the partition type, o Some cleanups and rearrangements. The default GPT partition type is UFS. When no starting block or size are specified, the tool will create a partition in the first free space it find (or that fits, depending on the size).
* Add the functionality to create an (empty) GPT from scratch. Themarcel2002-10-251-0/+196
code is directly copied from migrate.c. The intend is to express migrate in terms of create and add. The functionality to add partitions is not yet there.
OpenPOWER on IntegriCloud