]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/udev/udev-builtin-blkid.c
Merge pull request #16316 from yuwata/backlight-use-actual-brightness
[thirdparty/systemd.git] / src / udev / udev-builtin-blkid.c
index 7ef75e6f919fc05b04c652574d75478718991fd2..1df41dab36bc34d9a21cbb491a9e5cd5cbd141f8 100644 (file)
@@ -5,13 +5,11 @@
  * Copyright © 2011 Karel Zak <kzak@redhat.com>
  */
 
-#include <blkid.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <sys/stat.h>
 
 #include "sd-id128.h"
@@ -19,7 +17,7 @@
 #include "alloc-util.h"
 #include "blkid-util.h"
 #include "device-util.h"
-#include "efivars.h"
+#include "efi-loader.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "gpt.h"
@@ -266,7 +264,7 @@ static int builtin_blkid(sd_device *dev, int argc, char *argv[], bool test) {
         if (r < 0)
                 return log_device_debug_errno(dev, r, "Failed to get device name: %m");
 
-        fd = open(devnode, O_RDONLY|O_CLOEXEC);
+        fd = open(devnode, O_RDONLY|O_CLOEXEC|O_NONBLOCK);
         if (fd < 0)
                 return log_device_debug_errno(dev, errno, "Failed to open block device %s: %m", devnode);