summaryrefslogtreecommitdiff
path: root/src/udev/collect
diff options
context:
space:
mode:
authorDaniel Buch <boogiewasthere@gmail.com>2013-11-26 09:38:02 +0100
committerDavid Strauss <david@davidstrauss.net>2013-11-26 21:07:46 +1000
commitf5f6d0e25574dd63fb605b81fa7767dd71c454db (patch)
tree3ec0b42888ce9b6895ec264c2a18a394c6d3db3e /src/udev/collect
parent34a6dc7dcaa47a9efe083acc6f5fc6263414465e (diff)
tree-wide usage of %m specifier instead of strerror(errno)
Also for log_error() except where a specific error is specified e.g. errno ? strerror(errno) : "Some user specified message"
Diffstat (limited to 'src/udev/collect')
-rw-r--r--src/udev/collect/collect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index 1346f27f91..2bbbcd7106 100644
--- a/src/udev/collect/collect.c
+++ b/src/udev/collect/collect.c
@@ -97,7 +97,7 @@ static int prepare(char *dir, char *filename)
fd = open(buf,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
if (fd < 0)
- fprintf(stderr, "Cannot open %s: %s\n", buf, strerror(errno));
+ fprintf(stderr, "Cannot open %s: %m\n", buf);
if (lockf(fd,F_TLOCK,0) < 0) {
if (debug)
@@ -109,7 +109,7 @@ static int prepare(char *dir, char *filename)
fprintf(stderr, "Acquired lock on %s\n", buf);
} else {
if (debug)
- fprintf(stderr, "Could not get lock on %s: %s\n", buf, strerror(errno));
+ fprintf(stderr, "Could not get lock on %s: %m\n", buf);
}
}
@@ -404,7 +404,7 @@ int main(int argc, char **argv)
us = argv[argi++];
if (signal(SIGALRM, sig_alrm) == SIG_ERR) {
- fprintf(stderr, "Cannot set SIGALRM: %s\n", strerror(errno));
+ fprintf(stderr, "Cannot set SIGALRM: %m\n");
ret = 2;
goto exit;
}