aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-02 05:29:22 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-02 05:29:22 +0000
commit1d939538eb7f21545b7d0af71f96fc812a340670 (patch)
tree563b426b2646cc333ad53625a79494c588c35f8a
parent46792b175f3ef496a2247a89404b9d06ffe53688 (diff)
downloadmpd-1d939538eb7f21545b7d0af71f96fc812a340670.tar.gz
mpd-1d939538eb7f21545b7d0af71f96fc812a340670.tar.xz
mpd-1d939538eb7f21545b7d0af71f96fc812a340670.zip
a few extra strerror()'s sprinkled in the code
git-svn-id: https://svn.musicpd.org/mpd/trunk@2467 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/conf.c4
-rw-r--r--src/playlist.c6
-rw-r--r--src/sig_handlers.c1
-rw-r--r--src/signal_check.c2
4 files changed, 7 insertions, 6 deletions
diff --git a/src/conf.c b/src/conf.c
index 72bec5623..8fb50e7e4 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -31,6 +31,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
+#include <errno.h>
#define MAX_STRING_SIZE MAXPATHLEN+80
@@ -228,7 +229,8 @@ void readConf(char * file) {
ConfigParam * param;
if(!(fp=fopen(file,"r"))) {
- ERROR("problems opening file %s for reading\n",file);
+ ERROR("problems opening file %s for reading: %s\n", file,
+ strerror(errno));
exit(EXIT_FAILURE);
}
diff --git a/src/playlist.c b/src/playlist.c
index 580a2e1ec..2c7492774 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -258,7 +258,8 @@ void savePlaylistState() {
while(!(fp = fopen(playlist_stateFile,"w")) && errno==EINTR);
if(!fp) {
ERROR("problems opening state file \"%s\" for "
- "writing\n",playlist_stateFile);
+ "writing: %s\n", playlist_stateFile,
+ sterror(errno));
return;
}
@@ -353,7 +354,8 @@ void readPlaylistState() {
fp = fopen(playlist_stateFile,"r");
if(!fp) {
ERROR("problems opening state file \"%s\" for "
- "reading\n",playlist_stateFile);
+ "reading: %s\n", playlist_stateFile,
+ strerror(errno));
exit(EXIT_FAILURE);
}
diff --git a/src/sig_handlers.c b/src/sig_handlers.c
index 84243bf45..a3ac478cb 100644
--- a/src/sig_handlers.c
+++ b/src/sig_handlers.c
@@ -126,4 +126,3 @@ void unblockSignals() {
sigaddset(&sset,SIGTERM);
while(sigprocmask(SIG_UNBLOCK,&sset,NULL)<0 && errno==EINTR);
}
-/* vim:set shiftwidth=4 tabstop=8 expandtab: */
diff --git a/src/signal_check.c b/src/signal_check.c
index fc9d486cc..68481730c 100644
--- a/src/signal_check.c
+++ b/src/signal_check.c
@@ -56,5 +56,3 @@ void signal_clear(int sig)
{
__caught_signals[sig] = 0;
}
-
-/* vim:set shiftwidth=4 tabstop=8 expandtab: */