chiark / gitweb /
cdrom_id: add Xen cdrom support
[elogind.git] / extras / cdrom_id / cdrom_id.c
index 381aa70bedb1a94f64520dc55fc78738c8021994..c578f12921a0113ceb5180f6404634011ac0dee3 100644 (file)
 
 #include "../../udev/udev.h"
 
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
-#endif
-
 static int debug;
 
 static void log_fn(struct udev *udev, int priority,
@@ -571,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)