summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch')
-rw-r--r--sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch b/sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch
new file mode 100644
index 000000000000..979bf74a0ea8
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/276352
+
+From 3a4d9869d47c462c84688b0f8b15df5ab6f93381 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Thu, 2 Jul 2009 13:54:22 -0400
+Subject: [PATCH] resize2fs: Fix error message so the mountpoint is printed correctly
+
+The resize2fs program was freeing the mountpoint information too
+early, so garbage was getting printed instead of the correct
+information in an error message.
+
+Addresses-Debian-Bug: #535452
+
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+---
+ resize/main.c | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/resize/main.c b/resize/main.c
+index 9b03ba9..2dae161 100644
+--- a/resize/main.c
++++ b/resize/main.c
+@@ -250,10 +250,8 @@ int main (int argc, char ** argv)
+ device_name);
+ exit(1);
+ }
+- if (!(mount_flags & EXT2_MF_MOUNTED) || (mtpt[len-1] == 0)) {
+- free(mtpt);
++ if (!(mount_flags & EXT2_MF_MOUNTED) || (mtpt[len-1] == 0))
+ break;
+- }
+ free(mtpt);
+ len = 2 * len;
+ }
+@@ -453,6 +451,7 @@ int main (int argc, char ** argv)
+ ((flags & RESIZE_PERCENT_COMPLETE) ?
+ resize_progress_func : 0));
+ }
++ free(mtpt);
+ if (retval) {
+ com_err(program_name, retval, _("while trying to resize %s"),
+ device_name);
+--
+1.6.3.3
+