]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: Cast away const when fetching a config nvlist
authorMark Johnston <markj@FreeBSD.org>
Fri, 11 Nov 2022 15:02:42 +0000 (10:02 -0500)
committerMark Johnston <markj@FreeBSD.org>
Fri, 11 Nov 2022 15:02:42 +0000 (10:02 -0500)
commit719e307f80c724a39814557e35ac890c75dcd402
tree2982a2d295a019916c1a71734783af6b4883a00d
parent8b1adff8bcbdf0e58878431c6ed5a14553178d4d
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
usr.sbin/bhyve/config.c