On Tue, Sep 01, 2009 at 02:58:12PM -0400, Miloslav Trmac wrote:
----- "Daniel P. Berrange" <berrange(a)redhat.com>
wrote:
> > > I reckon this snippet of code could usefully be put into the util.h file
> > > as virFileGenerateRandomkey(), or alternatively perhaps secret_conf.h,
> > > as virSecretGenerateRandomKey(unsigned char *buf, size_t buflen);
> > This code, with its limitation to ASCII characters, is
> qcow/qemu-specific.
>
> Ok, lets leave it in the QEMU driver file then
AFAICS the qemu and storage drivers can be built as modules, this would
create a dependency. I'll just split the code into a separate function
for now.
Yes, you can't introduce dependancies between individual drivers. You
could move it out into the storage_encryption_conf.c/.h file, rather
that util.c. That would make it clearer that its just for the qcow
encryption case
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|