diff --git a/Cargo.toml b/Cargo.toml index 6c34bdd..ac9e68c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,8 @@ serde-byte-array = "0.1.2" iso7816 = "0.1.1" hmac = "0.12.1" rand = { version = "0.8.5", default-features = false } -littlefs2 = "0.4.0" +littlefs2 = "0.5.0" +littlefs2-core = "0.1.0" cbor-smol = { version = "0.5.0", features = ["heapless-bytes-v0-3"] } serde_bytes = { version = "0.11.12", default-features = false } trussed-rsa-alloc = "0.2.1" @@ -57,15 +58,15 @@ admin-app = { version = "0.1.0", features = ["migration-tests"] } serde_test = "1.0.176" [patch.crates-io] -littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "960e57d9fc0d209308c8e15dc26252bbe1ff6ba8" } -apdu-dispatch = { git = "https://github.com/trussed-dev/apdu-dispatch.git", rev = "915fc237103fcecc29d0f0b73391f19abf6576de" } +littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", branch = "release-0.5.0" } +littlefs2-core = { git = "https://github.com/trussed-dev/littlefs2.git", branch = "release-0.5.0" } ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "57cb3317878a8593847595319aa03ef17c29ec5b" } -trussed = { git = "https://github.com/nitrokey/trussed.git", rev = "540ad725ef44f0d6d3d2da7dd6ec0bacffaeb5bf" } -trussed-auth = { git = "https://github.com/trussed-dev/trussed-auth.git", tag = "v0.3.0"} +trussed = { git = "https://github.com/trussed-dev/trussed.git", branch = "littlefs2" } +trussed-auth = { git = "https://github.com/trussed-dev/trussed-auth.git", branch = "littlefs2"} trussed-manage = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "manage-v0.1.0" } trussed-rsa-alloc = { git = "https://github.com/trussed-dev/trussed-rsa-backend.git", tag = "v0.2.1" } trussed-wrap-key-to-file = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "wrap-key-to-file-v0.1.0" } -admin-app = { git = "https://github.com/Nitrokey/admin-app.git", tag = "v0.1.0-nitrokey.12" } +admin-app = { git = "https://github.com/Nitrokey/admin-app.git", branch = "littlefs2-core" } trussed-hpke = { git = "https://github.com/trussed-dev/trussed-staging.git", rev = "f0babe53813e7882cfe5ce749ebe3a65fc143fd7" } trussed-se050-manage = { path = "extensions/se050-manage" } diff --git a/src/core_api.rs b/src/core_api.rs index 588b647..c353382 100644 --- a/src/core_api.rs +++ b/src/core_api.rs @@ -8,7 +8,7 @@ use crypto_bigint::{ }; use embedded_hal::blocking::delay::DelayUs; use hex_literal::hex; -use littlefs2::{path, path::Path}; +use littlefs2_core::{path, Path}; use rand::{CryptoRng, RngCore}; use se05x::{ se05x::{ diff --git a/src/lib.rs b/src/lib.rs index e8c9a16..7120f75 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,8 +4,7 @@ use core::ops::Range; use embedded_hal::blocking::delay::DelayUs; use hex_literal::hex; -use littlefs2::path; -use littlefs2::path::Path; +use littlefs2_core::{path, Path}; use namespacing::{Namespace, NamespaceValue}; use se05x::{ se05x::{ diff --git a/src/migrate.rs b/src/migrate.rs index 9ed4779..42a90b4 100644 --- a/src/migrate.rs +++ b/src/migrate.rs @@ -1,4 +1,4 @@ -use littlefs2::{io::Error, object_safe::DynFilesystem, path::Path}; +use littlefs2_core::{DynFilesystem, Error, Path}; use crate::BACKEND_DIR; @@ -28,7 +28,7 @@ use crate::BACKEND_DIR; fn migrate_single(fs: &dyn DynFilesystem, path: &Path) -> Result<(), Error> { match fs.remove_dir_all(path) { - Err(Error::NoSuchEntry) => Ok(()), + Err(Error::NO_SUCH_ENTRY) => Ok(()), Err(err) => Err(err), Ok(()) => Ok(()), } @@ -41,7 +41,7 @@ fn migrate_single(fs: &dyn DynFilesystem, path: &Path) -> Result<(), Error> { /// Migrate does not itself keep track of whether the migration was performed /// /// ```rust -///# use littlefs2::{fs::Filesystem, const_ram_storage, path}; +///# use littlefs2_core::{fs::Filesystem, const_ram_storage, path}; ///# use trussed::types::{LfsResult, LfsStorage}; ///# use trussed_se050_backend::migrate::migrate_remove_all_dat; ///# const_ram_storage!(Storage, 4096); @@ -64,7 +64,7 @@ pub fn migrate_remove_all_dat(fs: &dyn DynFilesystem, apps: &[&Path]) -> Result< #[cfg(test)] mod tests { use admin_app::migrations::test_utils::{test_migration_one, FsValues}; - use littlefs2::path; + use littlefs2_core::path; use crate::trussed_auth_impl::AUTH_DIR; diff --git a/src/namespacing.rs b/src/namespacing.rs index 6aedffc..1825a43 100644 --- a/src/namespacing.rs +++ b/src/namespacing.rs @@ -1,5 +1,5 @@ use core::ops::Deref; -use littlefs2::path::Path; +use littlefs2_core::Path; use rand::{CryptoRng, Rng, RngCore}; use se05x::se05x::ObjectId; use serde::{Deserialize, Serialize}; diff --git a/src/trussed_auth_impl.rs b/src/trussed_auth_impl.rs index 8f8a6b8..d23a440 100644 --- a/src/trussed_auth_impl.rs +++ b/src/trussed_auth_impl.rs @@ -1,8 +1,7 @@ use core::fmt; use embedded_hal::blocking::delay::DelayUs; use hkdf::Hkdf; -use littlefs2::path; -use littlefs2::path::Path; +use littlefs2_core::{path, Path}; use se05x::{ se05x::{ commands::{GetRandom, ReadObject, WriteBinary},