diff options
author | Karel Zak | 2018-01-09 12:12:50 +0100 |
---|---|---|
committer | Karel Zak | 2018-01-09 12:12:50 +0100 |
commit | 6ebc37854d6e34b79ba4c326cdc5607a25997196 (patch) | |
tree | 50b23cd82d4b2f2b0e8cdb1f05fdaf0311176f89 | |
parent | libfdisk: (gpt) add VMware specific UUIDs (diff) | |
download | kernel-qcow2-util-linux-6ebc37854d6e34b79ba4c326cdc5607a25997196.tar.gz kernel-qcow2-util-linux-6ebc37854d6e34b79ba4c326cdc5607a25997196.tar.xz kernel-qcow2-util-linux-6ebc37854d6e34b79ba4c326cdc5607a25997196.zip |
libfdisk: (script) support R (RAID) and V (LVM) shortcuts
Addresses: https://github.com/karelzak/util-linux/issues/560
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | disk-utils/sfdisk.8 | 6 | ||||
-rw-r--r-- | disk-utils/sfdisk.c | 4 | ||||
-rw-r--r-- | libfdisk/src/script.c | 13 |
3 files changed, 21 insertions, 2 deletions
diff --git a/disk-utils/sfdisk.8 b/disk-utils/sfdisk.8 index 31f64fd79..0a24e7321 100644 --- a/disk-utils/sfdisk.8 +++ b/disk-utils/sfdisk.8 @@ -361,6 +361,12 @@ linux extended partition; means 85 for MBR. .TP .B U EFI System partition, means EF for MBR and C12A7328-F81F-11D2-BA4B-00A0C93EC93B for GPT +.TP +.B R +Linux RAID; means fd for MBR and A19D880F-05FC-4D3B-A006-743F0F84911E for GPT +.TP +.B V +LVM; means 8e for MBR and E6D6D379-F507-44C2-A23C-238F2A3DF928 for GPT .RE .PP The default diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index 513a1152a..5a992342a 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -1312,8 +1312,8 @@ static void command_fdisk_help(void) fputc('\n', stdout); fputs(_(" <type> The partition type. Default is a Linux data partition.\n"), stdout); - fputs(_(" MBR: hex or L,S,E,X shortcuts.\n"), stdout); - fputs(_(" GPT: UUID or L,S,H shortcuts.\n"), stdout); + fputs(_(" MBR: hex or L,S,E,X,U,R,V shortcuts.\n"), stdout); + fputs(_(" GPT: UUID or L,S,H,U,R,V shortcuts.\n"), stdout); fputc('\n', stdout); fputs(_(" <bootable> Use '*' to mark an MBR partition as bootable.\n"), stdout); diff --git a/libfdisk/src/script.c b/libfdisk/src/script.c index d7ff11385..ff377e1e8 100644 --- a/libfdisk/src/script.c +++ b/libfdisk/src/script.c @@ -1016,6 +1016,13 @@ static struct fdisk_parttype *translate_type_shortcuts(struct fdisk_script *dp, case 'U': /* UEFI system */ type = "EF"; break; + case 'R': /* Linux RAID */ + type = "fd"; + break; + case 'V': /* LVM */ + type = "8e"; + break; + } } else if (lb->id == FDISK_DISKLABEL_GPT) { switch (*str) { @@ -1031,6 +1038,12 @@ static struct fdisk_parttype *translate_type_shortcuts(struct fdisk_script *dp, case 'U': /* UEFI system */ type = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"; break; + case 'R': /* Linux RAID */ + type = "A19D880F-05FC-4D3B-A006-743F0F84911E"; + break; + case 'V': /* LVM */ + type = "E6D6D379-F507-44C2-A23C-238F2A3DF928"; + break; } } |