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>
virURIFormatParams;
virURIFree;
virURIGetParam;
+virURIParamsSetIgnore;
virURIParse;
virURIResolveAlias;
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;
+ }
+ }
+}
bool virURICheckUnixSocket(virURI *uri);
+void virURIParamsSetIgnore(virURI *uri, bool ignore, const char *names[]);
+
#define VIR_URI_SERVER(uri) ((uri) && (uri)->server ? (uri)->server : "localhost")