availability: Add optional groups and implement guestfs_available call.
[libguestfs.git] / daemon / lvm.c
index 3920e95..564517c 100644 (file)
 #include "daemon.h"
 #include "c-ctype.h"
 #include "actions.h"
+#include "optgroups.h"
+
+int
+optgroup_lvm2_available (void)
+{
+  int r = access ("/sbin/lvm", X_OK);
+  return r == 0;
+}
 
 /* LVM actions.  Keep an eye on liblvm, although at the time
  * of writing it hasn't progressed very far.