[PATCH] suppress useless diagnostic about failed unlink
Jim Meyering
jim at meyering.net
Mon Jun 6 17:02:44 UTC 2011
Looking at the test suite logs, I saw that t/exercise.log was 20MB(!).
This removes some of it.
>From 5538d24c8b54ee4275d405c1fb1338556669fc9d Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Mon, 6 Jun 2011 19:00:56 +0200
Subject: [PATCH] suppress useless diagnostic about failed unlink
There were 20k of these in the log from running t/exercise.
* backend.c (fs_put_child): Don't complain about failed unlink
if it's due to ENOENT.
---
backend.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend.c b/backend.c
index cbb7960..251d730 100644
--- a/backend.c
+++ b/backend.c
@@ -1268,8 +1268,8 @@ fs_put_child (void * ctx)
error(0,0,_("path too long in %s"),__func__);
return NULL;
}
- if (unlink(fixed) < 0) {
- error(0,errno,_("unlink failed for %s (non-fatal)"),fixed);
+ if (unlink(fixed) < 0 && errno != ENOENT) {
+ error(0,errno,_("unlink failed for %s"),fixed);
}
fd = open(fixed,O_WRONLY|O_CREAT|O_EXCL,0666);
if (fd < 0) {
--
1.7.6.rc0.254.gf37de
More information about the iwhd-devel
mailing list