]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Allow leading dots in VMX config entry names
authorMatthias Bolte <matthias.bolte@googlemail.com>
Mon, 27 Jul 2009 12:21:17 +0000 (14:21 +0200)
committerDaniel Veillard <veillard@redhat.com>
Mon, 27 Jul 2009 12:21:17 +0000 (14:21 +0200)
* src/conf.c: the virConfParser must accept leading dot when in VMX mode

src/conf.c

index c51531e51cabba1a8be787f60a97191c4b7a1ff1..2aa4a55f8ca967d94a76e0c9d3f338353af3b8fb 100644 (file)
@@ -534,7 +534,8 @@ virConfParseName(virConfParserCtxtPtr ctxt)
     SKIP_BLANKS;
     base = ctxt->cur;
     /* TODO: probably need encoding support and UTF-8 parsing ! */
-    if (!c_isalpha(CUR)) {
+    if (!c_isalpha(CUR) &&
+        !((ctxt->conf->flags & VIR_CONF_FLAG_VMX_FORMAT) && (CUR == '.'))) {
         virConfError(ctxt, VIR_ERR_CONF_SYNTAX, _("expecting a name"));
         return(NULL);
     }