summaryrefslogtreecommitdiff
path: root/extras/cdrom_id
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-08-18 04:48:43 +0200
committerKay Sievers <kay.sievers@suse.de>2005-08-18 04:48:43 +0200
commit5097a6ca426a4e4553c032a3be8a639cbdb77362 (patch)
treecc604adebea38887fec8a5a92327c076585a017a /extras/cdrom_id
parentf7a144a5be4af01c8bce13632c9a46b2653e3398 (diff)
parenta961dcbf0dabc91c0c6f9fde6195fe8209574d48 (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/hotplug/udev
Diffstat (limited to 'extras/cdrom_id')
-rw-r--r--extras/cdrom_id/cdrom_id.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 3d62781186..941a2facfe 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -107,24 +107,21 @@ int main(int argc, char *argv[])
node = arg;
}
if (!node) {
- err("no node specified");
+ info("no node specified");
rc = 1;
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);
+ info("unable to open '%s'", node);
rc = 1;
goto exit;
}
result = ioctl(fd, CDROM_GET_CAPABILITY, NULL);
if (result < 0) {
- err("CDROM_GET_CABILITY failed for '%s'", node);
+ info("CDROM_GET_CABILITY failed for '%s'", node);
rc = 3;
goto close;
}