Commit Graph
6 Commits
Author SHA1 Message Date
Ian Campbell cf38606aad libxl: regenerate libxlu cfg parser after 9e14c516b6
Fixup whitespace alignment while I'm there.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2013-04-12 08:55:18 +01:00
Choonho Son 9e14c516b6 xl: fix xl config parser
Bug: xl lexical analyzer cannot parse keyword which has .(dot) character like vif.default.script

ref: 733b9c524d
Error log: /etc/xen/xl.conf:28: config parsing error near `.default.script="vif-bridge"': lexical error

Signed-off-by: Choonho Son <choonho.son@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Roger Pau Monne <roger.pau@citrix.com>
2013-04-11 13:17:20 +01:00
Ian Jackson d32e1379d6 libxl: add missing copyright notices to some files
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2011-06-02 18:46:31 +01:00
Ian Jackson 54fbaf446b libxl: config parser: print warning for apparent arbitrary python
The characters - + . ( ) : are not legal in xl config files but are
valid Python and use of at least one of them is almost essential for
writing arbitrary Python in the config file.

So if we see one of these during lexing, note it, and then after the
parse is complete if it failed we print a special extra warning.

Currently this warning refers to the nonexistent wiki page
  http://wiki.xen.org/xenwiki/PythonInXlConfig
which will have to be written (and/or given a better name) before the
actual 4.1 release.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-01-11 19:31:41 +00:00
Ian Jackson 8188bc8a37 tools/libxl: compile with -Wmissing-declarations
Since the recent build error caused by mismatch of symbol types due to
missing declarations, build libxl with -Wmissing-declarations.

The patch is mostly straightforward, a one liner in the makefile enables
the flag, a lot of functions in xl_cmdimpl.c needed to be made static
and libxl_paths.c needed to include libxl.h.

The one wart on the patch-set is that flex has a bug where it emits code
with missing declarations for yy(set|get)_column.  This can be worked
around by providing the declarations ourselves regardless.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-17 17:20:53 +01:00
Keir Fraser b104c3762d Replace config file parser for "xl"
This provides a replacement config file parser for "xl" based on bison
and flex.

Benefits:
  * proper error reporting with line numbers
  * parser can understand nearly all "xm" configuration files directly
     (doesn't understand Python code but should do everything else)
  * parser also understands the ;-infested "xl" style files
  * removes the dependency on libconfig
  * better checking for certain kinds of mistakes
  * eliminates the strange "massage file and try again" code

This is intended to support all config files currently supported by
"xl" and almost all files supported by "xm".  (NB that whether a
feature works depends on the implementation of that feature in
xl/libxl of course.)

This patch also introduces a new library "libxlutil" which is mainly
for the benefit of "xl".  Users of libxl do not need to use libxlutil,
but they can do so if they want to parse "xl" files without being
"xl".

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
2010-03-03 17:39:22 +00:00