X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Flvm.c;h=564517c5841c4acca86ee3f9da46169572e4c934;hb=1c0ab7ab954c01cac2c87425a4b027e44c80e645;hp=9865bb2367dd32a846ce2b26b2396634a1e1536b;hpb=6a14f1c2502f58ff7bed8cb451f95a83f5ee920a;p=libguestfs.git diff --git a/daemon/lvm.c b/daemon/lvm.c index 9865bb2..564517c 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -26,6 +26,14 @@ #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. @@ -210,7 +218,7 @@ do_vgcreate (const char *volgroup, char *const *physvols) for (i = 3; i <= argc; ++i) argv[i] = physvols[i-3]; - r = commandv (NULL, &err, (char **) argv); + r = commandv (NULL, &err, (const char * const*) argv); if (r == -1) { reply_with_error ("%s", err); free (err); @@ -440,7 +448,7 @@ do_vg_activate (int activate, char *const *volgroups) for (i = 4; i <= argc; ++i) argv[i] = volgroups[i-4]; - r = commandv (NULL, &err, (char **) argv); + r = commandv (NULL, &err, (const char * const*) argv); if (r == -1) { reply_with_error ("vgchange: %s", err); free (err);