summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/pid.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-08-18 21:38:40 +0000
committerLennart Poettering <lennart@poettering.net>2006-08-18 21:38:40 +0000
commite385d93e5aad6a6fce754c00c804ff1d6a6746d4 (patch)
tree0abe352f3228513a912c209f62b0d3e857e62104 /src/pulsecore/pid.c
parent1bc62d5ec671bf3edab5263fdc8015c0a701ce81 (diff)
remove all occurences of
pa_logXXX(__FILE__": and replace them by pa_logXXX(" git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1272 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/pid.c')
-rw-r--r--src/pulsecore/pid.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/pulsecore/pid.c b/src/pulsecore/pid.c
index 044d223d..6e0c085e 100644
--- a/src/pulsecore/pid.c
+++ b/src/pulsecore/pid.c
@@ -57,7 +57,7 @@ static pid_t read_pid(const char *fn, int fd) {
assert(fn && fd >= 0);
if ((r = pa_loop_read(fd, t, sizeof(t)-1, NULL)) < 0) {
- pa_log_warn(__FILE__": WARNING: failed to read PID file '%s': %s",
+ pa_log_warn("WARNING: failed to read PID file '%s': %s",
fn, pa_cstrerror(errno));
return (pid_t) -1;
}
@@ -70,7 +70,7 @@ static pid_t read_pid(const char *fn, int fd) {
*e = 0;
if (pa_atou(t, &pid) < 0) {
- pa_log(__FILE__": WARNING: failed to parse PID file '%s'", fn);
+ pa_log("WARNING: failed to parse PID file '%s'", fn);
return (pid_t) -1;
}
@@ -85,7 +85,7 @@ static int open_pid_file(const char *fn, int mode) {
if ((fd = open(fn, mode, S_IRUSR|S_IWUSR)) < 0) {
if (mode != O_RDONLY || errno != ENOENT)
- pa_log_warn(__FILE__": WARNING: failed to open PID file '%s': %s",
+ pa_log_warn("WARNING: failed to open PID file '%s': %s",
fn, pa_cstrerror(errno));
goto fail;
}
@@ -95,7 +95,7 @@ static int open_pid_file(const char *fn, int mode) {
goto fail;
if (fstat(fd, &st) < 0) {
- pa_log_warn(__FILE__": WARNING: failed to fstat() PID file '%s': %s",
+ pa_log_warn("WARNING: failed to fstat() PID file '%s': %s",
fn, pa_cstrerror(errno));
goto fail;
}
@@ -108,7 +108,7 @@ static int open_pid_file(const char *fn, int mode) {
goto fail;
if (close(fd) < 0) {
- pa_log_warn(__FILE__": WARNING: failed to close file '%s': %s",
+ pa_log_warn("WARNING: failed to close file '%s': %s",
fn, pa_cstrerror(errno));
goto fail;
}
@@ -147,7 +147,7 @@ int pa_pid_file_create(void) {
goto fail;
if ((pid = read_pid(fn, fd)) == (pid_t) -1)
- pa_log(__FILE__": corrupt PID file, overwriting.");
+ pa_log("corrupt PID file, overwriting.");
else if (pid > 0) {
#ifdef OS_IS_WIN32
if ((process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid)) != NULL) {
@@ -155,16 +155,16 @@ int pa_pid_file_create(void) {
#else
if (kill(pid, 0) >= 0 || errno != ESRCH) {
#endif
- pa_log(__FILE__": daemon already running.");
+ pa_log("daemon already running.");
goto fail;
}
- pa_log(__FILE__": stale PID file, overwriting.");
+ pa_log("stale PID file, overwriting.");
}
/* Overwrite the current PID file */
if (lseek(fd, 0, SEEK_SET) == (off_t) -1 || ftruncate(fd, 0) < 0) {
- pa_log(__FILE__": failed to truncate PID file '%s': %s",
+ pa_log("failed to truncate PID file '%s': %s",
fn, pa_cstrerror(errno));
goto fail;
}
@@ -173,7 +173,7 @@ int pa_pid_file_create(void) {
l = strlen(t);
if (pa_loop_write(fd, t, l, NULL) != (ssize_t) l) {
- pa_log(__FILE__": failed to write PID file.");
+ pa_log("failed to write PID file.");
goto fail;
}
@@ -198,7 +198,7 @@ int pa_pid_file_remove(void) {
pa_runtime_path("pid", fn, sizeof(fn));
if ((fd = open_pid_file(fn, O_RDWR)) < 0) {
- pa_log_warn(__FILE__": WARNING: failed to open PID file '%s': %s",
+ pa_log_warn("WARNING: failed to open PID file '%s': %s",
fn, pa_cstrerror(errno));
goto fail;
}
@@ -207,12 +207,12 @@ int pa_pid_file_remove(void) {
goto fail;
if (pid != getpid()) {
- pa_log(__FILE__": WARNING: PID file '%s' not mine!", fn);
+ pa_log("WARNING: PID file '%s' not mine!", fn);
goto fail;
}
if (ftruncate(fd, 0) < 0) {
- pa_log_warn(__FILE__": WARNING: failed to truncate PID file '%s': %s",
+ pa_log_warn("WARNING: failed to truncate PID file '%s': %s",
fn, pa_cstrerror(errno));
goto fail;
}
@@ -224,7 +224,7 @@ int pa_pid_file_remove(void) {
#endif
if (unlink(fn) < 0) {
- pa_log_warn(__FILE__": WARNING: failed to remove PID file '%s': %s",
+ pa_log_warn("WARNING: failed to remove PID file '%s': %s",
fn, pa_cstrerror(errno));
goto fail;
}