]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: accessors for common source information
authorEric Blake <eblake@redhat.com>
Mon, 17 Mar 2014 17:39:57 +0000 (11:39 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 24 Mar 2014 17:59:49 +0000 (11:59 -0600)
commit1014c34e3c03c658ab2c16d1be336278ca0fae52
tree129721d0c9301f6ef146643f163b0f6265614811
parente7b0e71d92bea36064a927f9c9a3af07fbd26f17
conf: accessors for common source information

A future patch will split virDomainDiskDef, in order to track
multiple host resources per guest <disk>.  To reduce the size
of that patch, I've factored out the four most common accesses
into functions, so that I can incrementally upgrade the code
base to use the accessors, and so that code that doesn't care
about the distinction of per-file details won't have to be
changed when the struct changes.

* src/conf/domain_conf.h (virDomainDiskGetType)
(virDomainDiskSetType, virDomainDiskGetSource)
(virDomainDiskSetSource, virDomainDiskGetDriver)
(virDomainDiskSetDriver, virDomainDiskGetFormat)
(virDomainDiskSetFormat): New prototypes.
* src/conf/domain_conf.c (virDomainDiskGetType)
(virDomainDiskSetType, virDomainDiskGetSource)
(virDomainDiskSetSource, virDomainDiskGetDriver)
(virDomainDiskSetDriver, virDomainDiskGetFormat)
(virDomainDiskSetFormat): Implement them.
* src/libvirt_private.syms (domain_conf.h): Export them.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms