@@ -58,14 +58,16 @@ pub enum PartitionTypeGuid {
5858 EfiSystemPartition ,
5959 ExtendedBootLoader ,
6060 LinuxSwap ,
61+ LinuxFilesystem ,
6162}
6263
6364impl fmt:: Display for PartitionTypeGuid {
6465 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
6566 match self {
66- Self :: EfiSystemPartition => f. write_str ( "efi-system-partition" ) ,
67- Self :: ExtendedBootLoader => f. write_str ( "linux-extended-boot" ) ,
68- Self :: LinuxSwap => f. write_str ( "linux-swap" ) ,
67+ Self :: EfiSystemPartition => f. write_str ( "EFI System Partition" ) ,
68+ Self :: ExtendedBootLoader => f. write_str ( "Linux Extended Boot" ) ,
69+ Self :: LinuxFilesystem => f. write_str ( "Linux Filesystem" ) ,
70+ Self :: LinuxSwap => f. write_str ( "Linux Swap" ) ,
6971 }
7072 }
7173}
@@ -78,6 +80,7 @@ impl FromStr for PartitionTypeGuid {
7880 "efi-system-partition" => Ok ( Self :: EfiSystemPartition ) ,
7981 "linux-extended-boot" => Ok ( Self :: ExtendedBootLoader ) ,
8082 "linux-swap" => Ok ( Self :: LinuxSwap ) ,
83+ "linux-fs" => Ok ( Self :: LinuxFilesystem ) ,
8184 _ => Err ( crate :: Error :: UnknownVariant ) ,
8285 }
8386 }
@@ -90,14 +93,17 @@ impl PartitionTypeGuid {
9093 Self :: EfiSystemPartition => gpt:: partition_types:: EFI ,
9194 Self :: ExtendedBootLoader => gpt:: partition_types:: FREEDESK_BOOT ,
9295 Self :: LinuxSwap => gpt:: partition_types:: LINUX_SWAP ,
96+ Self :: LinuxFilesystem => gpt:: partition_types:: LINUX_FS ,
9397 }
9498 }
9599
96100 pub fn from_kdl_node ( node : & kdl:: KdlNode ) -> Result < Self , crate :: Error > {
97101 let value = kdl_value_to_string ( get_kdl_entry ( node, & 0 ) ?) ?;
98102 let v = value. parse ( ) . map_err ( |_| crate :: UnsupportedValue {
99103 at : node. span ( ) ,
100- advice : Some ( "'efi-system-partition', 'linux-swap', and 'linux-extended-boot' are supported" . into ( ) ) ,
104+ advice : Some (
105+ "'efi-system-partition', 'linux-swap' 'linux-extended-boot' and 'linux-fs' are supported" . into ( ) ,
106+ ) ,
101107 } ) ?;
102108 Ok ( v)
103109 }
0 commit comments