Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2023 06:09:55 GMT
From:      =?utf-8?Q?Corvin=20K=C3=B6hne?= <corvink@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e6bb702fce3f - stable/13 - bhyve: return EEXIST when adding a fwcfg item twice
Message-ID:  <202304060609.33669tuU030552@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by corvink:

URL: https://cgit.FreeBSD.org/src/commit/?id=e6bb702fce3feb41a0f30ac9c09e30b70ad850c2

commit e6bb702fce3feb41a0f30ac9c09e30b70ad850c2
Author:     Corvin Köhne <corvink@FreeBSD.org>
AuthorDate: 2023-03-30 05:43:28 +0000
Commit:     Corvin Köhne <corvink@FreeBSD.org>
CommitDate: 2023-04-06 06:06:23 +0000

    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
    
    (cherry picked from commit e37edc91b6a0a0116005bdd0fff7c911c37adabf)
---
 usr.sbin/bhyve/qemu_fwcfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/bhyve/qemu_fwcfg.c b/usr.sbin/bhyve/qemu_fwcfg.c
index 1b0b5e3e9931..bb86d0371985 100644
--- a/usr.sbin/bhyve/qemu_fwcfg.c
+++ b/usr.sbin/bhyve/qemu_fwcfg.c
@@ -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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304060609.33669tuU030552>