aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2019-12-30 13:01:43 +1100
committerAlexey Kardashevskiy <aik@ozlabs.ru>2019-12-30 13:02:53 +1100
commit12b5d02e378a204c986b52d56b4ca8a0dab6ba21 (patch)
tree479e320f07934f992137600c311f0f196730f25c
parent7b1fb8daf911d3d54a1246b69c1d06a6cd8471f5 (diff)
downloadSLOF-12b5d02e378a204c986b52d56b4ca8a0dab6ba21.zip
SLOF-12b5d02e378a204c986b52d56b4ca8a0dab6ba21.tar.gz
SLOF-12b5d02e378a204c986b52d56b4ca8a0dab6ba21.tar.bz2
disk-label: Support Linux GPT partition type
This adds support for: "Linux filesystem data" 0FC63DAF-8483-4772-8E79-3D69D8477DE4 Previously, Linux used the same GUID for the data partitions as Windows (Basic data partition: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). The new GUID (Linux filesystem data: 0FC63DAF-8483-4772-8E79-3D69D8477DE4) was defined jointly by GPT fdisk and GNU. Source: https://en.wikipedia.org/wiki/GUID_Partition_Table#cite_note-linwin-40 Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
-rw-r--r--slof/fs/packages/disk-label.fs8
1 files changed, 7 insertions, 1 deletions
diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs
index 068a1a8..790d433 100644
--- a/slof/fs/packages/disk-label.fs
+++ b/slof/fs/packages/disk-label.fs
@@ -390,6 +390,12 @@ EBD0A0A2 B9E5 4433 87C068B6B72699C7 GPT-BASIC-DATA-PARTITION uuid!
GPT-BASIC-DATA-PARTITION uuid=
;
+\ Linux filesystem data 0FC63DAF-8483-4772-8E79-3D69D8477DE4
+CREATE GPT-LINUX-PARTITION 10 allot
+0FC63DAF 8483 4772 8E793D69D8477DE4 GPT-LINUX-PARTITION uuid!
+: gpt-linux-partition? ( -- true|false )
+ block gpt-part-entry>part-type-guid
+ GPT-LINUX-PARTITION uuid=
;
\
@@ -455,7 +461,7 @@ EBD0A0A2 B9E5 4433 87C068B6B72699C7 GPT-BASIC-DATA-PARTITION uuid!
1+ 1 ?DO
seek-pos 0 seek drop
block gpt-part-size read drop
- gpt-basic-data-partition? IF
+ gpt-basic-data-partition? gpt-linux-partition? or IF
debug-disk-label? IF ." GPT BASIC DATA partition found " cr THEN
block gpt-part-entry>first-lba x@-le ( first-lba )
dup to part-start ( first-lba )