mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 08:05:16 +00:00
virQEMUBuildNetdevCommandlineFromJSON: Remove unused formatter
Now that everything was replaced by the new code we can remove this function. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
63a833038f
commit
2464e5523c
@ -3120,7 +3120,6 @@ virQEMUBuildCommandLineJSONArrayBitmap;
|
|||||||
virQEMUBuildCommandLineJSONArrayNumbered;
|
virQEMUBuildCommandLineJSONArrayNumbered;
|
||||||
virQEMUBuildCommandLineJSONArrayObjectsStr;
|
virQEMUBuildCommandLineJSONArrayObjectsStr;
|
||||||
virQEMUBuildDriveCommandlineFromJSON;
|
virQEMUBuildDriveCommandlineFromJSON;
|
||||||
virQEMUBuildNetdevCommandlineFromJSON;
|
|
||||||
|
|
||||||
|
|
||||||
# util/virrandom.h
|
# util/virrandom.h
|
||||||
|
@ -283,36 +283,6 @@ virQEMUBuildCommandLineJSON(virJSONValue *value,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* virQEMUBuildNetdevCommandlineFromJSON:
|
|
||||||
* @props: JSON properties describing a netdev
|
|
||||||
* @rawjson: don't transform to commandline args, but just stringify json
|
|
||||||
*
|
|
||||||
* Converts @props into arguments for -netdev including all the quirks and
|
|
||||||
* differences between the monitor and command line syntax.
|
|
||||||
*
|
|
||||||
* @rawjson is meant for testing of the schema in the xml2argvtest
|
|
||||||
*/
|
|
||||||
char *
|
|
||||||
virQEMUBuildNetdevCommandlineFromJSON(virJSONValue *props,
|
|
||||||
bool rawjson)
|
|
||||||
{
|
|
||||||
const char *type = virJSONValueObjectGetString(props, "type");
|
|
||||||
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
|
||||||
|
|
||||||
if (rawjson)
|
|
||||||
return virJSONValueToString(props, false);
|
|
||||||
|
|
||||||
virBufferAsprintf(&buf, "%s,", type);
|
|
||||||
|
|
||||||
if (virQEMUBuildCommandLineJSON(props, &buf, "type",
|
|
||||||
virQEMUBuildCommandLineJSONArrayObjectsStr) < 0)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
virQEMUBuildDriveCommandlineFromJSON(virJSONValue *srcdef)
|
virQEMUBuildDriveCommandlineFromJSON(virJSONValue *srcdef)
|
||||||
{
|
{
|
||||||
|
@ -48,10 +48,6 @@ int virQEMUBuildCommandLineJSON(virJSONValue *value,
|
|||||||
const char *skipKey,
|
const char *skipKey,
|
||||||
virQEMUBuildCommandLineJSONArrayFormatFunc array);
|
virQEMUBuildCommandLineJSONArrayFormatFunc array);
|
||||||
|
|
||||||
char *
|
|
||||||
virQEMUBuildNetdevCommandlineFromJSON(virJSONValue *props,
|
|
||||||
bool rawjson);
|
|
||||||
|
|
||||||
char *virQEMUBuildDriveCommandlineFromJSON(virJSONValue *src);
|
char *virQEMUBuildDriveCommandlineFromJSON(virJSONValue *src);
|
||||||
|
|
||||||
void virQEMUBuildBufferEscapeComma(virBuffer *buf, const char *str);
|
void virQEMUBuildBufferEscapeComma(virBuffer *buf, const char *str);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user