Skip to content

Commit 37e7a30

Browse files
author
rohan2794
committed
chore: parse hostnqn from subsystem
Signed-off-by: rohan2794 <rohan2794@gmial.com>
1 parent dc1350f commit 37e7a30

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nvmeadm/src/nvmf_subsystem.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ pub struct Subsystem {
3030
pub serial: String,
3131
/// Model number.
3232
pub model: String,
33+
/// Host NVme Qualified Name (NQN).
34+
pub hostnqn: String,
3335
}
3436

3537
const TR_ADDR: &str = "traddr";
@@ -165,6 +167,7 @@ impl Subsystem {
165167
let address = parse_value::<String>(source, "address")?;
166168
let serial = parse_value::<String>(source, "serial")?;
167169
let model = parse_value::<String>(source, "model")?;
170+
let hostnqn = parse_value::<String>(source, "hostnqn")?;
168171

169172
if serial.is_empty() || model.is_empty() {
170173
return Err(NvmeError::CtlNotFound {
@@ -185,6 +188,7 @@ impl Subsystem {
185188
address: SubsystemAddr(address),
186189
serial,
187190
model,
191+
hostnqn,
188192
})
189193
}
190194
/// Synchronize in-memory state of this subsystem with system's state.

0 commit comments

Comments
 (0)