bhyve: return EEXIST when adding a fwcfg item twice

Reviewed by:		rew
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D39338
This commit is contained in:
Corvin Köhne 2023-03-30 07:43:28 +02:00
parent 52c68e1625
commit e37edc91b6
No known key found for this signature in database
GPG Key ID: D854DA56315E026A

View File

@ -178,7 +178,7 @@ qemu_fwcfg_add_item(const uint16_t architecture, const uint16_t index,
if (fwcfg_item->data != NULL) {
warnx("%s: qemu fwcfg item exists (architecture %s index 0x%x)",
__func__, arch ? "specific" : "generic", idx);
return (-1);
return (EEXIST);
}
/* save data of the item */