diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libefi/rdwr_efi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libefi/rdwr_efi.c b/lib/libefi/rdwr_efi.c index 19a573c0b..147e30a37 100644 --- a/lib/libefi/rdwr_efi.c +++ b/lib/libefi/rdwr_efi.c @@ -506,16 +506,17 @@ int efi_rescan(int fd) { #if defined(__linux__) - int retry = 5; + int retry = 10; int error; /* Notify the kernel a devices partition table has been updated */ while ((error = ioctl(fd, BLKRRPART)) != 0) { - if (--retry == 0) { + if ((--retry == 0) || (errno != EBUSY)) { (void) fprintf(stderr, "the kernel failed to rescan " "the partition table: %d\n", errno); return (-1); } + usleep(50000); } #endif |