As QEMU driver, test driver does not accept slashes inside domain names.
This commit fixes this problem checking slashes inside the new name when
'domrename' is executed.
Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
virCheckFlags(0, -1);
+ if (strchr(new_name, '/')) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("name %s cannot contain '/'"), new_name);
+ return -1;
+ }
+
if (VIR_STRDUP(new_dom_name, new_name) < 0)
goto cleanup;