* 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"
#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"
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);