]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve/snapshot: use SOCK_DGRAM instead of SOCK_STREAM
authorRobert Wing <rew@FreeBSD.org>
Mon, 8 Mar 2021 00:23:29 +0000 (15:23 -0900)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 26 Jan 2023 18:46:01 +0000 (10:46 -0800)
commite96f9fa135a24befbc7ea611f38848d83bff9a4d
tree64cdfaed2a5eaa6366f9c3f23cb0136cd4adb9b3
parentbcf297e86e16232b2ebb9a7a09d776c09bc3435d
bhyve/snapshot: use SOCK_DGRAM instead of SOCK_STREAM

The save/restore feature uses a unix domain socket to send messages
from bhyvectl(8) to a bhyve(8) process. A datagram socket will suffice
for this.

An added benefit of using a datagram socket is simplified code. For
bhyve, the listen/accept calls are dropped; and for bhyvectl, the
connect() call is dropped.

EPRINTLN handles raw mode for bhyve(8), use it to print error messages.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D28983

(cherry picked from commit 38dfb0626fd35c64b2e2d5faae2c90e7981a3307)
usr.sbin/bhyve/snapshot.c
usr.sbin/bhyvectl/bhyvectl.c