Skip to content

Commit

Permalink
Merge pull request #13 from utam0k/rpc-rs
Browse files Browse the repository at this point in the history
Version control of auto-generated code from rpc.proto
  • Loading branch information
adrianreber authored Jan 16, 2023
2 parents e2da832 + e6a16ed commit 87a5e0b
Show file tree
Hide file tree
Showing 4 changed files with 6,962 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/target
Cargo.lock
src/proto/rpc.rs
test/piggie
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ extern crate protobuf_codegen_pure;
fn main() {
protobuf_codegen_pure::Codegen::new()
.out_dir("src/proto")
.inputs(&["proto/rpc.proto"])
.inputs(["proto/rpc.proto"])
.include("proto")
.run()
.expect("Codegen failed.");

std::process::Command::new("gcc")
.args(&["test/piggie.c", "-o", "test/piggie"])
.args(["test/piggie.c", "-o", "test/piggie"])
.status()
.unwrap();
}
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ impl Criu {
)
})?;

let response: rpc::criu_resp = Message::parse_from_bytes(&buffer[..read as usize])
.context("parsing criu response failed")?;
let response: rpc::criu_resp =
Message::parse_from_bytes(&buffer[..read]).context("parsing criu response failed")?;

if !response.get_success() {
criu.unwrap()
Expand Down
Loading

0 comments on commit 87a5e0b

Please sign in to comment.