mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
change pa_log() and friends to not require a trailing \n on all logged strings
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@574 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
cb59817b4a
commit
4a64b0d116
74 changed files with 558 additions and 532 deletions
|
|
@ -52,7 +52,7 @@ static int generate(int fd, void *ret_data, size_t length) {
|
|||
ftruncate(fd, 0);
|
||||
|
||||
if ((r = pa_loop_write(fd, ret_data, length)) < 0 || (size_t) r != length) {
|
||||
pa_log(__FILE__": failed to write cookie file: %s\n", strerror(errno));
|
||||
pa_log(__FILE__": failed to write cookie file: %s", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ static int load(const char *fn, void *data, size_t length) {
|
|||
|
||||
if ((fd = open(fn, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR)) < 0) {
|
||||
if (errno != EACCES || (fd = open(fn, O_RDONLY)) < 0) {
|
||||
pa_log(__FILE__": failed to open cookie file '%s': %s\n", fn, strerror(errno));
|
||||
pa_log(__FILE__": failed to open cookie file '%s': %s", fn, strerror(errno));
|
||||
goto finish;
|
||||
} else
|
||||
writable = 0;
|
||||
|
|
@ -79,14 +79,14 @@ static int load(const char *fn, void *data, size_t length) {
|
|||
unlock = pa_lock_fd(fd, 1) >= 0;
|
||||
|
||||
if ((r = pa_loop_read(fd, data, length)) < 0) {
|
||||
pa_log(__FILE__": failed to read cookie file '%s': %s\n", fn, strerror(errno));
|
||||
pa_log(__FILE__": failed to read cookie file '%s': %s", fn, strerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if ((size_t) r != length) {
|
||||
|
||||
if (!writable) {
|
||||
pa_log(__FILE__": unable to write cookie to read only file\n");
|
||||
pa_log(__FILE__": unable to write cookie to read only file");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ int pa_authkey_load(const char *path, void *data, size_t length) {
|
|||
ret = load(path, data, length);
|
||||
|
||||
if (ret < 0)
|
||||
pa_log(__FILE__": Failed to load authorization key '%s': %s\n", path,
|
||||
pa_log(__FILE__": Failed to load authorization key '%s': %s", path,
|
||||
(ret == -1) ? strerror(errno) : "file corrupt");
|
||||
|
||||
return ret;
|
||||
|
|
@ -175,14 +175,14 @@ int pa_authkey_save(const char *fn, const void *data, size_t length) {
|
|||
return -2;
|
||||
|
||||
if ((fd = open(p, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR)) < 0) {
|
||||
pa_log(__FILE__": failed to open cookie file '%s': %s\n", fn, strerror(errno));
|
||||
pa_log(__FILE__": failed to open cookie file '%s': %s", fn, strerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
unlock = pa_lock_fd(fd, 1) >= 0;
|
||||
|
||||
if ((r = pa_loop_write(fd, data, length)) < 0 || (size_t) r != length) {
|
||||
pa_log(__FILE__": failed to read cookie file '%s': %s\n", fn, strerror(errno));
|
||||
pa_log(__FILE__": failed to read cookie file '%s': %s", fn, strerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue