chiark / gitweb /
cdrom_id: add Xen cdrom support
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 16 Apr 2009 22:29:56 +0000 (00:29 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 16 Apr 2009 22:29:56 +0000 (00:29 +0200)
extras/cdrom_id/60-cdrom_id.rules
extras/cdrom_id/cdrom_id.c

index 12fbf637795f569838ae57aca7e53990e34283b8..a3e8e3c7668faa93224c420db4c43282d352398c 100644 (file)
@@ -1,3 +1,5 @@
-# import optical drive properties
+# do not edit this file, it will be overwritten on update
 
-ACTION=="add|change", KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
+# import optical drive properties
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", \
+  KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]|xvd*", IMPORT{program}="cdrom_id --export $tempnode"
index 7be0789f35bc2bf92013a2571fefb22c07eb7430..c578f12921a0113ceb5180f6404634011ac0dee3 100644 (file)
@@ -567,10 +567,8 @@ int main(int argc, char *argv[])
        }
 
        /* check drive */
-       if (cd_inquiry(udev, fd) < 0) {
-               rc = 2;
-               goto exit;
-       }
+       if (cd_inquiry(udev, fd) < 0)
+               goto print;
 
        /* read drive and possibly current profile */
        if (cd_profiles(udev, fd) < 0)