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.
This commit is contained in:
William Hubbs 2013-09-30 16:55:25 -05:00
parent 993e7d7044
commit 56d592866c

View File

@ -316,12 +316,12 @@ get_pid(const char *pidfile)
return -1; return -1;
if ((fp = fopen(pidfile, "r")) == NULL) { if ((fp = fopen(pidfile, "r")) == NULL) {
eerror("%s: fopen `%s': %s", applet, pidfile, strerror(errno)); ewarnv("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
return -1; return -1;
} }
if (fscanf(fp, "%d", &pid) != 1) { if (fscanf(fp, "%d", &pid) != 1) {
eerror("%s: no pid found in `%s'", applet, pidfile); ewarnv("%s: no pid found in `%s'", applet, pidfile);
fclose(fp); fclose(fp);
return -1; return -1;
} }