Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places.
This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling inspect: switch to version struct for os major/minor version src/Makefile.am | 1 + src/guestfs-internal.h | 22 ++++- src/inspect-fs-cd.c | 32 +++---- src/inspect-fs-unix.c | 220 +++++++++++++++++------------------------------ src/inspect-fs-windows.c | 20 ++--- src/inspect-fs.c | 33 ++----- src/inspect-icon.c | 8 +- src/inspect.c | 9 +- src/launch-direct.c | 28 +++--- src/launch-libvirt.c | 43 +++++---- src/version.c | 145 +++++++++++++++++++++++++++++++ 11 files changed, 313 insertions(+), 248 deletions(-) create mode 100644 src/version.c -- 2.5.5 _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
