HomeFreeBSD

bhyvectl: reduce code duplication

Description

bhyvectl: reduce code duplication

Combine send_start_checkpoint() and send_start_suspend() into a
single function named snapshot_request().

snapshot_request() is equivalent to send_start_checkpoint() and
send_start_suspend() except that it takes an additional argument. The
additional argument, enum ipc_opcode, is used to determine the type of
snapshot request being performed. Also, switch to using strlcpy instead
of strncpy.

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

Details

Provenance
rewAuthored on Feb 27 2021, 9:05 PM
Reviewer
jhb
Differential Revision
D28878: bhyvectl: reduce code duplication
Parents
rGb7fd9c4e5ebc: bhyve/snapshot: rename checkpoint_opcodes to be more generic
Branches
Unknown
Tags
Unknown