On Sun, Dec 02, 2007 at 06:53:53PM +0000, Daniel P. Berrange wrote:
The QEMU driver has a number of handy APIs which I want to use from
the
storage driver:
- Read entire file in one go
- Check filename suffix
- Compare filename against name + suffix
- Check link destination
- Construct a filename from dir, name + suffix
- Recursively make a directory
This patch pulls all these methods out of the QEMU driver, gives them a
sensible name and adds them to the util.h file. No functional change, this
is a straight refactoring.
qemu_conf.c | 256 ++++------------------------------------------------------
qemu_conf.h | 1
qemu_driver.c | 6 -
util.c | 223 ++++++++++++++++++++++++++++++++++++++++++++++++++
util.h | 29 ++++++
5 files changed, 275 insertions(+), 240 deletions(-)
Looks fine to me, this is all what util.[ch] is about, +1
Daniel
--
Red Hat Virtualization group
http://redhat.com/virtualization/
Daniel Veillard | virtualization library
http://libvirt.org/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/