Skip to content

Commit 62732fe

Browse files
committed
nfs_cli: add all core nfs3 operations
1 parent 4319b25 commit 62732fe

12 files changed

Lines changed: 2682 additions & 453 deletions

File tree

Cargo.lock

Lines changed: 237 additions & 397 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nfs3/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ rpc_protocol = { path = "../rpc_protocol" }
3232
log = "0.4.27"
3333
nix = { version = "0.30.1", features = ["socket"] }
3434
xdr_lib = { path = "../xdr_lib" }
35+
socket2 = "0.6.4"
36+
hex = "0.4.3"
37+
serde_json = "1.0.150"
38+
serde = { version = "1.0.228", features = ["derive"] }
39+
erased-serde = "0.4.10"
3540

3641
[target.'cfg(target_os = "linux")'.dependencies]
3742
libc = "0.2"

nfs3/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
fn main() {
22
xdr_codegen::Compiler::new()
3+
.disable_debug_for("FileHandle".to_string())
4+
.disable_debug_for("FileAttributes".to_string())
5+
.disable_debug_for("CookieVerf".to_string())
6+
.disable_debug_for("ReadResOk".to_string())
37
.file("mount_proto.x")
48
.file("nfs3_xdr.x")
9+
.enable_derive_serialize()
510
.run()
611
.expect("That should have worked. :(");
712
}

nfs3/mount_proto.x

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ struct MountList {
4141
MountBody *inner;
4242
};
4343

44+
struct MountArg {
45+
DirPath path;
46+
};
47+
4448
struct GroupNode {
4549
Name name;
4650
GroupNode *next;
@@ -63,7 +67,7 @@ struct Exports {
6367
program MOUNT_PROGRAM {
6468
version MOUNT_V3 {
6569
void MOUNTPROC3_NULL(void) = 0;
66-
MountResult MOUNTPROC3_MNT(dirpath) = 1;
70+
MountResult MOUNTPROC3_MNT(MountArg) = 1;
6771
MountList MOUNTPROC3_DUMP(void) = 2;
6872
void MOUNTPROC3_UMNT(dirpath) = 3;
6973
void MOUNTPROC3_UMNTALL(void) = 4;

0 commit comments

Comments
 (0)