*/
static char **
-convert_lvm_output (char *out, char *prefix)
+convert_lvm_output (char *out, const char *prefix)
{
char *p, *pend;
char **r = NULL;
}
int
-do_pvcreate (char *device)
+do_pvcreate (const char *device)
{
char *err;
int r;
- IS_DEVICE (device, -1);
-
r = command (NULL, &err,
"/sbin/lvm", "pvcreate", device, NULL);
if (r == -1) {
}
int
-do_vgcreate (char *volgroup, char **physvols)
+do_vgcreate (const char *volgroup, char **physvols)
{
char *err;
int r, argc, i;
/* Check they are devices and also do device name translation. */
for (i = 0; physvols[i] != NULL; ++i)
- IS_DEVICE (physvols[i], -1);
+ RESOLVE_DEVICE (physvols[i], return -1);
argc = count_strings (physvols) + 3;
argv = malloc (sizeof (char *) * (argc + 1));
}
int
-do_lvcreate (char *logvol, char *volgroup, int mbytes)
+do_lvcreate (const char *logvol, const char *volgroup, int mbytes)
{
char *err;
int r;
}
int
-do_lvresize (char *logvol, int mbytes)
+do_lvresize (const char *logvol, int mbytes)
{
char *err;
int r;
char size[64];
- IS_DEVICE (logvol, -1);
-
snprintf (size, sizeof size, "%d", mbytes);
r = command (NULL, &err,
}
int
-do_lvremove (char *device)
+do_lvremove (const char *device)
{
char *err;
int r;
- IS_DEVICE (device, -1);
-
r = command (NULL, &err,
"/sbin/lvm", "lvremove", "-f", device, NULL);
if (r == -1) {
}
int
-do_vgremove (char *device)
+do_vgremove (const char *device)
{
char *err;
int r;
}
int
-do_pvremove (char *device)
+do_pvremove (const char *device)
{
char *err;
int r;
- IS_DEVICE (device, -1);
-
r = command (NULL, &err,
"/sbin/lvm", "pvremove", "-ff", device, NULL);
if (r == -1) {
}
int
-do_pvresize (char *device)
+do_pvresize (const char *device)
{
char *err;
int r;
- IS_DEVICE (device, -1);
-
r = command (NULL, &err,
"/sbin/lvm", "pvresize", device, NULL);
if (r == -1) {