From: Kay Sievers Date: Thu, 16 Apr 2009 22:29:56 +0000 (+0200) Subject: cdrom_id: add Xen cdrom support X-Git-Tag: 174~1092 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55d8f5e208396589476583dad8f2a7f2db3e2ef5;p=systemd cdrom_id: add Xen cdrom support --- diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules index 12fbf637..a3e8e3c7 100644 --- a/extras/cdrom_id/60-cdrom_id.rules +++ b/extras/cdrom_id/60-cdrom_id.rules @@ -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" diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c index 7be0789f..c578f129 100644 --- a/extras/cdrom_id/cdrom_id.c +++ b/extras/cdrom_id/cdrom_id.c @@ -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)