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:
parent
993e7d7044
commit
56d592866c
@ -316,12 +316,12 @@ get_pid(const char *pidfile)
|
||||
return -1;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user