Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2023 13:05:30 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-main@FreeBSD.org
Subject:   git: d213429e42d4 - main - bhyve: exit with EX_OSERR if init checkpoint or restore time failed
Message-ID:  <202303061305.326D5UcL079493@gitrepo.freebsd.org>

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

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

commit d213429e42d48c7de56baf60befd5d953654d337
Author:     Vitaliy Gusev <gusev.vitaliy@gmail.com>
AuthorDate: 2023-03-06 12:30:54 +0000
Commit:     Corvin Köhne <corvink@FreeBSD.org>
CommitDate: 2023-03-06 13:04:16 +0000

    bhyve: exit with EX_OSERR if init checkpoint or restore time failed
    
    Reviewed by:            corvink, markj
    MFC after:              1 week
    Sponsored by:           vStack
    Differential Revision:  https://reviews.freebsd.org/D38872
---
 usr.sbin/bhyve/bhyverun.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index 2c1fee23cc13..0c4aef70b2a9 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -1579,12 +1579,13 @@ main(int argc, char *argv[])
 	/*
 	 * checkpointing thread for communication with bhyvectl
 	 */
-	if (init_checkpoint_thread(ctx) < 0)
-		printf("Failed to start checkpoint thread!\r\n");
+	if (init_checkpoint_thread(ctx) != 0)
+		errx(EX_OSERR, "Failed to start checkpoint thread");
 
 	if (restore_file != NULL) {
 		destroy_restore_state(&rstate);
-		vm_restore_time(ctx);
+		if (vm_restore_time(ctx) < 0)
+			err(EX_OSERR, "Unable to restore time");
 
 		for (int i = 0; i < guest_ncpus; i++) {
 			if (i == BSP)



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