Page MenuHomeFreeBSD

bhyve: Cast away const when fetching a config nvlist
ClosedPublic

Authored by markj on Nov 6 2022, 7:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 20, 9:09 AM
Unknown Object (File)
Wed, May 7, 10:52 AM
Unknown Object (File)
Sat, May 3, 5:11 PM
Unknown Object (File)
Mon, Apr 28, 2:33 AM
Unknown Object (File)
Sun, Apr 27, 12:46 PM
Unknown Object (File)
Apr 12 2025, 10:47 AM
Unknown Object (File)
Feb 19 2025, 5:43 AM
Unknown Object (File)
Jan 26 2025, 5:58 PM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable