From 55d8f5e208396589476583dad8f2a7f2db3e2ef5 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 17 Apr 2009 00:29:56 +0200 Subject: [PATCH] cdrom_id: add Xen cdrom support --- extras/cdrom_id/60-cdrom_id.rules | 6 ++++-- extras/cdrom_id/cdrom_id.c | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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) -- 2.39.5