summaryrefslogtreecommitdiffstats
path: root/sbin/gpt/gpt.c
Commit message (Collapse)AuthorAgeFilesLines
* - distinguish between the device name (what the user called it on thedes2005-04-241-11/+15
| | | | | | | | | | | | command line) and the device path (what we passed to open()). Use the former in diagnostics. - when adding or removing partitions, print a single line to stdout for each partition that was added or removed, indicating its name. - add an -a option to 'gpt remove' which must be explicitly specified to remove all partitions. Approved by: marcel (in prinicple) MFC after: 2 weeks
* Add byte swapping and UUID encoding/decoding to allow gpt to be compiledmarcel2004-10-251-20/+56
| | | | | | on big-endian machines. Obtained from: Dan Markarian <markarian at apple dot com>
* Implement a remove command. The remove command iterates the GPTmarcel2004-08-071-1/+1
| | | | | | | | | partitions and removes any that matches the pre-conditions. The options are the same for the add command and are used to select the partitions to remove. Currently the remove command without any options deletes all GPT partitions. This is rather harmful and will need anti-footshooting measures.
* o Save the partition number (=index) in the internal map. The indexmarcel2004-08-071-0/+2
| | | | | | | | | | starts at 1. No index is represented by 0. o Change the show command to display the partition number at the expense of the partition end columm. We already display the start and size. o Enhance the add command to accept the -i option. The -i option allows the user to specify which partition number the new partition should get. o Update the manpage accordingly.
* o Newer EFI implementations require that a GPT is preceeded bymarcel2002-12-021-43/+85
| | | | | | | | | | | | | | | | | | 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-57/+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-31/+73
| | | | | | | | | | | | 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-1/+1
| | | | | | 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.
* Grab a snapshot of Marcel's gpt tool. This is still a work-in-progresspeter2002-07-201-0/+466
but is useful to have handy. EFI GPT partitions are used instead of the fdisk+disklabel combination. They are pure 64 bit LBA, are fully extensible, support up to 16383 partitons per disk, etc.
OpenPOWER on IntegriCloud