|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] libxl: support for using 'MmGg' as memory size suffix
On Wed, Sep 25, 2013 at 02:36:04PM +0100, Ian Campbell wrote:
> On Sat, 2013-09-21 at 16:51 +0100, Wei Liu wrote:
> > diff --git a/tools/libxl/libxlu_cfg_l.l b/tools/libxl/libxlu_cfg_l.l
> > index e0ea8cf..0b1f299 100644
> > --- a/tools/libxl/libxlu_cfg_l.l
> > +++ b/tools/libxl/libxlu_cfg_l.l
>
> This will need Ian J's review when he gets back.
>
> > @@ -60,6 +60,10 @@ void xlu__cfg_yyset_column(int column_no, yyscan_t
> > yyscanner);
> > yylval->string= xlu__cfgl_strdup(ctx,yytext);
> > GOT(NUMBER);
> > }
> > +[0-9][0-9a-fx]*[MmGg] {
>
> You copied this from above but "[0-9][0-9a-fx]*" looks odd to me. I
> think it is intended to accept decimals and hex 0xNNN but it actually
> ends up accepting 1111xxxxx99999ddddd and nonsensical things like that,
> doesn't it?
>
I had the same impression. However strtol() accepts up to base 36 which
makes 1111xxxxx99999dddd sensible...
> I suppose we will reject such things later.
>
> > + yylval->string= xlu__cfgl_strdup(ctx,yytext);
> > + GOT(STRING);
>
> This sort of subtle semantic change GOT(NUMBER)=>(STRING) is what needs
> Ian's thoughts...
>
Right. I haven't figure out what's the best way to handle this.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |