summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-09-20 02:03:38 +0000
committerMike Frysinger <vapier@gentoo.org>2010-09-20 02:03:38 +0000
commita66d3ef41309671d994612b48620e60adca318ba (patch)
tree0bef682e8510c7d53dc028b3468e9602394dc2ab /sys-fs/squashfs-tools/files
parentAdded ~arm keyword (diff)
downloadgentoo-2-a66d3ef41309671d994612b48620e60adca318ba.tar.gz
gentoo-2-a66d3ef41309671d994612b48620e60adca318ba.tar.bz2
gentoo-2-a66d3ef41309671d994612b48620e60adca318ba.zip
Add fixes from upstream #292011 by Nicolas Dufresne.
(Portage version: 2.2_rc83/cvs/Linux x86_64)
Diffstat (limited to 'sys-fs/squashfs-tools/files')
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-bar.patch36
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-4.0-read-ret.patch23
2 files changed, 59 insertions, 0 deletions
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-bar.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-bar.patch
new file mode 100644
index 000000000000..4efb8ff90a25
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-bar.patch
@@ -0,0 +1,36 @@
+http://bugs.gentoo.org/292011
+
+revision 1.121
+date: 2010/03/08 01:30:17; author: plougher; state: Exp; lines: +10 -5
+Fix floating point error in progress_bar when max == 0
+
+Index: unsquashfs.c
+===================================================================
+RCS file: /cvsroot/squashfs/squashfs/squashfs-tools/unsquashfs.c,v
+retrieving revision 1.120
+retrieving revision 1.121
+diff -u -p -r1.120 -r1.121
+--- squashfs-tools/unsquashfs.c 7 Mar 2010 03:16:46 -0000 1.120
++++ squashfs-tools/unsquashfs.c 8 Mar 2010 01:30:17 -0000 1.121
+@@ -1871,12 +1871,17 @@ void update_progress_bar()
+ void progress_bar(long long current, long long max, int columns)
+ {
+ char rotate_list[] = { '|', '/', '-', '\\' };
+- int max_digits = floor(log10(max)) + 1;
+- int used = max_digits * 2 + 11;
+- int hashes = (current * (columns - used)) / max;
+- int spaces = columns - used - hashes;
++ int max_digits, used, hashes, spaces;
+ static int tty = -1;
+
++ if(max == 0)
++ return;
++
++ max_digits = floor(log10(max)) + 1;
++ used = max_digits * 2 + 11;
++ hashes = (current * (columns - used)) / max;
++ spaces = columns - used - hashes;
++
+ if((current > max) || (columns - used < 0))
+ return;
+
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.0-read-ret.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-read-ret.patch
new file mode 100644
index 000000000000..f57d49c0eed5
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-read-ret.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/292011
+
+revision 1.21
+date: 2009/04/21 00:59:16; author: plougher; state: Exp; lines: +1 -1
+Fix return in read_fragment_table_4
+
+Index: squashfs-tools/unsquash-4.c
+===================================================================
+RCS file: /cvsroot/squashfs/squashfs/squashfs-tools/unsquash-4.c,v
+retrieving revision 1.20
+retrieving revision 1.21
+diff -u -p -r1.20 -r1.21
+--- squashfs-tools/unsquash-4.c 31 Mar 2009 04:38:53 -0000 1.20
++++ squashfs-tools/unsquash-4.c 21 Apr 2009 00:59:16 -0000 1.21
+@@ -38,7 +38,7 @@ int read_fragment_table_4()
+ sBlk.fragment_table_start);
+
+ if(sBlk.fragments == 0)
+- return;
++ return TRUE;
+
+ if((fragment_table = malloc(sBlk.fragments *
+ sizeof(squashfs_fragment_entry))) == NULL)