From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhigang Wang Subject: Support upper case identifier in vm.cfg for xl? Date: Fri, 13 Jun 2014 16:11:12 -0400 Message-ID: <539B5AE0.6050500@oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070200090608030703040706" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------070200090608030703040706 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------070200090608030703040706 Content-Type: text/x-patch; name="xen-tools-xl-vm-cfg-upper-ident.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-tools-xl-vm-cfg-upper-ident.patch" commit d347511769289703e534a999c75badb5cc93b3eb Author: Zhigang Wang Date: Fri Jun 13 16:06:10 2014 -0400 tools/xl: support upper case letters as vm.cfg identifiers Signed-off-by: Zhigang Wang 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); } --------------070200090608030703040706 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------070200090608030703040706--