+int
+do_lvresize (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,
+ "/sbin/lvm", "lvresize",
+ "-L", size, logvol, NULL);
+ if (r == -1) {
+ reply_with_error ("lvresize: %s", err);
+ free (err);
+ return -1;
+ }
+
+ free (err);
+ return 0;
+}
+