Skip to content

Commit 23b6543

Browse files
committed
fpt: define and export const for FTPR
Signed-off-by: Daniel Maslowski <[email protected]>
1 parent b4be18a commit 23b6543

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/fpt.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ use crate::ver::Version;
2727
const FPT_MAGIC: &str = "$FPT";
2828
const FPT_MAGIC_BYTES: &[u8] = FPT_MAGIC.as_bytes();
2929

30+
pub const FTPR_NAME: &str = "FTPR";
31+
3032
#[derive(Immutable, IntoBytes, FromBytes, Serialize, Deserialize, Clone, Copy, Debug)]
3133
#[repr(C)]
3234
pub struct FPTHeader {
@@ -203,7 +205,7 @@ pub const EFFS: u32 = u32::from_be_bytes(*b"EFFS");
203205
// see https://troopers.de/downloads/troopers17/TR17_ME11_Static.pdf
204206
pub fn get_part_info(n: &str) -> (PartitionType, &str) {
205207
match n {
206-
"FTPR" => (PartitionType::Code, "Main code partition"),
208+
FTPR_NAME => (PartitionType::Code, "Main code partition"),
207209
"FTUP" => (PartitionType::Code, "[NFTP]+[WCOD]+[LOCL]"),
208210
"DLMP" => (PartitionType::Code, "IDLM partition"),
209211
"PSVN" => (PartitionType::Data, "Secure Version Number"),

0 commit comments

Comments
 (0)