Always open the cdrom drive in non-blocking mode in cdrom_id

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Greg Kroah-Hartman
2005-08-17 16:09:03 -07:00
parent 5618b5611b
commit fc046d4d08

View File

@@ -112,10 +112,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;