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)
Wed, Apr 24, 12:09 PM
Unknown Object (File)
Wed, Apr 24, 12:09 PM
Unknown Object (File)
Wed, Apr 24, 12:09 PM
Unknown Object (File)
Sun, Apr 21, 8:11 PM
Unknown Object (File)
Thu, Apr 18, 5:56 AM
Unknown Object (File)
Wed, Apr 17, 7:21 PM
Unknown Object (File)
Wed, Apr 17, 2:24 PM
Unknown Object (File)
Tue, Apr 16, 7:23 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