From: Zhigang Wang <zhigang.x.wang@oracle.com>
To: xen-devel <xen-devel@lists.xen.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Support upper case identifier in vm.cfg for xl?
Date: Fri, 13 Jun 2014 16:11:12 -0400 [thread overview]
Message-ID: <539B5AE0.6050500@oracle.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
Hi,
It seems we only support `[a-z][._0-9a-z]*` as identifiers in vm.cfg for xl
and upper case letter is not supported. This is different from xm.
An use case is: management tools may put arbitrary key/value pairs into vm.cfg.
Current xl has limited support of this feature: xl will ignore unknown options.
I wonder whether we can make xl support uppercase letters? Then management
tools don't need to change if they already use upper letter identifiers.
Attached patch is a quick fix and seems working for me. Please help to comment on:
1. Was there a specific reason not to support upper cases?
(I know it's simple and if there's no xm, this design is the best.)
2. If we support upper case letters, will it affect other components?
2. Is this patch correct?
3. If we want this patch, someone (Ian J.?) also need to generate the in tree
libxlu_cfg_i.h and libxlu_cfg_l.c.
Thanks,
Zhigang
[-- Attachment #2: xen-tools-xl-vm-cfg-upper-ident.patch --]
[-- Type: text/x-patch, Size: 714 bytes --]
commit d347511769289703e534a999c75badb5cc93b3eb
Author: Zhigang Wang <zhigang.x.wang@oracle.com>
Date: Fri Jun 13 16:06:10 2014 -0400
tools/xl: support upper case letters as vm.cfg identifiers
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
diff --git a/tools/libxl/libxlu_cfg_l.l b/tools/libxl/libxlu_cfg_l.l
index e0ea8cf..b03f0f1 100644
--- a/tools/libxl/libxlu_cfg_l.l
+++ b/tools/libxl/libxlu_cfg_l.l
@@ -52,7 +52,7 @@ void xlu__cfg_yyset_column(int column_no, yyscan_t yyscanner);
%%
-[a-z][._0-9a-z]* {
+[a-zA-Z][._0-9a-zA-Z]* {
yylval->string= xlu__cfgl_strdup(ctx,yytext);
GOT(IDENT);
}
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2014-06-13 20:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 20:11 Zhigang Wang [this message]
2014-06-16 9:18 ` Support upper case identifier in vm.cfg for xl? Ian Campbell
2014-06-16 13:17 ` Zhigang Wang
2014-06-18 9:43 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=539B5AE0.6050500@oracle.com \
--to=zhigang.x.wang@oracle.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.