REPBUILD: Always regenerate the image

master
microtau 2023-07-20 10:42:48 +00:00
parent a4077c72be
commit b1d45588aa
1 changed files with 1 additions and 15 deletions

View File

@ -71,25 +71,11 @@ fn main() -> Result<(), Error> {
}
fn get_fs() -> Result<FileSystem<impl ReadWriteSeek>, io::Error> {
let path = Path::new("target/disk.img");
match std::fs::metadata(path) {
Err(e) if e.kind() == io::ErrorKind::NotFound => (),
Err(e) => bail!(e),
Ok(_) => {
return FileSystem::new(
File::options().read(true).write(true).open(path)?,
FsOptions::new(),
)
.into_report()
}
}
let mut img = File::options()
.read(true)
.write(true)
.create(true)
.open(path)?;
.open(Path::new("target/disk.img"))?;
img.set_len(1024 * 1024 * 64)?;