]> err.no Git - systemd/commit
replace strerror() usage with threadsafe "%m" format string
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Mon, 29 Sep 2008 15:01:32 +0000 (16:01 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 29 Sep 2008 15:06:00 +0000 (17:06 +0200)
commit659353f5a9a52336c41cf595d933311b8dc48937
tree1a12cc4fd2ec90db52a0f586e08a2f49a6ca8306
parent5c0f595d91a21b1fba2b9edd89511a072036d0e8
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>
15 files changed:
udev/lib/libudev-ctrl.c
udev/lib/libudev-device.c
udev/lib/libudev-monitor.c
udev/lib/libudev.c
udev/udev_db.c
udev/udev_device_event.c
udev/udev_node.c
udev/udev_rules.c
udev/udev_rules_parse.c
udev/udev_sysfs.c
udev/udev_utils.c
udev/udev_utils_file.c
udev/udevadm-monitor.c
udev/udevadm-trigger.c
udev/udevd.c