1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

ata_id: open volume O_NONBLOCK

Opticals like that and should be ok for disks too, as long as we
don't read().

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
Kay Sievers 2005-09-16 21:23:36 +02:00
parent 4b12433517
commit 3515c0ad00

View File

@ -122,10 +122,7 @@ int main(int argc, char *argv[])
goto exit;
}
fd = open(node, O_RDONLY);
if (fd < 0)
if (errno == ENOMEDIUM)
fd = open(node, O_RDONLY|O_NONBLOCK);
fd = open(node, O_RDONLY|O_NONBLOCK);
if (fd < 0) {
err("unable to open '%s'", node);
rc = 1;