summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2013-09-30 16:55:25 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-10-08 12:06:09 -0500
commit5b4886d23e33dda68623def2d59745fd72ac4c53 (patch)
tree304116cb7eeac33c379e125e531fca95c267fbad
parent2a53efbc073d8f5226e1b1609b6667398e51b91f (diff)
downloadopenrc-5b4886d23e33dda68623def2d59745fd72ac4c53.tar.gz
openrc-5b4886d23e33dda68623def2d59745fd72ac4c53.tar.bz2
openrc-5b4886d23e33dda68623def2d59745fd72ac4c53.tar.xz
start-stop-daemon: fix eerorr calls in get_pid
The eerror calls in this function make it too verbose, so change them to ewarnv() calls instead. This means that they will only print if the --verbose option is used or EINFO_VERBOSE=yes is set in the environment.
-rw-r--r--src/rc/start-stop-daemon.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index 5576d49..0813eff 100644
--- a/src/rc/start-stop-daemon.c
+++ b/src/rc/start-stop-daemon.c
@@ -316,14 +316,12 @@ get_pid(const char *pidfile, bool quiet)
return -1;
if ((fp = fopen(pidfile, "r")) == NULL) {
- if (!quiet)
- eerror("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
+ ewarnv("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
return -1;
}
if (fscanf(fp, "%d", &pid) != 1) {
- if (!quiet)
- eerror("%s: no pid found in `%s'", applet, pidfile);
+ ewarnv("%s: no pid found in `%s'", applet, pidfile);
fclose(fp);
return -1;
}