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
F137825746: D37293.diff
Wed, Nov 26, 4:38 AM
Unknown Object (File)
Sat, Nov 22, 12:26 PM
Unknown Object (File)
Sun, Nov 2, 7:42 AM
Unknown Object (File)
Sun, Nov 2, 7:36 AM
Unknown Object (File)
Sun, Nov 2, 7:33 AM
Unknown Object (File)
Fri, Oct 31, 9:45 PM
Unknown Object (File)
Tue, Oct 28, 8:33 AM
Unknown Object (File)
Oct 27 2025, 3:40 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48197
Build 45084: arc lint + arc unit