redbear: apply readonly-live-media patch, add author attribution, use local redox-scheme path
This commit is contained in:
+3
-2
@@ -5,7 +5,7 @@ repository = "https://gitlab.redox-os.org/redox-os/redoxfs"
|
||||
version = "0.9.1+rb0.2.5"
|
||||
license-file = "LICENSE"
|
||||
readme = "README.md"
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>", "vasilito <adminpupkin@gmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
@@ -87,7 +87,7 @@ fuser = { version = "0.16", optional = true }
|
||||
[target.'cfg(target_os = "redox")'.dependencies]
|
||||
libredox = { path = "../libredox", optional = true }
|
||||
redox-path = "0.3.0"
|
||||
redox-scheme = { version = "0.11.2", optional = true }
|
||||
redox-scheme = { path = "../redox-scheme", optional = true }
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
|
||||
@@ -98,3 +98,4 @@ assert_cmd = "2.0.17"
|
||||
[patch.crates-io]
|
||||
redox_syscall = { path = "../syscall" }
|
||||
libredox = { path = "../libredox" }
|
||||
redox-scheme = { path = "../redox-scheme" }
|
||||
|
||||
@@ -43,10 +43,12 @@ impl<T> ResultExt for std::io::Result<T> {
|
||||
|
||||
impl DiskFile {
|
||||
pub fn open(path: impl AsRef<Path>) -> Result<DiskFile> {
|
||||
let path = path.as_ref();
|
||||
let file = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.open(path)
|
||||
.or_else(|_| OpenOptions::new().read(true).open(path))
|
||||
.or_eio()?;
|
||||
Ok(DiskFile { file })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user