Hello community,

here is the log from the commit of package dd_rescue for openSUSE:Factory 
checked in at 2013-08-10 11:18:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dd_rescue (Old)
 and      /work/SRC/openSUSE:Factory/.dd_rescue.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dd_rescue"

Changes:
--------
--- /work/SRC/openSUSE:Factory/dd_rescue/dd_rescue.changes      2013-08-04 
07:28:48.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.dd_rescue.new/dd_rescue.changes 2013-08-10 
11:18:13.000000000 +0200
@@ -1,0 +2,11 @@
+Thu Aug  8 13:59:39 CEST 2013 - [email protected]
+
+- Update to dd_rescue-1.39:
+  * Fix an issue with the last block being appended zeros if
+    hardbs==softbs (bnc #833765).
+  * A little ARM asm speedup (~15%) for sparse detection.
+  * Clarify help/man page w.r.t. interpretation of -y/--syncfreq.
+  * We use autoconf for feature detection now.
+- Build version with libdl by default now. 
+
+-------------------------------------------------------------------

Old:
----
  dd_rescue-1.38.tar.gz

New:
----
  dd_rescue-1.39.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dd_rescue.spec ++++++
--- /var/tmp/diff_new_pack.uqMwF8/_old  2013-08-10 11:18:14.000000000 +0200
+++ /var/tmp/diff_new_pack.uqMwF8/_new  2013-08-10 11:18:14.000000000 +0200
@@ -17,16 +17,17 @@
 
 
 Name:           dd_rescue
-Version:        1.38
+Version:        1.39
 Release:        0
 Summary:        Data Copying in the Presence of I/O Errors
 License:        GPL-2.0 or GPL-3.0
 Group:          System/Base
 Url:            http://www.garloff.de/kurt/linux/ddrescue/
 Source0:        http://garloff.de/kurt/linux/ddrescue/%{name}-%{version}.tar.gz
-BuildRequires:  libfallocate-devel-static
+BuildRequires:  autoconf
+BuildRequires:  libfallocate-devel
 Requires:       bc
-Recommends:     dd_rhelp
+Recommends:     dd_rhelp libfallocate0
 # ddrescue was last used in openSUSE 11.4 (version 1.14_0.0.6)
 Provides:       ddrescue = %{version}
 Obsoletes:      ddrescue < %{version}
@@ -52,7 +53,7 @@
 sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" dd_rescue.c
 
 %build
-make RPM_OPT_FLAGS="%{optflags}" libfalloc-static LIBDIR=%{_libdir} 
%{?_smp_mflags}
+make RPM_OPT_FLAGS="%{optflags}" LIBDIR=%{_libdir} %{?_smp_mflags}
 
 %install
 make install DESTDIR=%{buildroot} INSTALLDIR=%{buildroot}/%{_bindir} \

++++++ dd_rescue-1.38.tar.gz -> dd_rescue-1.39.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/Makefile new/dd_rescue/Makefile
--- old/dd_rescue/Makefile      2013-08-02 13:33:21.000000000 +0200
+++ new/dd_rescue/Makefile      2013-08-08 12:05:00.000000000 +0200
@@ -1,14 +1,14 @@
 # Makefile for dd_rescue
 # (c) [email protected], 99/10/09, GNU GPL
-# $Id: Makefile,v 1.70 2013/08/02 10:23:12 garloff Exp $
+# $Id: Makefile,v 1.73 2013/08/08 10:05:00 garloff Exp $
 
-VERSION = 1.38
+VERSION = 1.39
 
 DESTDIR = 
 
 CC = gcc
 RPM_OPT_FLAGS = -Os -Wall -g
-CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS)
+CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H
 CFLAGS_OPT = $(CFLAGS) -O3
 INSTALL = install
 INSTALLFLAGS = -s
@@ -19,8 +19,9 @@
 #MYDIR = dd_rescue-$(VERSION)
 MYDIR = dd_rescue
 TARGETS = dd_rescue
+#TARGETS = libfalloc-dl
 OBJECTS = frandom.o fmt_no.o find_nonzero.o
-HEADERS = frandom.h fmt_no.h find_nonzero.h
+HEADERS = frandom.h fmt_no.h find_nonzero.h config.h
 DOCDIR = $(prefix)/share/doc/packages
 INSTASROOT = -o root -g root
 LIBDIR = /usr/lib
@@ -42,38 +43,51 @@
        #SSE = "-msse2 -funroll-loops -ftree-vectorize"
 endif
 
+.phony: libfalloc libfalloc-static libfalloc-dl nolib nocolor static strip
+
 default: $(TARGETS)
 
-frandom.o: frandom.c frandom.h
+config.h: configure config.h.in
+       ./configure
+
+configure: configure.in
+       autoconf
+
+config.h.in: configure.in
+       autoheader
+
+frandom.o: frandom.c frandom.h config.h
        $(CC) $(CFLAGS_OPT) -c $<
 
-fmt_no.o: fmt_no.c fmt_no.h
+fmt_no.o: fmt_no.c fmt_no.h config.h
        $(CC) $(CFLAGS_OPT) -c $<
 
-find_nonzero.o: find_nonzero.c find_nonzero.h
+find_nonzero.o: find_nonzero.c find_nonzero.h config.h
        $(CC) $(CFLAGS_OPT) -c $< $(SSE)
 
-find_nonzero_avx.o: find_nonzero_avx.c find_nonzero.h
+find_nonzero_avx.o: find_nonzero_avx.c find_nonzero.h config.h
        $(CC) $(CFLAGS_OPT) -mavx2 -c $<
 
 libfalloc: dd_rescue.c $(HEADERS) $(OBJECTS)
-       $(CC) $(CFLAGS) -DHAVE_LIBFALLOCATE=1 $(DEFINES) $< $(OUT) $(OBJECTS) 
-lfallocate
+       $(CC) $(CFLAGS) -DNO_LIBDL $(DEFINES) $< $(OUT) $(OBJECTS) -lfallocate
 
 libfalloc-static: dd_rescue.c $(HEADERS) $(OBJECTS)
-       $(CC) $(CFLAGS) -DHAVE_LIBFALLOCATE=1 $(DEFINES) $< $(OUT) $(OBJECTS) 
$(LIBDIR)/libfallocate.a
+       $(CC) $(CFLAGS) -DNO_LIBDL $(DEFINES) $< $(OUT) $(OBJECTS) 
$(LIBDIR)/libfallocate.a
 
-libfalloc-dl: dd_rescue.c $(HEADERS) $(OBJECTS)
-       $(CC) $(CFLAGS) -DHAVE_LIBDL=1 -DHAVE_LIBFALLOCATE=1 -DHAVE_FALLOCATE=1 
$(DEFINES) $< $(OUT) $(OBJECTS) -ldl
+dd_rescue: dd_rescue.c $(HEADERS) $(OBJECTS)
+       $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) -ldl
 
-falloc: dd_rescue.c $(HEADERS) $(OBJECTS)
-       $(CC) $(CFLAGS) -DHAVE_FALLOCATE=1 $(DEFINES) $< $(OUT) $(OBJECTS)
+libfalloc-dl: dd_rescue
 
-dd_rescue: dd_rescue.c $(HEADERS) $(OBJECTS)
-       $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS)
+nolib: dd_rescue.c $(HEADERS) $(OBJECTS)
+       $(CC) $(CFLAGS) -DNO_LIBDL -DNO_LIBFALLOCATE $(DEFINES) $< $(OUT) 
$(OBJECTS)
 
 nocolor: dd_rescue.c $(HEADERS) $(OBJECTS)
        $(CC) $(CFLAGS) -DNO_COLORS=1 $(DEFINES) $< $(OUT) $(OBJECTS)
 
+static: dd_rescue.c $(HEADERS) $(OBJECTS)
+       $(CC) $(CFLAGS) -DNO_LIBDL -DNO_LIBFALLOCATE -static $(DEFINES) $< 
$(OUT) $(OBJECTS)
+
 strip: dd_rescue
        strip -S $<
 
@@ -93,7 +107,8 @@
        $(CC) $(CFLAGS) -o $@ $< find_nonzero.o
 
 distclean: clean
-       rm -f *~
+       rm -f *~ config.h config.h.in config.status config.log configure
+       rm -rf autom4te.cache
 
 dist: distclean
        tar cvzf ../dd_rescue-$(VERSION).tar.gz -C.. --exclude=$(MYDIR)/CV* 
--exclude $(MYDIR)/dd_rescue2* --exclude $(MYDIR)/.* $(MYDIR)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/autogen.sh new/dd_rescue/autogen.sh
--- old/dd_rescue/autogen.sh    1970-01-01 01:00:00.000000000 +0100
+++ new/dd_rescue/autogen.sh    2013-08-06 12:26:46.000000000 +0200
@@ -0,0 +1,5 @@
+#!/bin/sh
+autoheader
+autoconf
+./configure
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/configure.in new/dd_rescue/configure.in
--- old/dd_rescue/configure.in  1970-01-01 01:00:00.000000000 +0100
+++ new/dd_rescue/configure.in  2013-08-08 13:14:42.000000000 +0200
@@ -0,0 +1,13 @@
+AC_INIT(dd_rescue, 1.38.1, [email protected])
+AC_CONFIG_HEADER(config.h)
+AC_PROG_CC
+AC_C_CONST
+AC_C_INLINE
+AC_HEADER_STDC
+#AC_PROG_INSTALL
+#CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
+AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h attr/xattr.h sys/acl.h])
+AC_CHECK_FUNCS([ffs fallocate64 splice getopt_long])
+AC_CHECK_LIB(dl,dlsym)
+AC_CHECK_LIB(fallocate,linux_fallocate64)
+AC_OUTPUT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/dd_rescue.1 new/dd_rescue/dd_rescue.1
--- old/dd_rescue/dd_rescue.1   2013-07-26 00:00:15.000000000 +0200
+++ new/dd_rescue/dd_rescue.1   2013-08-07 09:27:24.000000000 +0200
@@ -1,4 +1,4 @@
-.\" $Id: dd_rescue.1,v 1.13 2013/07/25 11:57:34 garloff Exp $
+.\" $Id: dd_rescue.1,v 1.14 2013/08/07 07:27:24 garloff Exp $
 .
 .TH dd_rescue 1 "2013-02-24" "Kurt Garloff" "Rescue copy tool"
 .
@@ -139,16 +139,16 @@
 If both block sizes are identical, no fallback mechanism (and thus no
 retry) will take place on read errors.
 .TP 8
-.BI \-y\  syncfreq \fR,\ \fB\-\-syncfreq= syncfreq
+.BI \-y\  syncsize \fR,\ \fB\-\-syncfreq= syncsize
 tells
 .B dd_rescue
 to call fsync() on the output file every 
-.IR syncfreq
-blocks (in terms of
+.IR syncsize
+bytes (will be rounded to multiples of 
 .IR softbs
 sized blocks). It will also update the progress indicator at least as
 often. By default,
-.IR syyncfreq
+.IR syncsize
 is set to 0, meaning that fsync() is only issued at the end of the
 copy operation.
 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/dd_rescue.c new/dd_rescue/dd_rescue.c
--- old/dd_rescue/dd_rescue.c   2013-08-02 00:16:39.000000000 +0200
+++ new/dd_rescue/dd_rescue.c   2013-08-08 14:18:59.000000000 +0200
@@ -38,6 +38,10 @@
  * - Options to compress with libz, liblzo, libbz2, lzma, ... 
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #ifndef VERSION
 # define VERSION "(unknown)"
 #endif
@@ -45,7 +49,7 @@
 # define __COMPILER__ "(unknown compiler)"
 #endif
 
-#define ID "$Id: dd_rescue.c,v 1.218 2013/08/01 22:16:39 garloff Exp $"
+#define ID "$Id: dd_rescue.c,v 1.224 2013/08/08 12:18:59 garloff Exp $"
 
 #ifndef BUF_SOFTBLOCKSIZE
 # define BUF_SOFTBLOCKSIZE 65536
@@ -65,7 +69,7 @@
 
 
 #ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+# define _GNU_SOURCE 1
 #endif
 #define _LARGEFILE_SOURCE
 #define _FILE_OFFSET_BITS 64
@@ -90,25 +94,43 @@
 #include "fmt_no.h"
 #include "find_nonzero.h"
 
-#ifndef LACK_GETOPT_LONG
+#ifdef HAVE_GETOPT_LONG
 #include <getopt.h>
 #endif
+
 // hack around buggy splice definition(!)
+#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 10
+# define SPLICE_IS_BUGGY 1
+#endif
+
+#ifdef SPLICE_IS_BUGGY
+#warning work around buggy splice() prototype
 #define splice oldsplice
+#endif
 #include <fcntl.h>
 #undef splice
 
-#ifdef HAVE_LIBFALLOCATE
-#include <fallocate.h>
+#ifdef NO_LIBFALLOCATE
+# undef HAVE_LIBFALLOCATE
+# undef HAVE_FALLOCATE_H
+#endif
+
+#ifdef HAVE_FALLOCATE_H
+# include <fallocate.h>
+#else
+# ifdef HAVE_FALLOCATE64
+#  include <linux/falloc.h>
+# endif
 #endif
 
-#ifdef HAVE_LIBDL
+#if defined(HAVE_DLFCN_H) && !defined(NO_LIBDL)
 #include <dlfcn.h>
 void* libfalloc = (void*)0;
+#define USE_LIBDL 1
 #endif
 
 /* splice */
-#ifdef __linux__
+#if defined(__linux__) && (!defined(HAVE_SPLICE) || defined(SPLICE_IS_BUGGY))
 # define __KERNEL__
 # include <asm/unistd.h>
 # ifdef __NR_splice
@@ -118,7 +140,7 @@
 #   define SPLICE_F_MORE 4
 #  endif
 #  if 1
-static inline long splice(int fdin, loff_t *off_in, int fdout, 
+static inline ssize_t splice(int fdin, loff_t *off_in, int fdout, 
                              loff_t *off_out, size_t len, unsigned int flags)
 {
        return syscall(__NR_splice, fdin, off_in, fdout, off_out, len, flags);
@@ -127,6 +149,7 @@
 _syscall6(long, splice, int, fdin, loff_t*, off_in, int, fdout, loff_t*, 
off_out, size_t, len, unsigned int, flags);
 #  endif
 # endif
+# undef __KERNEL__
 #endif
 
 /* fwd decls */
@@ -148,7 +171,7 @@
 char i_repeat, i_rep_init;
 size_t i_rep_zero;
 int  prng_seed;
-char noextend, avoidwrite;
+char noextend, avoidwrite, avoidnull;
 char prng_libc, prng_frnd;
 char bsim715, bsim715_4, bsim715_2, bsim715_2ndpass;
 char extend;
@@ -511,9 +534,9 @@
                                oname, eff_opos, stbuf.st_size);
 }
 
-#if defined(HAVE_FALLOCATE) || defined(HAVE_LIBFALLOCATE)
+#if defined(HAVE_FALLOCATE64) || defined(HAVE_LIBFALLOCATE)
 
-#ifdef HAVE_LIBDL
+#ifdef USE_LIBDL
 static void* load_libfallocate()
 {
        if (!libfalloc)
@@ -540,21 +563,21 @@
        to_falloc = estxfer - (alloced < 0 ? 0 : alloced);
        if (to_falloc <= 0)
                return;
-#ifdef HAVE_LIBDL
+#ifdef USE_LIBDL
        typedef int (*_l_f_t) (int fd, int mode, __off64_t start, __off64_t 
len);
        //int (*_linux_fallocate64)(int fd, int mode, __off64_t start, 
__off64_t len);
        _l_f_t _linux_fallocate64 = (_l_f_t)load_libfallocate();
        if (_linux_fallocate64)
                rc = _linux_fallocate64(fd, FALLOC_FL_KEEP_SIZE,
                                opos, to_falloc);
-#ifdef HAVE_FALLOCATE
+#ifdef HAVE_FALLOCATE64
        else
                rc = fallocate64(fd, 1, opos, to_falloc);
 #endif
 #elif defined(HAVE_LIBFALLOCATE)
        rc = linux_fallocate64(fd, FALLOC_FL_KEEP_SIZE, 
                              opos, to_falloc);
-#else /* HAVE_FALLOCATE */
+#else /* HAVE_FALLOCATE64 */
        rc = fallocate64(fd, 1, opos, to_falloc);
 #endif
        if (rc)
@@ -837,7 +860,7 @@
                LISTDATA(onl) = 0;
        }
        LISTTREEDEL(freenames, charp);
-#if HAVE_LIBDL
+#if USE_LIBDL
        if (libfalloc)
                dlclose(libfalloc);
 #endif
@@ -886,9 +909,14 @@
 
 static inline ssize_t mypwrite(int fd, void* bf, size_t sz, off_t off)
 {
-       if (o_chr)
-               return write(fd, bf, sz);
-       else {
+       if (o_chr) {
+               if (!avoidnull)
+                       return write(fd, bf, sz);
+               else {
+                       axfer += sz;
+                       return sz;
+               }
+       } else {
                if (avoidwrite) {
                        ssize_t ln = pread(fd, buf2, sz, off);
                        if (ln < (ssize_t)sz)
@@ -986,7 +1014,7 @@
        }
 }
 
-
+/* Update positions after successful copy, rd = progress, wr = really written 
*/
 static void advancepos(const ssize_t rd, const ssize_t wr)
 {
        sxfer += wr; xfer += rd;
@@ -1008,6 +1036,8 @@
 
 int weno;
 
+/* Do write,  update positions ... 
+ * Returns number of successfully written bytes. */
 ssize_t dowrite(const ssize_t rd)
 {
        int err = 0;
@@ -1037,6 +1067,8 @@
        return wr;
 }
 
+/* Do write with retry if rd > hardbs, update positions ... 
+ * Returns 0 on success, -1 on fatal error, 1 on normal error. */
 int dowrite_retry(const ssize_t rd)
 {
        int errs = 0;
@@ -1116,19 +1148,15 @@
                        exitfatalerr(eno);
                        /* Non fatal error */
                        /* This is the case, where we were not called from 
copyfile_softbs and thus have to assume harmless EOF */
-                       if (softbs <= hardbs && eno == 0) {
+                       if (/*softbs <= hardbs &&*/ eno == 0) {
                                int ret;
                                /* But first: write available data and advance 
(optimization) */
                                if ((ret = partialwrite(rd)) < 0)
                                        return ret;
                                else
                                        errs += ret;
-                               xfer += rd; sxfer += rd;
-                               if (reverse) { 
-                                       ipos -= rd; opos -= rd; 
-                               } else { 
-                                       ipos += rd; opos += rd; 
-                               }
+                               /* partialwrite calls dowrite_retry which 
updates
+                                * statistics and positions. */
                                continue;
                        }                                       
                        /* Real error on small blocks: Don't retry */
@@ -1512,12 +1540,12 @@
 #ifdef O_DIRECT
        fprintf(stderr, "O_DIRECT ");
 #endif
-#ifdef HAVE_LIBDL
+#ifdef USE_LIBDL
        fprintf(stderr, "dl/libfallocate ");
 #elif defined(HAVE_LIBFALLOCATE)
        fprintf(stderr, "libfallocate ");
 #endif 
-#if defined(HAVE_FALLOCATE)
+#if defined(HAVE_FALLOCATE64)
        fprintf(stderr, "fallocate ");
 #endif
 #ifdef HAVE_SPLICE
@@ -1529,7 +1557,7 @@
 }
 
 
-#ifndef LACK_GETOPT_LONG
+#ifdef HAVE_GETOPT_LONG
 struct option longopts[] = {   {"help", 0, NULL, 'h'}, {"verbose", 0, NULL, 
'v'},
                                {"quiet", 0, NULL, 'q'}, {"version", 0, NULL, 
'V'},
                                {"color", 1, NULL, 'c'},
@@ -1576,7 +1604,7 @@
        fprintf(stderr, "         -m maxxfer maximum amount of data to be 
transfered (def=0=inf),\n");
        fprintf(stderr, "         -M         avoid extending outfile,\n");
        fprintf(stderr, "         -x         count opos from the end of outfile 
(eXtend),\n");
-       fprintf(stderr, "         -y syncfrq frequency of fsync calls on 
outfile (def=512*softbs),\n");
+       fprintf(stderr, "         -y syncsz  frequency of fsync calls in bytes 
(def=512*softbs),\n");
        fprintf(stderr, "         -l logfile name of a file to log errors and 
summary to (def=\"\"),\n");
        fprintf(stderr, "         -o bbfile  name of a file to log bad blocks 
numbers (def=\"\"),\n");
        fprintf(stderr, "         -r         reverse direction copy 
(def=forward),\n");
@@ -1589,7 +1617,7 @@
 #ifdef HAVE_SPLICE
        fprintf(stderr, "         -k         use efficient in-kernel zerocopy 
splice,\n");
 #endif         
-#if defined(HAVE_FALLOCATE) || defined(HAVE_LIBFALLOCATE)
+#if defined(HAVE_FALLOCATE64) || defined(HAVE_LIBFALLOCATE)
        fprintf(stderr, "         -P         use fallocate to preallocate 
target space,\n");
 #endif
        fprintf(stderr, "         -w         abort on Write errors 
(def=no),\n");
@@ -1771,7 +1799,7 @@
        i_chr = 0; o_chr = 0;
 
        i_repeat = 0; i_rep_init = 0; i_rep_zero = 0;
-       noextend = 0; avoidwrite = 0;
+       noextend = 0; avoidwrite = 0; avoidnull = 0;
        bsim715 = 0; bsim715_4 = 0; bsim715_2 = 0; bsim715_2ndpass = 0;
        extend = 0;
        prng_libc = 0; prng_frnd = 0;
@@ -1983,8 +2011,13 @@
                }
        }
        if (o_chr && avoidwrite) {
-               fplog(stderr, WARN, "Disabling -Write avoidance b/c ofile is 
not seekable\n");
-               avoidwrite = 0;
+               if (!strcmp(oname, "/dev/null")) {
+                       fplog(stderr, INFO, "Avoid writes to /dev/null ...\n");
+                       avoidnull = 1;
+               } else {
+                       fplog(stderr, WARN, "Disabling -Write avoidance b/c 
ofile is not seekable\n");
+                       avoidwrite = 0;
+               }
        }
                
        if (odes != 1) {
@@ -2012,9 +2045,14 @@
                        fplog(stderr, WARN, "Not using sparse writes for 
non-seekable output\n");
                nosparse = 1; sparse = 0; dosplice = 0;
                if (avoidwrite) {
-                       fplog(stderr, WARN, "Disabling -Write avoidance b/c 
ofile is not seekable\n");
-                       avoidwrite = 0;
-                       ZFREE(origbuf2);
+                       if (!strcmp(oname, "/dev/null")) {
+                               fplog(stderr, INFO, "Avoid writes to /dev/null 
...\n");
+                               avoidnull = 1;
+                       } else {
+                               fplog(stderr, WARN, "Disabling -Write avoidance 
b/c ofile is not seekable\n");
+                               ZFREE(origbuf2);
+                               avoidwrite = 0;
+                       }
                }
        }
 
@@ -2098,7 +2136,7 @@
        }
 
 
-#if defined(HAVE_FALLOCATE) || defined(HAVE_LIBFALLOCATE)
+#if defined(HAVE_FALLOCATE64) || defined(HAVE_LIBFALLOCATE)
        if (falloc && !o_chr)
                do_fallocate(odes, oname);
 #endif
@@ -2112,6 +2150,7 @@
        if (bsim715 && avoidwrite) {
                fplog(stderr, WARN, "won't avoid writes for -3\n");
                avoidwrite = 0;
+               ZFREE(buf2);
        }
        if (bsim715 && o_chr) {
                fplog(stderr, WARN, "triple overwrite with non-seekable 
output!\n");
@@ -2133,7 +2172,7 @@
                check_seekable(oft->fd, &(oft->cdev), NULL);
                if (preserve)
                        copyperm(ides, oft->fd);
-#if defined(HAVE_FALLOCATE) || defined(HAVE_LIBFALLOCATE)
+#if defined(HAVE_FALLOCATE64) || defined(HAVE_LIBFALLOCATE)
                if (falloc && !oft->cdev)
                        do_fallocate(oft->fd, oft->name);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/find_nonzero.c new/dd_rescue/find_nonzero.c
--- old/dd_rescue/find_nonzero.c        2013-08-02 13:33:21.000000000 +0200
+++ new/dd_rescue/find_nonzero.c        2013-08-07 01:45:47.000000000 +0200
@@ -116,41 +116,52 @@
        "       ldmia %0!,{r2,r3}       \n"
        "       cmp r2, #0              \n"
        "       bne 2f                  \n"
+       "       ldmia %0!,{r4,r5}       \n"
        "       cmp r3, #0              \n"
        "       bne 3f                  \n"
+       "       cmp r4, #0              \n"
+       "       bne 4f                  \n"
+       "       cmp r5, #0              \n"
+       "       bne 5f                  \n"
        "       cmp %0, %2              \n"     /* end? */
        "       blt 1b                  \n"
        "       mov %0, %2              \n"     
        "       b 10f                   \n"     /* exhausted search */
        "2:                             \n"
-       "       sub %0, #4              \n"     /* First u32 is non-zero */
+       "       add %0, #4              \n"     /* First u32 is non-zero */
        "       mov r3, r2              \n"
        "3:                             \n"
        "       sub %0, #4              \n"
+       "       mov r4, r3              \n"
+       "4:                             \n"
+       "       sub %0, #4              \n"
+       "       mov r5, r4              \n"
+       "5:                             \n"
+       "       sub %0, #4              \n"
 //#ifndef __ARMEB__                            /* Little endian bitmasks */
 #if __BYTE_ORDER == __LITTLE_ENDIAN
-       "       tst r3, #0xff           \n"
+       "       tst r5, #0xff           \n"
        "       bne 10f                 \n"
        "       add %0, #1              \n"
-       "       tst r3, #0xff00         \n"
+       "       tst r5, #0xff00         \n"
        "       bne 10f                 \n"
        "       add %0, #1              \n"
-       "       tst r3, #0xff0000       \n"
+       "       tst r5, #0xff0000       \n"
 #else
-       "       tst r3, #0xff000000     \n"
+       "       tst r5, #0xff000000     \n"
        "       bne 10f                 \n"
        "       add %0, #1              \n"
-       "       tst r3, #0xff0000       \n"
+       "       tst r5, #0xff0000       \n"
        "       bne 10f                 \n"
        "       add %0, #1              \n"
-       "       tst r3, #0xff00         \n"
+       "       tst r5, #0xff00         \n"
 #endif
        "       bne 10f                 \n"
        "       add %0, #1              \n"     
        "10:                            \n"
        : "=r"(res)
        : "0"(blk), "r"(end)
-       : "r2", "r3");
+       : "r2", "r3", "r4", "r5");
        return res-blk;
 }
 #define find_nonzero_simd find_nonzero_arm6
@@ -169,6 +180,7 @@
 #define mem_clobber    asm("": : : "memory")
 #define TESTC(sz,routine,rep,tsz)      \
        memset(buf, 0, sz);             \
+       expect = (tsz<sz? tsz: sz);     \
        gettimeofday(&t1, NULL);        \
        for (i = 0; i < rep; ++i) {     \
                mem_clobber;            \
@@ -177,13 +189,15 @@
        gettimeofday(&t2, NULL);        \
        tdiff = t2.tv_sec-t1.tv_sec + 0.000001*(t2.tv_usec-t1.tv_usec); \
        printf("%7i x %20s (%8i): %8i (%6.3fs => %5.0fMB/s)\n", \
-               rep, #routine, sz, ln, tdiff, 
(double)(rep)*(double)(sz+1)/(1024*1024*tdiff));  \
-       if (ln != (tsz<sz? tsz: sz))    \
+               rep, #routine, sz, ln, tdiff, 
(double)(rep)*(double)(expect+1)/(1024*1024*tdiff));      \
+       if (ln != expect)               \
                abort()
 
 
 #define TEST2C(sz,routine,rep,tsz)     \
        memset(buf, 0, tsz);            \
+       expect = (tsz<sz? tsz: sz);     \
+       gettimeofday(&t1, NULL);        \
        buf[sz] = 0x4c;                 \
        gettimeofday(&t1, NULL);        \
        for (i = 0; i < rep; ++i) {     \
@@ -193,22 +207,22 @@
        gettimeofday(&t2, NULL);        \
        tdiff = t2.tv_sec-t1.tv_sec + 0.000001*(t2.tv_usec-t1.tv_usec); \
        printf("%7i x %20s (%8i): %8i (%6.3fs => %5.0fMB/s)\n", \
-               rep, #routine, sz, ln, tdiff, 
(double)(rep)*(double)(sz+1)/(1024*1024*tdiff));  \
-       if (ln != (tsz<sz? tsz: sz))    \
+               rep, #routine, sz, ln, tdiff, 
(double)(rep)*(double)(expect+1)/(1024*1024*tdiff));      \
+       if (ln != expect)               \
                abort()
 
 
 #if defined(HAVE_SIMD)
-#define TEST_SIMD(a,b,c,d) TESTC(a,b,c,d)
-#define TEST2_SIMD(a,b,c,d) TEST2C(a,b,c,d)
+#define TEST_SIMD(a,b,c,d) TESTC(a,b,c*2,d)
+#define TEST2_SIMD(a,b,c,d) TEST2C(a,b,c*2,d)
 #else
 #define TEST_SIMD(a,b,c,d) do {} while (0)
 #define TEST2_SIMD(a,b,c,d) do {} while (0)
 #endif
 
 #ifdef __SSE2__
-#define TEST_SIMD2(a,b,c,d) TESTC(a,b,c,d)
-#define TEST2_SIMD2(a,b,c,d) TEST2C(a,b,c,d)
+#define TEST_SIMD2(a,b,c,d) TESTC(a,b,c*2,d)
+#define TEST2_SIMD2(a,b,c,d) TEST2C(a,b,c*2,d)
 #else
 #define TEST_SIMD2(a,b,c,d) do {} while (0)
 #define TEST2_SIMD2(a,b,c,d) do {} while (0)
@@ -232,7 +246,7 @@
        unsigned char* obuf = (unsigned char*)malloc(SIZE+31);
        unsigned char* buf = (obuf+31)-((unsigned long)(obuf+31)%32);
        struct timeval t1, t2;
-       int i, ln = 0;
+       int i, expect, ln = 0;
        double tdiff;
        int scale = 16;
 #ifdef NEED_SIMD_RUNTIME_DETECTION
@@ -250,50 +264,50 @@
                scale = atoi(argv[1]);
        memset(buf, 0xa5, SIZE);
        
-       TESTC(0, find_nonzero_c, 1024*1024*scale/16, SIZE);
-       TEST_SIMD(0, find_nonzero_simd, 1024*1024*scale/16, SIZE);
-       TESTC(0, find_nonzero, 1024*1024*scale/16, SIZE);
-       TEST_REP(0, find_nonzero_rep, 1024*1024*scale/16, SIZE);
+       TESTC    (0, find_nonzero_c,    1024*512*scale/16, SIZE);
+       TEST_SIMD(0, find_nonzero_simd, 1024*512*scale/16, SIZE);
+       TESTC    (0, find_nonzero,      1024*512*scale/16, SIZE);
+       TEST_REP (0, find_nonzero_rep,  1024*512*scale/16, SIZE);
        
-       TESTC(8*1024-15, find_nonzero_c, 1024*256*scale/16, SIZE);
-       TEST_SIMD(8*1024-15, find_nonzero_simd, 1024*256*scale/16, SIZE);
-       TESTC(8*1024-15, find_nonzero, 1024*256*scale/16, SIZE);
-       TEST_REP(8*1024-15, find_nonzero_rep, 1024*256*scale/16, SIZE);
+       TESTC    (8*1024-15, find_nonzero_c,    1024*128*scale/16, SIZE);
+       TEST_SIMD(8*1024-15, find_nonzero_simd, 1024*128*scale/16, SIZE);
+       TESTC    (8*1024-15, find_nonzero,      1024*128*scale/16, SIZE);
+       TEST_REP (8*1024-15, find_nonzero_rep,  1024*128*scale/16, SIZE);
        buf++;
-       TESTC(8*1024-15, find_nonzero, 1024*256*scale/16, SIZE);
-       TEST_REP(8*1024-15, find_nonzero_rep, 1024*256*scale/16, SIZE);
+       TESTC    (8*1024-15, find_nonzero,      1024*128*scale/16, SIZE);
+       TEST_REP (8*1024-15, find_nonzero_rep,  1024*128*scale/16, SIZE);
        buf--;
-       TESTC(32*1024-9, find_nonzero_c, 1024*64*scale/16, SIZE);
-       TEST_SIMD(32*1024-9, find_nonzero_simd, 1024*64*scale/16, SIZE);
-       TEST_SIMD2(32*1024-9, find_nonzero_sse2o, 1024*64*scale/16, SIZE);
-       TESTC(32*1024-9, find_nonzero, 1024*64*scale/16, SIZE);
-       TEST_REP(32*1024-9, find_nonzero_rep, 1024*64*scale/16, SIZE);
-       TESTC(128*1024-8, find_nonzero_c, 1024*16*scale/16, SIZE);
-       TEST_SIMD(128*1024-8, find_nonzero_simd, 1024*16*scale/16, SIZE);
-       TEST_REP(128*1024-8, find_nonzero_rep, 1024*16*scale/16, SIZE);
-       TESTC(1024*1024-7, find_nonzero_c, 2048*scale/16, SIZE);
-       TEST_SIMD(1024*1024-7, find_nonzero_simd, 2048*scale/16, SIZE);
-       TEST_REP(1024*1024-7, find_nonzero_rep, 2048*scale/16, SIZE);
-       TESTC(4096*1024-1, find_nonzero_c, 512*scale/16, SIZE);
-       TEST_SIMD(4096*1024-1, find_nonzero_simd, 512*scale/16, SIZE);
-       TESTC(16*1024*1024, find_nonzero_c, 128*scale/16, SIZE);
-       TEST_SIMD(16*1024*1024, find_nonzero_simd, 128*scale/16, SIZE);
-       TESTC(64*1024*1024, find_nonzero_c, 32*scale/16, SIZE);
-       TEST_SIMD(64*1024*1024, find_nonzero_simd, 32*scale/16, SIZE);
+       TESTC     (32*1024-9, find_nonzero_c,     1024*32*scale/16, SIZE);
+       TEST_SIMD (32*1024-9, find_nonzero_simd,  1024*32*scale/16, SIZE);
+       TEST_SIMD2(32*1024-9, find_nonzero_sse2o, 1024*32*scale/16, SIZE);
+       TESTC     (32*1024-9, find_nonzero,       1024*32*scale/16, SIZE);
+       TEST_REP  (32*1024-9, find_nonzero_rep,   1024*32*scale/16, SIZE);
+       TESTC    (128*1024-8, find_nonzero_c,    1024*8*scale/16, SIZE);
+       TEST_SIMD(128*1024-8, find_nonzero_simd, 1024*8*scale/16, SIZE);
+       TEST_REP (128*1024-8, find_nonzero_rep,  1024*8*scale/16, SIZE);
+       TESTC    (1024*1024-7, find_nonzero_c,    1024*scale/16, SIZE);
+       TEST_SIMD(1024*1024-7, find_nonzero_simd, 1024*scale/16, SIZE);
+       TEST_REP (1024*1024-7, find_nonzero_rep,  1024*scale/16, SIZE);
+       TESTC    (4096*1024-1, find_nonzero_c,    256*scale/16, SIZE);
+       TEST_SIMD(4096*1024-1, find_nonzero_simd, 256*scale/16, SIZE);
+       TESTC    (16*1024*1024, find_nonzero_c,    64*scale/16, SIZE);
+       TEST_SIMD(16*1024*1024, find_nonzero_simd, 64*scale/16, SIZE);
+       TESTC    (64*1024*1024, find_nonzero_c,    16*scale/16, SIZE);
+       TEST_SIMD(64*1024*1024, find_nonzero_simd, 16*scale/16, SIZE);
        
-       TESTC(64*1024*1024, find_nonzero_c, 1+scale/16, SIZE-16);
+       TESTC    (64*1024*1024, find_nonzero_c,    1+scale/16, SIZE-16);
        TEST_SIMD(64*1024*1024, find_nonzero_simd, 1+scale/16, SIZE-16);
-       TESTC(64*1024*1024, find_nonzero, 1+scale/16, SIZE-16);
-       TEST_REP(64*1024*1024, find_nonzero_rep, 1+scale/16, SIZE-16);
+       TESTC    (64*1024*1024, find_nonzero,      1+scale/16, SIZE-16);
+       TEST_REP (64*1024*1024, find_nonzero_rep,  1+scale/16, SIZE-16);
 
-       TESTC(64*1024*1024, find_nonzero_c, 1+scale/16, SIZE-5);
+       TESTC    (64*1024*1024, find_nonzero_c,    1+scale/16, SIZE-5);
        TEST_SIMD(64*1024*1024, find_nonzero_simd, 1+scale/16, SIZE-5);
-       TESTC(64*1024*1024, find_nonzero, 1+scale/16, SIZE-5);
-       TEST_REP(64*1024*1024, find_nonzero_rep, 1+scale/16, SIZE-5);
+       TESTC    (64*1024*1024, find_nonzero,      1+scale/16, SIZE-5);
+       TEST_REP (64*1024*1024, find_nonzero_rep,  1+scale/16, SIZE-5);
 
-       TEST2C(12*1024*1024, find_nonzero_c, 160*scale/16, SIZE);
-       TEST2_SIMD(12*1024*1024, find_nonzero_simd, 160*scale/16, SIZE);
-       TEST2_SIMD2(12*1024*1024, find_nonzero_sse2o, 160*scale/16, SIZE);
+       TEST2C     (12*1024*1024, find_nonzero_c,     80*scale/16, SIZE);
+       TEST2_SIMD (12*1024*1024, find_nonzero_simd,  80*scale/16, SIZE);
+       TEST2_SIMD2(12*1024*1024, find_nonzero_sse2o, 80*scale/16, SIZE);
 
        free(obuf);
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/find_nonzero.h new/dd_rescue/find_nonzero.h
--- old/dd_rescue/find_nonzero.h        2013-08-02 13:33:21.000000000 +0200
+++ new/dd_rescue/find_nonzero.h        2013-08-08 11:38:53.000000000 +0200
@@ -5,13 +5,14 @@
 
 #ifndef _FIND_NONZERO_H
 #define _FIND_NONZERO_H
-#include <string.h>
-#include <sys/types.h>
 
-#if defined(__GLIBC__) && !defined(HAVE_FFS) && !defined(NOFFS)
-# define HAVE_FFS
+#ifdef HAVE_CONFIG_H
+# include "config.h"
 #endif
 
+#include <string.h>
+#include <sys/types.h>
+
 #ifdef HAVE_FFS
 # define myffs(x) ffs(x)
 # define myffsl(x) ffsl(x)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/fmt_no.c new/dd_rescue/fmt_no.c
--- old/dd_rescue/fmt_no.c      2013-07-22 22:39:24.000000000 +0200
+++ new/dd_rescue/fmt_no.c      2013-08-08 11:38:34.000000000 +0200
@@ -5,6 +5,11 @@
 
 #define _LARGEFILE_SOURCE
 #define _FILE_OFFSET_BITS 64
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "fmt_no.h"
 #include <string.h>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dd_rescue/frandom.c new/dd_rescue/frandom.c
--- old/dd_rescue/frandom.c     2013-06-24 16:40:08.000000000 +0200
+++ new/dd_rescue/frandom.c     2013-08-08 11:38:00.000000000 +0200
@@ -21,6 +21,10 @@
 #include <time.h>
 #include <sys/time.h>
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "frandom.h"
 
 #if defined(__arm__) /* || ... */

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to