Skip to content

Commit

Permalink
fix env chdir in justfile
Browse files Browse the repository at this point in the history
in justfile we have several `env chdir` but they should be
`env --chdir`. this is the fix. also it fixes some lint errors
in stage0_bin_tdx

Change-Id: I8feede137f6776ee3e5cda493b6d75b902c9abdb
  • Loading branch information
dingelish committed Aug 8, 2024
1 parent 743f142 commit 9f47f6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -319,22 +319,22 @@ cargo-clippy:
#!/bin/sh
for workspace in $({{CARGO_WORKSPACE_LIST_CMD}})
do
env chdir=$workspace cargo clippy --all-features --all-targets --no-deps -- --deny=warnings
env --chdir=$(dirname "$workspace") cargo clippy --all-features --all-targets --no-deps -- --deny=warnings
done


cargo-deny:
#!/bin/sh
for workspace in $({{CARGO_WORKSPACE_LIST_CMD}})
do
env chdir=$workspace cargo deny check
env --chdir=$(dirname "$workspace") cargo deny check
done

cargo-udeps:
#!/bin/sh
for workspace in $({{CARGO_WORKSPACE_LIST_CMD}})
do
env chdir=$workspace cargo udeps --all-targets --backend=depinfo --workspace
env --chdir=$(dirname "$workspace") cargo udeps --all-targets --backend=depinfo --workspace
done


Expand Down
8 changes: 4 additions & 4 deletions stage0_bin_tdx/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod asm;
#[no_mangle]
static mut TEST_DATA: u32 = 0;

static HELLO_OAK: &'static str = "Hello from stage0_bin_tdx!";
static HELLO_OAK: &str = "Hello from stage0_bin_tdx!";

fn write_u8_to_serial(c: u8) {
// wait_for_empty_output
Expand All @@ -39,14 +39,14 @@ fn write_u8_to_serial(c: u8) {
break;
}
}
io_write_u8(0x3f8, c as u8).unwrap();
io_write_u8(0x3f8, c).unwrap();
}

fn write_single_hex(c: u8) {
if c < 0xa {
write_u8_to_serial(c + ('0' as u8));
write_u8_to_serial(c + (b'0'));
} else {
write_u8_to_serial(c - 10 + ('a' as u8));
write_u8_to_serial(c - 10 + (b'a'));
}
}

Expand Down

0 comments on commit 9f47f6b

Please sign in to comment.