git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
daemon: Fix sync() call on Unix.
[libguestfs.git]
/
daemon
/
lvm.c
diff --git
a/daemon/lvm.c
b/daemon/lvm.c
index
9865bb2
..
564517c
100644
(file)
--- a/
daemon/lvm.c
+++ b/
daemon/lvm.c
@@
-26,6
+26,14
@@
#include "daemon.h"
#include "c-ctype.h"
#include "actions.h"
#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.
/* 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];
for (i = 3; i <= argc; ++i)
argv[i] = physvols[i-3];
- r = commandv (NULL, &err, (c
har *
*) argv);
+ r = commandv (NULL, &err, (c
onst char * const
*) argv);
if (r == -1) {
reply_with_error ("%s", err);
free (err);
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];
for (i = 4; i <= argc; ++i)
argv[i] = volgroups[i-4];
- r = commandv (NULL, &err, (c
har *
*) argv);
+ r = commandv (NULL, &err, (c
onst char * const
*) argv);
if (r == -1) {
reply_with_error ("vgchange: %s", err);
free (err);
if (r == -1) {
reply_with_error ("vgchange: %s", err);
free (err);