[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Introduce <driver> under <filesystem> to support open-by-handle.



On Mon, Oct 10, 2011 at 05:16:32PM +0530, Harsh Bora wrote:
> On 10/10/2011 03:47 PM, Daniel P. Berrange wrote:
> >
> >We can use an enum for this too. eg
> >
> >    VIR_ENUM_DECL(qemuFSDriverName);
> >    VIR_ENUM_IMPL(qemuFSDriverName, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
> >                  "local", "handle");
> >
> >     virBufferAddLit(&opt, qemuFSDriverNameTypeToString(fs->fsdriver));
> >
> 
> I tried that, but it gives a compiler err because both are macros
> and not functions. I shall post v2 with rest of the changes now.

The VIR_ENUM bits should be in global scope, not inside the function.
Traditionally we put them right at the top of the file, after any
#includes and typedefs/structs.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]