summaryrefslogtreecommitdiffstats
path: root/src/guestfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/guestfs.c')
-rw-r--r--src/guestfs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/guestfs.c b/src/guestfs.c
index 7ab72006..f445adab 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -697,6 +697,19 @@ guestfs_get_pid (guestfs_h *g)
}
}
+struct guestfs_version *
+guestfs_version (guestfs_h *g)
+{
+ struct guestfs_version *r;
+
+ r = safe_malloc (g, sizeof *r);
+ r->major = PACKAGE_VERSION_MAJOR;
+ r->minor = PACKAGE_VERSION_MINOR;
+ r->release = PACKAGE_VERSION_RELEASE;
+ r->extra = safe_strdup (g, PACKAGE_VERSION_EXTRA);
+ return r;
+}
+
/* Add a string to the current command line. */
static void
incr_cmdline_size (guestfs_h *g)