Skip to content

Commit

Permalink
Fix usbip runner
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Oct 14, 2024
1 parent 79636e1 commit d9db424
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ admin-app = { git = "https://github.com/Nitrokey/admin-app.git", branch = "littl
# fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", tag = "v0.1.1-nitrokey.20" }
fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", branch = "littlefs2-path" }
# trussed = { git = "https://github.com/nitrokey/trussed.git", tag = "v0.1.0-nitrokey.21" }
trussed = { git = "https://github.com/nitrokey/trussed.git", branch = "littlefs2-heapless" }
trussed = { git = "https://github.com/nitrokey/trussed.git", branch = "littlefs2-virt" }

# unreleased upstream changes
apdu-dispatch = { git = "https://github.com/Nitrokey/apdu-dispatch.git", tag = "v0.1.2-nitrokey.3" }
Expand Down
4 changes: 2 additions & 2 deletions runners/usbip/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<S: LfsStorage> LfsStorage for FilesystemStorage<S> {

fn write(&mut self, offset: usize, data: &[u8]) -> LfsResult<usize> {
if offset + data.len() > Self::BLOCK_COUNT * Self::BLOCK_SIZE {
return Err(littlefs2::io::Error::NoSpace);
return Err(littlefs2::io::Error::NO_SPACE);
}
let mut file = OpenOptions::new().write(true).open(&self.path).unwrap();
file.seek(SeekFrom::Start(offset as _)).unwrap();
Expand All @@ -113,7 +113,7 @@ impl<S: LfsStorage> LfsStorage for FilesystemStorage<S> {

fn erase(&mut self, offset: usize, len: usize) -> LfsResult<usize> {
if offset + len > Self::BLOCK_COUNT * Self::BLOCK_SIZE {
return Err(littlefs2::io::Error::NoSpace);
return Err(littlefs2::io::Error::NO_SPACE);
}
let mut file = OpenOptions::new().write(true).open(&self.path).unwrap();
file.seek(SeekFrom::Start(offset as _)).unwrap();
Expand Down

0 comments on commit d9db424

Please sign in to comment.