git: 894674da1400 - stable/15 - bhyve: change suspend exit code
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 04 Jan 2026 09:21:06 UTC
The branch stable/15 has been updated by novel:
URL: https://cgit.FreeBSD.org/src/commit/?id=894674da14002bfaffeb47482bf85c49b575d2ee
commit 894674da14002bfaffeb47482bf85c49b575d2ee
Author: Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2025-12-05 17:16:29 +0000
Commit: Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2026-01-04 05:15:25 +0000
bhyve: change suspend exit code
Currently, after suspending, bhyve(8) exits with 0. This code is
also used to indicate that a VM was rebooted. To differentiate
reboot and suspend, use the next available exit code, 5, for suspend.
Approved by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D54087
(cherry picked from commit 611bbb190ff593e0e424e311575d7e978e623659)
---
usr.sbin/bhyve/bhyve.8 | 4 +++-
usr.sbin/bhyve/snapshot.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index 1d81280b8f75..811b19149f9a 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 26, 2025
+.Dd December 30, 2025
.Dt BHYVE 8
.Os
.Sh NAME
@@ -1152,6 +1152,8 @@ halted
triple fault (amd64 only)
.It 4
exited due to an error
+.It 5
+suspended
.El
.Sh EXAMPLES
If not using a boot ROM, the guest operating system must have been loaded with
diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c
index 997faa254284..eabe6ab47f80 100644
--- a/usr.sbin/bhyve/snapshot.c
+++ b/usr.sbin/bhyve/snapshot.c
@@ -1308,7 +1308,7 @@ vm_checkpoint(struct vmctx *ctx, int fddir, const char *checkpoint_file,
if (stop_vm) {
vm_destroy(ctx);
- exit(0);
+ exit(5);
}
done: