fix paths and ignores for the image dump files

This commit is contained in:
bunnie 2021-11-13 17:34:34 +08:00
parent 1ed606fa7d
commit 93fd991dff
2 changed files with 6 additions and 2 deletions

4
.gitignore vendored
View file

@ -12,3 +12,7 @@
# local utility shellscripts
update-precursors.sh
# pddb debug files
tools/pddb.bin
tools/pddb.key

View file

@ -51,13 +51,13 @@ impl EmuStorage {
flashmem().memory.as_mut_slice()
}
pub fn dump_fs(&self) {
let mut f = File::create("../pddb.bin").unwrap();
let mut f = File::create("../tools/pddb.bin").unwrap();
f.write_all(flashmem().memory.as_slice()).unwrap();
f.flush().unwrap();
}
pub fn dump_keys(&self, known_keys: &[[u8; 32]]) {
//new().write(true).truncate(true).open
let mut f = File::create("../pddb.key").unwrap();
let mut f = File::create("../tools/pddb.key").unwrap();
f.write_all(&(known_keys.len() as u32).to_le_bytes()).unwrap();
for key in known_keys {
f.write_all(key).unwrap();