mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/block/nvme: fix the nsid 'invalid' value
The `nvme_nsid()` function returns '-1' (FFFFFFFFh) when the given namespace is NULL. Since FFFFFFFFh is actually a valid namespace identifier (the "broadcast" value), change this to be '0' since that actually *is* the invalid value. Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Gollu Appalanaidu <anaidu.gollu@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
349bf41d59
commit
dae8be368e
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ static inline uint32_t nvme_nsid(NvmeNamespace *ns)
|
||||||
return ns->params.nsid;
|
return ns->params.nsid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool nvme_ns_shared(NvmeNamespace *ns)
|
static inline bool nvme_ns_shared(NvmeNamespace *ns)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue