X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fudev%2Fata_id%2Fata_id.c;h=f84281dd1a2480faab65c7cfbc8d8204fabdb2b1;hp=28e9acb296bf2b628d759a0a5835f9e9d7ebb611;hb=9ea28c55a2488e6cd4a44ac5786f12b71ad5bc9f;hpb=9091e686f43184065381aa71929e3df36a4ea2e1 diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c index 28e9acb29..f84281dd1 100644 --- a/src/udev/ata_id/ata_id.c +++ b/src/udev/ata_id/ata_id.c @@ -463,14 +463,14 @@ int main(int argc, char *argv[]) node = argv[optind]; if (node == NULL) { - log_error("no node specified\n"); + log_error("no node specified"); rc = 1; goto exit; } - fd = open(node, O_RDONLY|O_NONBLOCK); + fd = open(node, O_RDONLY|O_NONBLOCK|O_CLOEXEC); if (fd < 0) { - log_error("unable to open '%s'\n", node); + log_error("unable to open '%s'", node); rc = 1; goto exit; } @@ -502,7 +502,7 @@ int main(int argc, char *argv[]) } else { /* If this fails, then try HDIO_GET_IDENTITY */ if (ioctl(fd, HDIO_GET_IDENTITY, &id) != 0) { - log_debug("HDIO_GET_IDENTITY failed for '%s': %m\n", node); + log_debug("HDIO_GET_IDENTITY failed for '%s': %m", node); rc = 2; goto close; }