File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
crates/provisioning/src/commands Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 22//
33// SPDX-License-Identifier: MPL-2.0
44
5- use crate :: Context ;
65use crate :: { get_kdl_property, FromKdlProperty , PartitionTableType } ;
6+ use crate :: { get_property_str, Context } ;
77
88/// Command to create a partition table
99#[ derive( Debug ) ]
1010pub struct Command {
1111 /// The type of partition table to create
1212 pub table_type : PartitionTableType ,
13+ pub disk : String ,
1314}
1415
1516/// Generate a command to create a partition table
1617pub ( crate ) fn parse ( context : Context < ' _ > ) -> Result < super :: Command , crate :: Error > {
1718 let kind = get_kdl_property ( context. node , "type" ) ?;
1819 let table_type = PartitionTableType :: from_kdl_property ( kind) ?;
20+ let disk = get_property_str ( context. node , "disk" ) ?;
1921
20- Ok ( super :: Command :: CreatePartitionTable ( Box :: new ( Command { table_type } ) ) )
22+ Ok ( super :: Command :: CreatePartitionTable ( Box :: new ( Command {
23+ table_type,
24+ disk,
25+ } ) ) )
2126}
You can’t perform that action at this time.
0 commit comments