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)
Sun, Jan 26, 5:58 PM
Unknown Object (File)
Dec 14 2024, 7:31 PM
Unknown Object (File)
Dec 5 2024, 6:22 PM
Unknown Object (File)
Nov 15 2024, 11:44 PM
Unknown Object (File)
Nov 15 2024, 9:05 PM
Unknown Object (File)
Oct 21 2024, 5:20 PM
Unknown Object (File)
Sep 17 2024, 11:31 PM
Unknown Object (File)
Sep 17 2024, 8:16 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