File ddrescue-fsync.diff of Package ddrescue

When dd_rescuing to /dev/null, there is a constant warning about
Invalid argument. This is because /dev/null does not support the
fsync operation.

https://bugzilla.novell.com/517947

---
 dd_rescue.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: dd_rescue/dd_rescue.c
===================================================================
--- dd_rescue.orig/dd_rescue.c
+++ dd_rescue/dd_rescue.c
@@ -199,7 +199,7 @@ void printstatus(FILE* const file1, FILE
 
 	if (sync) {
 		int err = fsync(odes);
-		if (err)
+		if (err && errno != EINVAL)
 			fplog(stderr, "dd_rescue: (warning): %s (%.1fk): %s!    \n", 
 			      oname, (float)ipos/1024, strerror(errno));
 	}
openSUSE Build Service is sponsored by