mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
viruri: Introduce virURIParamsSetIgnore()
The aim of this helper is to manipulate the .ignore value for given list of parameters. For instance: virURIParamsSetIgnore(uri, false, {"mode", "socket", NULL}); Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
c71c159248
commit
cdb1aa996a
@ -3560,6 +3560,7 @@ virURIFormat;
|
|||||||
virURIFormatParams;
|
virURIFormatParams;
|
||||||
virURIFree;
|
virURIFree;
|
||||||
virURIGetParam;
|
virURIGetParam;
|
||||||
|
virURIParamsSetIgnore;
|
||||||
virURIParse;
|
virURIParse;
|
||||||
virURIResolveAlias;
|
virURIResolveAlias;
|
||||||
|
|
||||||
|
@ -422,3 +422,21 @@ virURICheckUnixSocket(virURI *uri)
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
virURIParamsSetIgnore(virURI *uri,
|
||||||
|
bool ignore,
|
||||||
|
const char *names[])
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < uri->paramsCount; i++) {
|
||||||
|
size_t j;
|
||||||
|
|
||||||
|
for (j = 0; names[j]; j++) {
|
||||||
|
if (STRCASEEQ(uri->params[i].name, names[j]))
|
||||||
|
uri->params[i].ignore = ignore;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -61,4 +61,6 @@ const char *virURIGetParam(virURI *uri, const char *name);
|
|||||||
|
|
||||||
bool virURICheckUnixSocket(virURI *uri);
|
bool virURICheckUnixSocket(virURI *uri);
|
||||||
|
|
||||||
|
void virURIParamsSetIgnore(virURI *uri, bool ignore, const char *names[]);
|
||||||
|
|
||||||
#define VIR_URI_SERVER(uri) ((uri) && (uri)->server ? (uri)->server : "localhost")
|
#define VIR_URI_SERVER(uri) ((uri) && (uri)->server ? (uri)->server : "localhost")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user