HomeFreeBSD

bhyve: Cast away const when fetching a config nvlist

Description

bhyve: Cast away const when fetching a config nvlist

Silence a warning from the compiler about "const" being discarded. The
warning is correct: nvlist values are supposed to be immutable.
However, fixing this properly will require some contortions on behalf of
consumers who look up a subtree of the config and modify it. Per a
discussion on freebsd-virtualization@, the solution will probably be to
outright replace the use of nvlists for VM configuration, but until that
happens let's document the problem and silence the warning.

No functional change intended.

MFC after: 2 weeks
Reviewed by: corvink, jhb
Differential Revision: https://reviews.freebsd.org/D37293

(cherry picked from commit 719e307f80c724a39814557e35ac890c75dcd402)

Details

Provenance
markjAuthored on Nov 11 2022, 3:02 PM
Reviewer
corvink
Differential Revision
D37293: bhyve: Cast away const when fetching a config nvlist
Parents
rG37b52f666115: bhyve: Drop volatile qualifiers from virtio rings
Branches
Unknown
Tags
Unknown