summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2014-05-04 23:56:48 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 10:49:10 +0200
commitca7877387809d2a7263555eb471126e126bedef1 (patch)
tree1776dc009e35e671f930949304b9de5971ab1bc9 /sys-fs/squashfs-tools/files
parentBump sundtek-tv, noscript, stylish (diff)
downloadmv-ca7877387809d2a7263555eb471126e126bedef1.tar.gz
mv-ca7877387809d2a7263555eb471126e126bedef1.tar.bz2
mv-ca7877387809d2a7263555eb471126e126bedef1.zip
Bump squashfs-tools
Diffstat (limited to 'sys-fs/squashfs-tools/files')
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-4.2_p20140119-progress-stderr.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.2_p20140119-progress-stderr.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.2_p20140119-progress-stderr.patch
new file mode 100644
index 00000000..5ab05bda
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.2_p20140119-progress-stderr.patch
@@ -0,0 +1,60 @@
+--- progressbar.c.bak/progressbar.c.bak
++++ progressbar.c.bak/progressbar.c
+@@ -56,8 +56,8 @@
+ {
+ struct winsize winsize;
+
+- if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
+- if(isatty(STDOUT_FILENO))
++ if(ioctl(2, TIOCGWINSZ, &winsize) == -1) {
++ if(isatty(STDERR_FILENO))
+ ERROR("TIOCGWINSZ ioctl failed, defaulting to 80 "
+ "columns\n");
+ columns = 80;
+@@ -108,7 +108,7 @@
+ return;
+
+ if(tty == -1)
+- tty = isatty(STDOUT_FILENO);
++ tty = isatty(STDERR_FILENO);
+ if(!tty) {
+ static long long previous = -1;
+
+@@ -122,19 +122,19 @@
+ previous = current;
+ }
+
+- printf("\r[");
++ fprintf(stderr, "\r[");
+
+ while (hashes --)
+- putchar('=');
++ putc('=', stderr);
+
+- putchar(rotate_list[rotate]);
++ putc(rotate_list[rotate], stderr);
+
+ while(spaces --)
+- putchar(' ');
++ putc(' ', stderr);
+
+- printf("] %*lld/%*lld", max_digits, current, max_digits, max);
+- printf(" %3lld%%", current * 100 / max);
+- fflush(stdout);
++ fprintf(stderr, "] %*lld/%*lld", max_digits, current, max_digits, max);
++ fprintf(stderr, " %3lld%%", current * 100 / max);
++ fflush(stderr);
+ }
+
+
+@@ -180,8 +180,8 @@
+ struct itimerval itimerval;
+ struct winsize winsize;
+
+- if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
+- if(isatty(STDOUT_FILENO))
++ if(ioctl(2, TIOCGWINSZ, &winsize) == -1) {
++ if(isatty(STDERR_FILENO))
+ ERROR("TIOCGWINSZ ioctl failed, defaulting to 80 "
+ "columns\n");
+ columns = 80;