Skip to content

Commit 15d9c4d

Browse files
committed
Cargo: Consume nvme-mi-dev as a regular crate
To do so, adjust implementation and dependencies to meet the needs of nvme-mi-dev v0.1.0. Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
1 parent 9ff823a commit 15d9c4d

3 files changed

Lines changed: 66 additions & 27 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ embedded-io-async = { version = "0.6" }
2323
futures = "0.3.31"
2424
futures-io = "0.3.30"
2525
hex = { version = "0.4.3", optional = true }
26-
log = "0.4.22"
26+
log = "0.4.28"
2727
mctp = "0.2.0"
2828
mctp-estack = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "77da3b1c4d35b7c9ba37747da968d29fc4cde696", package = "mctp-estack" }
29-
nvme-mi-dev = { git = "https://github.com/CodeConstruct/nvme-mi-dev", branch = "main", optional = true }
29+
nvme-mi-dev = { version = "0.1.0", optional = true }
3030
polling = "3.7.4"
3131
pldm = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "77da3b1c4d35b7c9ba37747da968d29fc4cde696", package = "pldm", optional = true }
3232
pldm-file = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "77da3b1c4d35b7c9ba37747da968d29fc4cde696", package = "pldm-file", optional = true }

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ async fn nvme_mi(router: &Router<'_>) -> std::io::Result<()> {
237237
Ok(())
238238
}
239239
nvme_mi_dev::CommandEffect::SetSmbusFreq { port_id: _, freq } => {
240-
use nvme_mi_dev::nvme::mi::SmbusFrequency;
240+
use nvme_mi_dev::smbus::BusFrequency;
241241

242-
if freq != SmbusFrequency::Freq100Khz {
242+
if freq != BusFrequency::Freq100Khz {
243243
warn!("NVMe-MI: Application lacks support for I2C bus frequency {:?}", freq);
244244
return Err(CommandEffectError::Unsupported);
245245
}

0 commit comments

Comments
 (0)