From 61b3a9733c0e0a79ccc43096642d378c8706add6 Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Wed, 11 May 2022 14:02:21 +0000 Subject: parted: add type command Include the partition type-id and type-uuid in the JSON output. Also add the the command 'type' to set them. Remove redundant flags from DosPartitionData and use only the system variable. Signed-off-by: Brian C. Lane --- doc/C/parted.8 | 5 +++++ doc/parted.texi | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) (limited to 'doc') diff --git a/doc/C/parted.8 b/doc/C/parted.8 index 7895440..ab34be7 100644 --- a/doc/C/parted.8 +++ b/doc/C/parted.8 @@ -134,6 +134,11 @@ human-friendly form for output). .B toggle \fIpartition\fP \fIflag\fP Toggle the state of \fIflag\fP on \fIpartition\fP. .TP +.B type \fIpartition\fP \fIid\fP or \fIuuid\fP +On MS-DOS set the type aka. partition id of \fIpartition\fP to +\fIid\fP. The \fIid\fP is a value between "0x01" and "0xff". On GPT +the type-uuid of \fIpartition\fP to \fIuuid\fP. +.TP .B disk_set \fIflag\fP \fIstate\fP Change a \fIflag\fP on the disk to \fIstate\fP. A flag can be either "on" or "off". Some or all of these flags will be available, depending on what disk label you diff --git a/doc/parted.texi b/doc/parted.texi index 8a3978a..9c9d282 100644 --- a/doc/parted.texi +++ b/doc/parted.texi @@ -466,6 +466,7 @@ GNU Parted provides the following commands: * select:: * set:: * toggle:: +* type:: * unit:: @end menu @@ -1034,6 +1035,25 @@ Toggle the state of @var{flag} on partition @var{number}. @end deffn +@node type +@subsection type +@cindex type, command description +@cindex command description, type + +@deffn Command type @var{number} @var{id} or @var{uuid} + +On MS-DOS set the type-id aka partition id to @var{id} on partition +@var{number}. The id is a value between 0x01 and 0xff, e.g. the ID for +Linux is 0x83. A list with some IDs is available at +@uref{https://en.wikipedia.org/wiki/Partition_type}. + +On GPT set the type-uuid to @var{uuid} on partition +@var{number}. E.g. the UUID for Linux is +0fc63daf-8483-4772-8e79-3d69d8477de4. A list with some UUIDs is availabe +at @uref{https://en.wikipedia.org/wiki/GUID_Partition_Table}. + +@end deffn + @node unit @subsection unit @cindex unit, command description -- cgit v1.2.1