diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-08-17 16:09:03 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-08-17 16:09:03 -0700 |
commit | fc046d4d08f686bcdb91c015b5b35c35e2c205a0 (patch) | |
tree | c65fe185127ebfd6120a3b1e81e291f8680afd03 /extras/cdrom_id/cdrom_id.c | |
parent | 5618b5611bccf64a1e22f8cbcebe8ecba9713c9c (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/cdrom_id/cdrom_id.c')
-rw-r--r-- | extras/cdrom_id/cdrom_id.c | 5 |
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; |