git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hivex: display bad block offset in hex
[libguestfs.git]
/
daemon
/
lvm.c
diff --git
a/daemon/lvm.c
b/daemon/lvm.c
index
742b40b
..
564517c
100644
(file)
--- a/
daemon/lvm.c
+++ b/
daemon/lvm.c
@@
-22,10
+22,18
@@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <ctype.h>
#include "daemon.h"
#include "daemon.h"
+#include "c-ctype.h"
#include "actions.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.
@@
-49,12
+57,12
@@
convert_lvm_output (char *out, const char *prefix)
pend++;
}
pend++;
}
- while (*p &&
isspace (*p))
/* Skip any leading whitespace. */
+ while (*p &&
c_isspace (*p))
/* Skip any leading whitespace. */
p++;
/* Sigh, skip trailing whitespace too. "pvs", I'm looking at you. */
len = strlen (p)-1;
p++;
/* Sigh, skip trailing whitespace too. "pvs", I'm looking at you. */
len = strlen (p)-1;
- while (*p && isspace (p[len]))
+ while (*p &&
c_
isspace (p[len]))
p[len--] = '\0';
if (!*p) { /* Empty line? Skip it. */
p[len--] = '\0';
if (!*p) { /* Empty line? Skip it. */
@@
-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);