Skip to content

Commit

Permalink
fix for rust 3cb521a43
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Cross <[email protected]>
  • Loading branch information
xobs committed Jun 23, 2024
1 parent b5e401b commit 26d8337
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 65 deletions.
4 changes: 2 additions & 2 deletions 0001-std-xous-add-support-for-args-and-env.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e61d03dc7765931e8257df4d263219fceb40faaa Mon Sep 17 00:00:00 2001
From 097d592a0ab86be0758b9c594ece4024289a956e Mon Sep 17 00:00:00 2001
From: Sean Cross <[email protected]>
Date: Sun, 7 Jan 2024 22:49:22 +0800
Subject: [PATCH 1/6] std: xous: add support for args and env
Subject: [PATCH 1/5] std: xous: add support for args and env

Process arguments and environment variables are both passed by way of
Application Parameters. These are a TLV format that gets passed in as
Expand Down
4 changes: 2 additions & 2 deletions 0002-net-fix-dead-code-warning.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3e942fe8e9cb8adfe0b2549af9915f0950ad66c4 Mon Sep 17 00:00:00 2001
From 371adc83436c66ff954c0981c5eb265f00612f57 Mon Sep 17 00:00:00 2001
From: Sean Cross <[email protected]>
Date: Tue, 11 Jun 2024 00:31:32 +0800
Subject: [PATCH 2/6] net: fix dead code warning
Subject: [PATCH 2/5] net: fix dead code warning

Signed-off-by: Sean Cross <[email protected]>
---
Expand Down
4 changes: 2 additions & 2 deletions 0003-xous-add-senres.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 44748657b07b73133ceeb4f32199e6840b8eb36c Mon Sep 17 00:00:00 2001
From 1f307892c9a28f3875278bb81747abf2152dd538 Mon Sep 17 00:00:00 2001
From: Sean Cross <[email protected]>
Date: Tue, 7 Nov 2023 09:53:20 +0800
Subject: [PATCH 3/6] xous: add senres
Subject: [PATCH 3/5] xous: add senres

Senres is a method for sending and receiving structs. It is a cut-down
version of rkyv and similar modules.
Expand Down
27 changes: 8 additions & 19 deletions 0004-xous-fs-add-initial-filesystem-support.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From 6e30c0131bf5f08b7b2379d2a2717040edc95abf Mon Sep 17 00:00:00 2001
From 18e24b6011d6849c94989f9b81237acc2a6926c7 Mon Sep 17 00:00:00 2001
From: Sean Cross <[email protected]>
Date: Tue, 7 Nov 2023 10:41:10 +0800
Subject: [PATCH 4/6] xous: fs: add initial filesystem support
Subject: [PATCH 4/5] xous: fs: add initial filesystem support

Signed-off-by: Sean Cross <[email protected]>
---
library/std/src/os/xous/fs.rs | 33 ++
library/std/src/os/xous/mod.rs | 3 +
library/std/src/os/xous/path.rs | 42 ++
library/std/src/os/xous/services.rs | 3 +
library/std/src/os/xous/services/pddb.rs | 99 ++++
library/std/src/os/xous/services/pddb.rs | 88 ++++
library/std/src/sys/pal/xous/fs.rs | 629 +++++++++++++++++++++++
library/std/src/sys/pal/xous/mod.rs | 1 -
7 files changed, 809 insertions(+), 1 deletion(-)
7 files changed, 798 insertions(+), 1 deletion(-)
create mode 100644 library/std/src/os/xous/fs.rs
create mode 100644 library/std/src/os/xous/path.rs
create mode 100644 library/std/src/os/xous/services/pddb.rs
Expand Down Expand Up @@ -135,10 +135,10 @@ index a75be1b8570..2ccf1a5d698 100644

diff --git a/library/std/src/os/xous/services/pddb.rs b/library/std/src/os/xous/services/pddb.rs
new file mode 100644
index 00000000000..3348c3e17d9
index 00000000000..f8459b5bac9
--- /dev/null
+++ b/library/std/src/os/xous/services/pddb.rs
@@ -0,0 +1,99 @@
@@ -0,0 +1,88 @@
+use crate::io::SeekFrom;
+use crate::os::xous::ffi::Connection;
+use crate::os::xous::services::connect;
Expand All @@ -152,20 +152,9 @@ index 00000000000..3348c3e17d9
+
+#[repr(usize)]
+pub(crate) enum PddbLendMut {
+ // // IsMounted = 0,
+ // // TryMount = 1,
+
+ // // WriteKeyFlush = 18,
+ // // KeyDrop = 20,
+
+ // // ListBasisStd = 26,
+ // // ListDictStd = 28,
+ // // ListKeyStd = 29,
+ OpenKeyStd,
+ ReadKeyStd(u16 /* fd */),
+ // CloseKeyStd = 34,
+ DeleteKeyStd = 35,
+ // // LatestBasisStd = 36,
+ ListPathStd = 37,
+ StatPathStd = 38,
+
Expand Down Expand Up @@ -240,7 +229,7 @@ index 00000000000..3348c3e17d9
+}
diff --git a/library/std/src/sys/pal/xous/fs.rs b/library/std/src/sys/pal/xous/fs.rs
new file mode 100644
index 00000000000..45f5178e2bf
index 00000000000..fb2182e2091
--- /dev/null
+++ b/library/std/src/sys/pal/xous/fs.rs
@@ -0,0 +1,629 @@
Expand All @@ -258,7 +247,7 @@ index 00000000000..45f5178e2bf
+
+use super::senres::{self, Senres, SenresMut};
+
+pub use crate::sys_common::fs::try_exists;
+pub use crate::sys_common::fs::exists;
+
+pub struct File {
+ fd: u16,
Expand Down
38 changes: 0 additions & 38 deletions 0005-fixup-pddb.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e81b67fff4a85d5a4864acb316c544d164801ce7 Mon Sep 17 00:00:00 2001
From 9a60d04740d2ee4c80c1bee7b49f084761ed3b11 Mon Sep 17 00:00:00 2001
From: Sean Cross <[email protected]>
Date: Sun, 24 Dec 2023 15:15:01 +0800
Subject: [PATCH 6/6] std: (not for upstreaming) customize tests for Xous
Subject: [PATCH 5/5] std: (not for upstreaming) customize tests for Xous

Signed-off-by: Sean Cross <[email protected]>
---
Expand Down

0 comments on commit 26d8337

Please sign in to comment.