mirror of
https://github.com/solokeys/admin-app.git
synced 2026-06-20 13:16:17 -07:00
Update littlefs2 to v0.5.0
This commit is contained in:
+4
-4
@@ -15,7 +15,8 @@ cbor-smol = { version = "0.5.0", features = ["heapless-v0-7", "heapless-bytes-v0
|
||||
ctaphid-dispatch = "0.1"
|
||||
delog = "0.1"
|
||||
iso7816 = "0.1"
|
||||
littlefs2 = "0.4"
|
||||
littlefs2 = { version = "0.5", optional = true }
|
||||
littlefs2-core = { version = "0.1", features = ["heapless-bytes03"] }
|
||||
serde = { version = "1.0.180", default-features = false }
|
||||
strum_macros = "0.25.2"
|
||||
trussed = "0.1"
|
||||
@@ -39,11 +40,10 @@ log-warn = []
|
||||
log-error = []
|
||||
|
||||
# Utils to test migration
|
||||
migration-tests = []
|
||||
migration-tests = ["dep:littlefs2"]
|
||||
|
||||
[patch.crates-io]
|
||||
ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "57cb3317878a8593847595319aa03ef17c29ec5b" }
|
||||
littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "ebd27e49ca321089d01d8c9b169c4aeb58ceeeca" }
|
||||
trussed = { git = "https://github.com/Nitrokey/trussed.git", tag = "v0.1.0-nitrokey.18" }
|
||||
trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "046478b7a4f6e2315acf9112d98308379c2e3eee" }
|
||||
trussed-manage = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "manage-v0.1.0" }
|
||||
trussed-se050-manage = { git = "https://github.com/Nitrokey/trussed-se050-backend.git", tag = "se050-manage-v0.1.0" }
|
||||
|
||||
+5
-2
@@ -5,7 +5,7 @@ use core::{convert::TryInto, marker::PhantomData, time::Duration};
|
||||
use ctaphid_dispatch::app::{self as hid, Command as HidCommand, Message};
|
||||
use ctaphid_dispatch::command::VendorCommand;
|
||||
#[cfg(feature = "factory-reset")]
|
||||
use littlefs2::path::PathBuf;
|
||||
use littlefs2_core::PathBuf;
|
||||
use serde::Deserialize;
|
||||
use trussed::store::Store;
|
||||
use trussed::try_syscall;
|
||||
@@ -449,6 +449,10 @@ where
|
||||
response.push(FACTORY_RESET_APP_FAILED_PARSE).ok();
|
||||
return Ok(());
|
||||
};
|
||||
let Ok(path) = PathBuf::try_from(client) else {
|
||||
response.push(FACTORY_RESET_APP_FAILED_PARSE).ok();
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
let Some((_, flag)) = self.config().reset_client_id(client) else {
|
||||
response.push(FACTORY_RESET_APP_NOT_ALLOWED).ok();
|
||||
@@ -460,7 +464,6 @@ where
|
||||
response.push(FACTORY_RESET_NOT_CONFIRMED).ok();
|
||||
return Ok(());
|
||||
}
|
||||
let path = PathBuf::from(client);
|
||||
|
||||
match self.config.reset_client_config(client) {
|
||||
crate::config::ResetConfigResult::Changed => {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ use core::{
|
||||
};
|
||||
|
||||
use cbor_smol::{cbor_deserialize, cbor_serialize_to};
|
||||
use littlefs2::{path, path::Path};
|
||||
use littlefs2_core::{path, Path};
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use strum_macros::FromRepr;
|
||||
use trussed::{
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
use littlefs2::object_safe::DynFilesystem;
|
||||
use littlefs2_core::DynFilesystem;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Migrator {
|
||||
/// The function performing the migration
|
||||
///
|
||||
/// First argument is the Internal Filesystem, second argument is the External
|
||||
pub migrate: fn(&dyn DynFilesystem, &dyn DynFilesystem) -> Result<(), littlefs2::io::Error>,
|
||||
pub migrate: fn(&dyn DynFilesystem, &dyn DynFilesystem) -> Result<(), littlefs2_core::Error>,
|
||||
|
||||
/// The version of the storage for which the migration needs to be run
|
||||
pub version: u32,
|
||||
|
||||
Reference in New Issue
Block a user