forked from M-Labs/rust-fatfs
Do not mount volume if fs_version field in BPB is not zero
This commit is contained in:
parent
8a5491a919
commit
4f08acf4ab
@ -390,6 +390,10 @@ impl <T: ReadWriteSeek> FileSystem<T> {
|
|||||||
boot.bpb
|
boot.bpb
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if bpb.fs_version != 0 {
|
||||||
|
return Err(Error::new(ErrorKind::Other, "unknown FS version"));
|
||||||
|
}
|
||||||
|
|
||||||
let total_sectors =
|
let total_sectors =
|
||||||
if bpb.total_sectors_16 == 0 { bpb.total_sectors_32 }
|
if bpb.total_sectors_16 == 0 { bpb.total_sectors_32 }
|
||||||
else { bpb.total_sectors_16 as u32 };
|
else { bpb.total_sectors_16 as u32 };
|
||||||
|
Loading…
Reference in New Issue
Block a user