forked from AbleOS/ableos
REPBUILD: Always regenerate the image
This commit is contained in:
parent
f474f0fb69
commit
c9ab181d95
|
@ -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)?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue