Skip to content
Commits on Source (2)
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
// output format of the timestamps: // output format of the timestamps:
// either "UTC" or "Local" // either "UTC" or "Local"
// Usually It's a very good ide to keep all systems in UTC // Usually It's a very good idea to keep all systems in UTC
time: UTC, time: UTC,
// Note: Terminal output will be overridden // Note: Terminal output will be overridden
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
...@@ -246,7 +246,7 @@ pub enum PartUUID { ...@@ -246,7 +246,7 @@ pub enum PartUUID {
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
pub struct Partition { pub struct Partition {
pub label: String, pub label: String,
pub number: u32, pub number: ::std::num::NonZeroU32,
pub part_type: PartId, pub part_type: PartId,
pub part_uuid: PartUUID, pub part_uuid: PartUUID,
#[serde(default)] #[serde(default)]
...@@ -413,18 +413,6 @@ impl crate::config::CfgVerify for GPT { ...@@ -413,18 +413,6 @@ impl crate::config::CfgVerify for GPT {
// * warn if the partitions are not aligned to 2K sector // * warn if the partitions are not aligned to 2K sector
for (p1_idx, p1) in self.partitions.iter().enumerate() { for (p1_idx, p1) in self.partitions.iter().enumerate() {
if p1.number == 0 {
::slog::error!(
logger,
"GPT: partition number must be strictly positive. target: \
\"{}\" partition: {}",
self.id,
p1.number
);
return Err(errors::ConfigError::Consistency(
"Partition numbers must be strictly positive".to_owned(),
));
}
match p1.part_type { match p1.part_type {
PartId::UUID(_) => {} PartId::UUID(_) => {}
_ => { _ => {
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......
/* /*
* Copyright (c) 2021, Luca Fulchir <luker@fenrirproject.org> * Copyright (c) 2021-2022, Luca Fulchir <luker@fenrirproject.org>
* *
* This file is part of dfim. * This file is part of dfim.
* *
......