New commands: mkfs-b, mke2journal*, mke2fs-J*
[libguestfs.git] / daemon / lvm.c
index 8f575c4..ddc125c 100644 (file)
@@ -32,7 +32,7 @@
  */
 
 static char **
-convert_lvm_output (char *out, char *prefix)
+convert_lvm_output (char *out, const char *prefix)
 {
   char *p, *pend;
   char **r = NULL;
@@ -171,13 +171,11 @@ do_lvs_full (void)
 }
 
 int
-do_pvcreate (char *device)
+do_pvcreate (const char *device)
 {
   char *err;
   int r;
 
-  RESOLVE_DEVICE (device, return -1);
-
   r = command (NULL, &err,
                "/sbin/lvm", "pvcreate", device, NULL);
   if (r == -1) {
@@ -194,7 +192,7 @@ do_pvcreate (char *device)
 }
 
 int
-do_vgcreate (char *volgroup, char **physvols)
+do_vgcreate (const char *volgroup, char **physvols)
 {
   char *err;
   int r, argc, i;
@@ -231,7 +229,7 @@ do_vgcreate (char *volgroup, char **physvols)
 }
 
 int
-do_lvcreate (char *logvol, char *volgroup, int mbytes)
+do_lvcreate (const char *logvol, const char *volgroup, int mbytes)
 {
   char *err;
   int r;
@@ -256,14 +254,12 @@ do_lvcreate (char *logvol, char *volgroup, int mbytes)
 }
 
 int
-do_lvresize (char *logvol, int mbytes)
+do_lvresize (const char *logvol, int mbytes)
 {
   char *err;
   int r;
   char size[64];
 
-  RESOLVE_DEVICE (logvol, return -1);
-
   snprintf (size, sizeof size, "%d", mbytes);
 
   r = command (NULL, &err,
@@ -347,13 +343,11 @@ do_lvm_remove_all (void)
 }
 
 int
-do_lvremove (char *device)
+do_lvremove (const char *device)
 {
   char *err;
   int r;
 
-  RESOLVE_DEVICE (device, return -1);
-
   r = command (NULL, &err,
                "/sbin/lvm", "lvremove", "-f", device, NULL);
   if (r == -1) {
@@ -370,7 +364,7 @@ do_lvremove (char *device)
 }
 
 int
-do_vgremove (char *device)
+do_vgremove (const char *device)
 {
   char *err;
   int r;
@@ -391,13 +385,11 @@ do_vgremove (char *device)
 }
 
 int
-do_pvremove (char *device)
+do_pvremove (const char *device)
 {
   char *err;
   int r;
 
-  RESOLVE_DEVICE (device, return -1);
-
   r = command (NULL, &err,
                "/sbin/lvm", "pvremove", "-ff", device, NULL);
   if (r == -1) {
@@ -414,13 +406,11 @@ do_pvremove (char *device)
 }
 
 int
-do_pvresize (char *device)
+do_pvresize (const char *device)
 {
   char *err;
   int r;
 
-  RESOLVE_DEVICE (device, return -1);
-
   r = command (NULL, &err,
                "/sbin/lvm", "pvresize", device, NULL);
   if (r == -1) {