[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: new xlu_disk_parse function
On Thu, 31 Mar 2011, Ian Jackson wrote: > > > +raw: { DSET(format,FORMAT,RAW); } > > > +qcow: { DSET(format,FORMAT,QCOW); } > > > +qcow2: { DSET(format,FORMAT,QCOW2); } > > > +vhd: { DSET(format,FORMAT,QCOW2); } > > > + > > > +phy: { DSET(format,FORMAT,RAW); DSET(backend,BACKEND,PHY); } > > > +file: { DSET(format,FORMAT,RAW); DSET(backend,BACKEND,TAP); } > > > +tapdisk:|tap2?: { DSET(backend,BACKEND,TAP); } > > > +aio: { } > > > +ioemu: { } > > > > This bit is quite nice though. We could probably just tidy up the > > existing parser using arrays of values and things rather than a lot of > > if/else statements though. > > I wanted to avoid parsing with pointer arithmetic, which is very easy > to write bugs in - particularly when new features are added. We'll just have to be careful. I certainly find easier to read (and therefore to debug and maintain) the current state machine than this patch. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |