summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-08-17 16:09:03 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2005-08-17 16:09:03 -0700
commitfc046d4d08f686bcdb91c015b5b35c35e2c205a0 (patch)
treec65fe185127ebfd6120a3b1e81e291f8680afd03 /extras
parent5618b5611bccf64a1e22f8cbcebe8ecba9713c9c (diff)
Always open the cdrom drive in non-blocking mode in cdrom_id
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'extras')
-rw-r--r--extras/cdrom_id/cdrom_id.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 3d62781186..c561112d30 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -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;