chiark / gitweb /
Merge rsync://rsync.kernel.org/pub/scm/linux/hotplug/udev
authorKay Sievers <kay.sievers@suse.de>
Thu, 18 Aug 2005 02:48:43 +0000 (04:48 +0200)
committerKay Sievers <kay.sievers@suse.de>
Thu, 18 Aug 2005 02:48:43 +0000 (04:48 +0200)
extras/cdrom_id/cdrom_id.c

index 3d627811867b3f848831f6ee324838a2336eaf88..941a2facfec3b55d795411b90c51ad42624f23df 100644 (file)
@@ -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;
        }