summaryrefslogtreecommitdiffstats
path: root/src/guestfs.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-11-09 15:59:40 +0000
committerRichard W.M. Jones <rjones@redhat.com>2010-11-10 10:52:12 +0000
commita0b4caa0821b759de01361b7019c9c9c9607027d (patch)
tree7cfb0b243ddce5d19f518a8f040c28692907a0fa /src/guestfs.c
parentec63875f9cd7277cf2d49827684bba936add7ce2 (diff)
downloadlibguestfs-a0b4caa0821b759de01361b7019c9c9c9607027d.tar.gz
libguestfs-a0b4caa0821b759de01361b7019c9c9c9607027d.tar.xz
libguestfs-a0b4caa0821b759de01361b7019c9c9c9607027d.zip
lib: Make pcre, libmagic and hivex libraries optional.
This change makes these libraries optional. If they are not available at compile time then certain core API features will be disabled (see below). This also changes PCRE detection to use pkg-config instead of the ad hoc autoconf checks. The large inspect.c file has been split out into separate function-specific files. file-architecture: requires pcre & libmagic inspection: requires pcre & hivex
Diffstat (limited to 'src/guestfs.c')
-rw-r--r--src/guestfs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/guestfs.c b/src/guestfs.c
index e4f74e0e..b1512268 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -774,3 +774,12 @@ guestfs___print_BufferIn (FILE *out, const char *buf, size_t buf_size)
fprintf (out,
_("<truncated, original size %zu bytes>"), orig_size);
}
+
+void
+guestfs___free_string_list (char **argv)
+{
+ size_t i;
+ for (i = 0; argv[i] != NULL; ++i)
+ free (argv[i]);
+ free (argv);
+}