From: Colin Ian King colin.king@canonical.com
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 --- idlestat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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; }