aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2014-02-18 08:51:30 +0100
committerDaniel Lezcano <daniel.lezcano@free.fr>2014-02-18 08:51:30 +0100
commit7ea55129d4947203b9177e47ecc66631a427e950 (patch)
tree5cae73dd0e1f08effd6cd3d5174f59622a0bfb21
parentda6a8c94a8f8124711db0ae84a3ef4e0e186b388 (diff)
Write open failure message to stderr
Error message should be written to stderr rather than the failed to open file. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--idlestat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/idlestat.c b/idlestat.c
index 3abfaaf..fce6112 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -659,7 +659,7 @@ static int idlestat_file_for_each_line(const char *path, void *data,
f = fopen(path, "r");
if (!f) {
- fprintf(f, "failed to open '%s': %m\n", path);
+ fprintf(stderr, "failed to open '%s': %m\n", path);
return -1;
}