add api to format disks and create datastores

This commit is contained in:
Dietmar Maurer
2020-06-10 11:02:37 +02:00
parent fab2413741
commit d4f2397d4c
4 changed files with 229 additions and 0 deletions

View File

@ -126,6 +126,10 @@ pub fn parse_systemd_timer(filename: &str) -> Result<SectionConfigData, Error> {
parse_systemd_config(&TIMER_CONFIG, filename)
}
pub fn parse_systemd_mount(filename: &str) -> Result<SectionConfigData, Error> {
parse_systemd_config(&MOUNT_CONFIG, filename)
}
fn save_systemd_config(config: &SectionConfig, filename: &str, data: &SectionConfigData) -> Result<(), Error> {
let raw = config.write(filename, &data)?;