diff options
author | Richard Jones <rjones@redhat.com> | 2009-05-18 20:22:36 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-05-18 20:22:36 +0100 |
commit | 0695593702b8612b500ff0b3bf800e5934f9b56e (patch) | |
tree | 12873130bf81bb0ba4e409303c15b0ca82d20360 /daemon/ext2.c | |
parent | 38797198d8f60b0a1793d7f228f69c757307ac3f (diff) | |
download | libguestfs-0695593702b8612b500ff0b3bf800e5934f9b56e.tar.gz libguestfs-0695593702b8612b500ff0b3bf800e5934f9b56e.tar.xz libguestfs-0695593702b8612b500ff0b3bf800e5934f9b56e.zip |
Add: lvresize, resize2fs commands.
Diffstat (limited to 'daemon/ext2.c')
-rw-r--r-- | daemon/ext2.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/daemon/ext2.c b/daemon/ext2.c index 99c12f09..639ae5dd 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -234,3 +234,22 @@ do_get_e2uuid (const char *device) free (out); return p; /* caller frees */ } + +int +do_resize2fs (const char *device) +{ + char *err; + int r; + + IS_DEVICE (device, -1); + + r = command (NULL, &err, "/sbin/resize2fs", device, NULL); + if (r == -1) { + reply_with_error ("resize2fs: %s", err); + free (err); + return -1; + } + + free (err); + return 0; +} |