Commit fa57e3ef authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

resize2fs should not demand e2fsck check as we have already executed it prior...

resize2fs should not demand e2fsck check as we have already executed it prior calling resize2fs. resize2fs demands e2fsck check if time on the machine is not correct
parent 071d566d
......@@ -15,6 +15,7 @@ all:
patch -Np1 -d libguestfs-1.42.0 < libguestfs-1.42.0-certo.patch
patch -Np1 -d libguestfs-1.42.0 < libguestfs-1.42.0-mlv2v.patch
patch -Np1 -d libguestfs-1.42.0 < libguestfs-1.42.0-fix_test_timeout.patch
patch -Np1 -d libguestfs-1.42.0 < libguestfs-1.42.0-force_resize2fs.patch
cd libguestfs-1.42.0 && ./configure --prefix=/usr --sysconfdir=/etc --with-extra-packages="glibc readline ncurses util-linux xz pcre zlib systemd iproute2 libcap jansson augeas hivex libtirpc parted mdadm libaio cryptsetup popt openssl json-c cdrkit gptfdisk gcc"
$(MAKE) -C libguestfs-1.42.0
......
diff -uNr libguestfs-1.42.0/daemon/ext2.c libguestfs-1.42.0-force_resize2fs/daemon/ext2.c
--- libguestfs-1.42.0/daemon/ext2.c 2020-03-07 06:01:08.114078744 +1030
+++ libguestfs-1.42.0-force_resize2fs/daemon/ext2.c 2021-01-07 11:23:05.455008816 +1030
@@ -207,7 +207,7 @@
if (if_not_mounted_run_e2fsck (device) == -1)
return -1;
- r = command (NULL, &err, "resize2fs", device, NULL);
+ r = command (NULL, &err, "resize2fs", "-f", device, NULL);
if (r == -1) {
reply_with_error ("%s", err);
return -1;
@@ -239,7 +239,7 @@
char buf[32];
snprintf (buf, sizeof buf, "%" PRIi64 "K", size);
- r = command (NULL, &err, "resize2fs", device, buf, NULL);
+ r = command (NULL, &err, "resize2fs", "-f", device, buf, NULL);
if (r == -1) {
reply_with_error ("%s", err);
return -1;
@@ -257,7 +257,7 @@
if (if_not_mounted_run_e2fsck (device) == -1)
return -1;
- r = command (NULL, &err, "resize2fs", "-M", device, NULL);
+ r = command (NULL, &err, "resize2fs", "-f", "-M", device, NULL);
if (r == -1) {
reply_with_error ("%s", err);
return -1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment