From 5fc79ef6dcec6751ef0d62b6db9e446208509636 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 5 Jan 2011 15:06:10 +0000 Subject: [PATCH] Add sys_debug loging for unlink This unlink intentionally silently ignores any errors. It's still worth to trace its error status in debug mode. --- lib/format_text/archiver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c index 3d291c8f8..e0212a216 100644 --- a/lib/format_text/archiver.c +++ b/lib/format_text/archiver.c @@ -261,7 +261,9 @@ int backup_remove(struct cmd_context *cmd, const char *vg_name) /* * Let this fail silently. */ - unlink(path); + if (unlink(path)) + log_sys_debug("unlink", path); + return 1; }