chiark / gitweb /
cdrom_id: Add media status debugging
authorMartin Pitt <martin.pitt@ubuntu.com>
Thu, 12 Aug 2010 05:10:12 +0000 (07:10 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Thu, 12 Aug 2010 05:10:12 +0000 (07:10 +0200)
Show which media status the hardware originally reports, since we mangle it in
some cases.

extras/cdrom_id/cdrom_id.c

index 83e95d581202a162d4534a6e450b63494481a3e6..d59991c6b53a755ef7216aa3feea33e97c269ad7 100644 (file)
@@ -573,6 +573,7 @@ static int cd_media_info(struct udev *udev, int fd)
 
        cd_media = 1;
        info(udev, "disk type %02x\n", header[8]);
+       info(udev, "hardware reported media status: %s\n", media_status[header[2] & 3]);
 
        /* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */
        if (!cd_media_cd_rom)