diff options
author | Max Kellermann <max@duempel.org> | 2012-03-06 22:06:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-03-06 22:06:08 +0100 |
commit | 5016839b90274017696e0942f424d4f361d39ea2 (patch) | |
tree | e106c4f95f413b6b8252ff867586460cc63931c6 /src/output | |
parent | faf35e6082a8c685140820f334b5c4ecc9ce6666 (diff) | |
download | mpd-5016839b90274017696e0942f424d4f361d39ea2.tar.gz mpd-5016839b90274017696e0942f424d4f361d39ea2.tar.xz mpd-5016839b90274017696e0942f424d4f361d39ea2.zip |
use g_strerror() instead of strerror()
Make sure we get a UTF-8 encoded string.
Diffstat (limited to '')
-rw-r--r-- | src/output/ao_output_plugin.c | 2 | ||||
-rw-r--r-- | src/output/fifo_output_plugin.c | 12 | ||||
-rw-r--r-- | src/output/mvp_output_plugin.c | 14 | ||||
-rw-r--r-- | src/output/oss_output_plugin.c | 10 |
4 files changed, 19 insertions, 19 deletions
diff --git a/src/output/ao_output_plugin.c b/src/output/ao_output_plugin.c index c0790681e..d7e577fa4 100644 --- a/src/output/ao_output_plugin.c +++ b/src/output/ao_output_plugin.c @@ -74,7 +74,7 @@ ao_output_error(GError **error_r) break; default: - error = strerror(errno); + error = g_strerror(errno); } g_set_error(error_r, ao_output_quark(), errno, diff --git a/src/output/fifo_output_plugin.c b/src/output/fifo_output_plugin.c index b8f405624..022be0b4a 100644 --- a/src/output/fifo_output_plugin.c +++ b/src/output/fifo_output_plugin.c @@ -83,7 +83,7 @@ static void fifo_delete(struct fifo_data *fd) if (unlink(fd->path) < 0) { g_warning("Could not remove FIFO \"%s\": %s", - fd->path, strerror(errno)); + fd->path, g_strerror(errno)); return; } @@ -115,7 +115,7 @@ fifo_make(struct fifo_data *fd, GError **error) if (mkfifo(fd->path, 0666) < 0) { g_set_error(error, fifo_output_quark(), errno, "Couldn't create FIFO \"%s\": %s", - fd->path, strerror(errno)); + fd->path, g_strerror(errno)); return false; } @@ -137,7 +137,7 @@ fifo_check(struct fifo_data *fd, GError **error) g_set_error(error, fifo_output_quark(), errno, "Failed to stat FIFO \"%s\": %s", - fd->path, strerror(errno)); + fd->path, g_strerror(errno)); return false; } @@ -161,7 +161,7 @@ fifo_open(struct fifo_data *fd, GError **error) if (fd->input < 0) { g_set_error(error, fifo_output_quark(), errno, "Could not open FIFO \"%s\" for reading: %s", - fd->path, strerror(errno)); + fd->path, g_strerror(errno)); fifo_close(fd); return false; } @@ -170,7 +170,7 @@ fifo_open(struct fifo_data *fd, GError **error) if (fd->output < 0) { g_set_error(error, fifo_output_quark(), errno, "Could not open FIFO \"%s\" for writing: %s", - fd->path, strerror(errno)); + fd->path, g_strerror(errno)); fifo_close(fd); return false; } @@ -255,7 +255,7 @@ fifo_output_cancel(struct audio_output *ao) if (bytes < 0 && errno != EAGAIN) { g_warning("Flush of FIFO \"%s\" failed: %s", - fd->path, strerror(errno)); + fd->path, g_strerror(errno)); } } diff --git a/src/output/mvp_output_plugin.c b/src/output/mvp_output_plugin.c index aec09248f..37e0f7c93 100644 --- a/src/output/mvp_output_plugin.c +++ b/src/output/mvp_output_plugin.c @@ -128,7 +128,7 @@ mvp_output_test_default_device(void) } g_warning("Error opening PCM device \"/dev/adec_pcm\": %s\n", - strerror(errno)); + g_strerror(errno)); return false; } @@ -245,32 +245,32 @@ mvp_output_open(struct audio_output *ao, struct audio_format *audio_format, if (md->fd < 0) { g_set_error(error, mvp_output_quark(), errno, "Error opening /dev/adec_pcm: %s", - strerror(errno)); + g_strerror(errno)); return false; } if (ioctl(md->fd, MVP_SET_AUD_SRC, 1) < 0) { g_set_error(error, mvp_output_quark(), errno, "Error setting audio source: %s", - strerror(errno)); + g_strerror(errno)); return false; } if (ioctl(md->fd, MVP_SET_AUD_STREAMTYPE, 0) < 0) { g_set_error(error, mvp_output_quark(), errno, "Error setting audio streamtype: %s", - strerror(errno)); + g_strerror(errno)); return false; } if (ioctl(md->fd, MVP_SET_AUD_FORMAT, &mix) < 0) { g_set_error(error, mvp_output_quark(), errno, "Error setting audio format: %s", - strerror(errno)); + g_strerror(errno)); return false; } ioctl(md->fd, MVP_SET_AUD_STC, &stc); if (ioctl(md->fd, MVP_SET_AUD_BYPASS, 1) < 0) { g_set_error(error, mvp_output_quark(), errno, "Error setting audio streamtype: %s", - strerror(errno)); + g_strerror(errno)); return false; } @@ -326,7 +326,7 @@ mvp_output_play(struct audio_output *ao, const void *chunk, size_t size, continue; g_set_error(error, mvp_output_quark(), errno, - "Failed to write: %s", strerror(errno)); + "Failed to write: %s", g_strerror(errno)); return 0; } } diff --git a/src/output/oss_output_plugin.c b/src/output/oss_output_plugin.c index b2b491c9c..f98d01914 100644 --- a/src/output/oss_output_plugin.c +++ b/src/output/oss_output_plugin.c @@ -139,7 +139,7 @@ oss_output_test_default_device(void) return true; } g_warning("Error opening OSS device \"%s\": %s\n", - default_devices[i], strerror(errno)); + default_devices[i], g_strerror(errno)); } return false; @@ -184,7 +184,7 @@ oss_open_default(GError **error) break; case OSS_STAT_OTHER: g_warning("Error accessing %s: %s\n", - dev, strerror(err[i])); + dev, g_strerror(err[i])); } } @@ -578,7 +578,7 @@ oss_reopen(struct oss_data *od, GError **error_r) if (od->fd < 0) { g_set_error(error_r, oss_output_quark(), errno, "Error opening OSS device \"%s\": %s", - od->device, strerror(errno)); + od->device, g_strerror(errno)); return false; } @@ -632,7 +632,7 @@ oss_output_open(struct audio_output *ao, struct audio_format *audio_format, if (od->fd < 0) { g_set_error(error, oss_output_quark(), errno, "Error opening OSS device \"%s\": %s", - od->device, strerror(errno)); + od->device, g_strerror(errno)); return false; } @@ -683,7 +683,7 @@ oss_output_play(struct audio_output *ao, const void *chunk, size_t size, if (ret < 0 && errno != EINTR) { g_set_error(error, oss_output_quark(), errno, "Write error on %s: %s", - od->device, strerror(errno)); + od->device, g_strerror(errno)); return 0; } } |