<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 4, 2015 at 9:00 PM, Jim Fehlig <span dir="ltr"><<a href="mailto:jfehlig@suse.com" target="_blank">jfehlig@suse.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Michal Privoznik wrote:<br>
> On 16.12.2014 05:30, Jim Fehlig wrote:<br>
</span><div><div class="h5">>> diff --git a/src/xenconfig/xen_xl_disk.l b/src/xenconfig/xen_xl_disk.l<br>
>> new file mode 100644<br>
>> index 0000000..164aa32<br>
>> --- /dev/null<br>
>> +++ b/src/xenconfig/xen_xl_disk.l<br>
>> @@ -0,0 +1,256 @@<br>
>> +/*<br>
>> + * xen_xl_disk.l - parser for disk specification strings<br>
>> + *<br>
>> + * Copyright (C) 2011      Citrix Ltd.<br>
>> + * Author Ian Jackson <<a href="mailto:ian.jackson@eu.citrix.com">ian.jackson@eu.citrix.com</a>><br>
>> + *<br>
>> + * This program is free software; you can redistribute it and/or modify<br>
>> + * it under the terms of the GNU Lesser General Public License as published<br>
>> + * by the Free Software Foundation; version 2.1 only. with the special<br>
>> + * exception on linking described in file LICENSE.<br>
>> + *<br>
>> + * This program is distributed in the hope that it will be useful,<br>
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
>> + * GNU Lesser General Public License for more details.<br>
>> + */<br>
>> +<br>
>> +/*<br>
>> + * Parsing the old xm/xend/xl-4.1 disk specs is a tricky problem,<br>
>> + * because the target string might in theory contain "," which is the<br>
>> + * delimiter we use for stripping off things on the RHS, and ":",<br>
>> + * which is the delimiter we use for stripping off things on the LHS.<br>
>> + *<br>
>> + * In this parser we do not support such target strings in the old<br>
>> + * syntax; if the target string has to contain "," or ":" the new<br>
>> + * syntax's "target=" should be used.<br>
>> + */<br>
>> +%{<br>
>> +# include <config.h><br>
>> +<br>
>> +# include <stdio.h><br>
>> +<br>
>> +# include "viralloc.h"<br>
>> +# include "virstoragefile.h"<br>
>><br>
><br>
> With this, you need to -I$(LIBXML_CFLAGS), otherwise you'll get an compile error:<br>
><br>
>   CC       xenconfig/libvirt_xenxldiskparser_la-xen_xl_disk.lo<br>
> In file included from ../src/util/virstoragefile.h:29:0,<br>
>                  from xenconfig/xen_xl_disk.l:34:<br>
> ../src/util/virstorageencryption.h:30:26: fatal error: libxml/tree.h: No such file or directory<br>
>  # include <libxml/tree.h><br>
>                           ^<br>
><br>
> However, that alone is not enough:<br>
> make[3]: Entering directory '/home/zippy/work/libvirt/libvirt.git/src'<br>
>   CC       xenconfig/libvirt_xenxldiskparser_la-xen_xl_disk.lo<br>
> xenconfig/xen_xl_disk.c: In function 'yy_fatal_error':<br>
> xenconfig/xen_xl_disk.c:2143:58: error: unused parameter 'yyscanner' [-Werror=unused-parameter]<br>
>  static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)<br>
>                                                           ^<br>
> xenconfig/xen_xl_disk.c: In function 'xl_disk_alloc':<br>
> xenconfig/xen_xl_disk.c:2471:49: error: unused parameter 'yyscanner' [-Werror=unused-parameter]<br>
>  void *xl_disk_alloc (yy_size_t  size , yyscan_t yyscanner)<br>
>                                                  ^<br>
> xenconfig/xen_xl_disk.c: In function 'xl_disk_realloc':<br>
> xenconfig/xen_xl_disk.c:2476:64: error: unused parameter 'yyscanner' [-Werror=unused-parameter]<br>
>  void *xl_disk_realloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)<br>
>                                                                 ^<br>
> xenconfig/xen_xl_disk.c: In function 'xl_disk_free':<br>
> xenconfig/xen_xl_disk.c:2488:42: error: unused parameter 'yyscanner' [-Werror=unused-parameter]<br>
>  void xl_disk_free (void * ptr , yyscan_t yyscanner)<br>
>                                           ^<br>
> cc1: all warnings being treated as errors<br>
><br>
<br>
</div></div>Odd that I didn't see these errors in my test builds...<br>
<span class=""><br>
> So we are aiming at this diff:<br>
><br>
> diff --git a/src/Makefile.am b/src/Makefile.am<br>
> index 3eb9a18..8ccc273 100644<br>
> --- a/src/Makefile.am<br>
> +++ b/src/Makefile.am<br>
> @@ -1074,7 +1074,7 @@ if WITH_XENCONFIG<br>
>  # Add the generated object to its own library to control CFLAGS<br>
>  noinst_LTLIBRARIES += <a href="http://libvirt_xenxldiskparser.la" target="_blank">libvirt_xenxldiskparser.la</a><br>
>  libvirt_xenxldiskparser_la_CFLAGS = \<br>
> -               -I$(top_srcdir)/src/conf<br>
> +               -I$(top_srcdir)/src/conf $(AM_CFLAGS) -Wno-unused-parameter<br>
>  libvirt_xenxldiskparser_la_SOURCES = \<br>
>         $(XENXLDISKPARSER_SOURCES)<br>
><br>
><br>
> ACK with that squashed in.<br>
><br>
<br>
</span>I've added your change and pushed the series.  Thanks for the review!<br>
<br>
David, thank you for working on this, and your patience while we sorted<br>
out the flex/autotools integration :-).<br></blockquote><div><br></div><div>Well, that was close - close is fun :D </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Jim<br>
<br>
</blockquote></div><br></div></div>