diff options
author | Alan Jenkins <alan-jenkins@tuffmail.co.uk> | 2008-09-29 16:01:32 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-29 17:06:00 +0200 |
commit | 659353f5a9a52336c41cf595d933311b8dc48937 (patch) | |
tree | 1a12cc4fd2ec90db52a0f586e08a2f49a6ca8306 /udev/udevadm-monitor.c | |
parent | 5c0f595d91a21b1fba2b9edd89511a072036d0e8 (diff) |
replace strerror() usage with threadsafe "%m" format string
strerror() is not threadsafe. It uses a buffer to build messages of the form
"Unknown error 387689".
syslog() provides a %m format which is equivalent to strerror(errno).
As a GNU extension, this is also accepted by printf and friends.
At least in the current implementation, it is correctly threadsafe.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Diffstat (limited to 'udev/udevadm-monitor.c')
-rw-r--r-- | udev/udevadm-monitor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c index 01126c9951..d5992ceb6c 100644 --- a/udev/udevadm-monitor.c +++ b/udev/udevadm-monitor.c @@ -168,7 +168,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) &readfds, NULL, NULL, NULL); if (fdcount < 0) { if (errno != EINTR) - fprintf(stderr, "error receiving uevent message: %s\n", strerror(errno)); + fprintf(stderr, "error receiving uevent message: %m\n"); continue; } |