Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163329767
D58213.id181907.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58213.id181907.diff
View Options
diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -3167,6 +3167,7 @@
char bident[sizeof("XXX:XXX")];
const char *value;
uint32_t sectsz;
+ int val;
sc->max_queues = NVME_QUEUES;
sc->max_qentries = NVME_MAX_QENTRIES;
@@ -3183,20 +3184,21 @@
sc->max_queues = atoi(value);
value = get_config_value_node(nvl, "qsz");
if (value != NULL) {
- sc->max_qentries = atoi(value);
- if (sc->max_qentries <= 0) {
- EPRINTLN("nvme: Invalid qsz option %d",
- sc->max_qentries);
+ val = atoi(value);
+ if (val <= 0) {
+ EPRINTLN("nvme: Invalid qsz option %d", val);
return (-1);
}
+ sc->max_qentries = val;
}
value = get_config_value_node(nvl, "ioslots");
if (value != NULL) {
- sc->ioslots = atoi(value);
- if (sc->ioslots <= 0) {
- EPRINTLN("Invalid ioslots option %d", sc->ioslots);
+ val = atoi(value);
+ if (val <= 0) {
+ EPRINTLN("Invalid ioslots option %d", val);
return (-1);
}
+ sc->ioslots = val;
}
value = get_config_value_node(nvl, "sectsz");
if (value != NULL)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 23, 4:20 AM (19 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35067169
Default Alt Text
D58213.id181907.diff (1 KB)
Attached To
Mode
D58213: bhyve: unsigned <= 0
Attached
Detach File
Event Timeline
Log In to Comment