summaryrefslogtreecommitdiff
path: root/src/udev/ata_id/ata_id.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-04-08 16:06:20 +0200
committerKay Sievers <kay@vrfy.org>2012-04-08 16:06:20 +0200
commitbaa30fbc2c04b23209d0b8fb3c86cd15ef9ea81a (patch)
tree5a98ddb8cdebeb608526a708dbd5fcc307840a84 /src/udev/ata_id/ata_id.c
parent64661ee70d5a10c6208a1cb66ecd8b158e2d8bc5 (diff)
udev: switch to systemd logging functions
Diffstat (limited to 'src/udev/ata_id/ata_id.c')
-rw-r--r--src/udev/ata_id/ata_id.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c
index d2fe917217..fe160bf1ee 100644
--- a/src/udev/ata_id/ata_id.c
+++ b/src/udev/ata_id/ata_id.c
@@ -43,6 +43,7 @@
#include "libudev.h"
#include "libudev-private.h"
+#include "log.h"
#define COMMAND_TIMEOUT_MSEC (30 * 1000)
@@ -462,7 +463,7 @@ int main(int argc, char *argv[])
if (udev == NULL)
goto exit;
- udev_log_init("ata_id");
+ log_open();
udev_set_log_fn(udev, log_fn);
while (1) {
@@ -486,14 +487,14 @@ int main(int argc, char *argv[])
node = argv[optind];
if (node == NULL) {
- err(udev, "no node specified\n");
+ log_error("no node specified\n");
rc = 1;
goto exit;
}
fd = open(node, O_RDONLY|O_NONBLOCK);
if (fd < 0) {
- err(udev, "unable to open '%s'\n", node);
+ log_error("unable to open '%s'\n", node);
rc = 1;
goto exit;
}
@@ -525,7 +526,7 @@ int main(int argc, char *argv[])
} else {
/* If this fails, then try HDIO_GET_IDENTITY */
if (ioctl(fd, HDIO_GET_IDENTITY, &id) != 0) {
- info(udev, "HDIO_GET_IDENTITY failed for '%s': %m\n", node);
+ log_info("HDIO_GET_IDENTITY failed for '%s': %m\n", node);
rc = 2;
goto close;
}
@@ -709,6 +710,6 @@ close:
close(fd);
exit:
udev_unref(udev);
- udev_log_close();
+ log_close();
return rc;
}