summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-04-15 20:48:04 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-04-15 20:48:04 +0200
commit2e9df1981833e1e029b7ce6c12a44dffb6aad0cb (patch)
treec38c30ef5bbb17c2a79b39bee53f88959230e7f4 /extras
parent0413a47ebfcd46ae43cb56ad508b2484bc97ff14 (diff)
cdrom_id: print more debug messages
Diffstat (limited to 'extras')
-rw-r--r--extras/cdrom_id/cdrom_id.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 3f9ca4c228..d9b6fbded3 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -374,10 +374,6 @@ static int cd_profiles(struct udev *udev, int fd)
case 0x00:
info(udev, "GET CONFIGURATION: feature 'profiles', with %i entries\n", features[i+3] / 4);
feature_profiles(udev, &features[i]+4, features[i+3]);
-
- /* set current profile, if we got a profiles section */
- cur_profile = features[6] << 8 | features[7];
- info(udev, "current profile 0x%02x\n", cur_profile);
break;
default:
info(udev, "GET CONFIGURATION: feature %i <ignored>, with %i bytes\n", feature, features[i+3]);
@@ -385,7 +381,10 @@ static int cd_profiles(struct udev *udev, int fd)
}
}
- if (cur_profile == 0) {
+ cur_profile = features[6] << 8 | features[7];
+ if (cur_profile > 0) {
+ info(udev, "current profile 0x%02x\n", cur_profile);
+ } else {
info(udev, "no current profile, assuming no media\n");
return -1;
}
@@ -396,62 +395,81 @@ static int cd_profiles(struct udev *udev, int fd)
case 0x03:
case 0x04:
case 0x05:
+ info(udev, "profile 0x%02x \n", cur_profile);
cd_media_mo = 1;
break;
case 0x08:
+ info(udev, "profile 0x%02x media_cd_rom\n", cur_profile);
cd_media_cd_rom = 1;
break;
case 0x09:
+ info(udev, "profile 0x%02x media_cd_r\n", cur_profile);
cd_media_cd_r = 1;
break;
case 0x0a:
+ info(udev, "profile 0x%02x media_cd_rw\n", cur_profile);
cd_media_cd_rw = 1;
break;
case 0x10:
+ info(udev, "profile 0x%02x media_dvd_ro\n", cur_profile);
cd_media_dvd_rom = 1;
break;
case 0x11:
+ info(udev, "profile 0x%02x media_dvd_r\n", cur_profile);
cd_media_dvd_r = 1;
break;
case 0x12:
+ info(udev, "profile 0x%02x media_dvd_ram\n", cur_profile);
cd_media_dvd_ram = 1;
break;
case 0x13:
case 0x14:
+ info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile);
cd_media_dvd_rw = 1;
break;
case 0x1B:
+ info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile);
cd_media_dvd_plus_r = 1;
break;
case 0x1A:
+ info(udev, "profile 0x%02x media_dvd_plus_rw\n", cur_profile);
cd_media_dvd_plus_rw = 1;
break;
case 0x2A:
+ info(udev, "profile 0x%02x media_dvd_plus_rw_dl\n", cur_profile);
cd_media_dvd_plus_rw_dl = 1;
break;
case 0x2B:
+ info(udev, "profile 0x%02x media_dvd_plus_r_dl\n", cur_profile);
cd_media_dvd_plus_r_dl = 1;
break;
case 0x40:
+ info(udev, "profile 0x%02x media_bd\n", cur_profile);
cd_media_bd = 1;
break;
case 0x41:
case 0x42:
+ info(udev, "profile 0x%02x media_bd_r\n", cur_profile);
cd_media_bd_r = 1;
break;
case 0x43:
+ info(udev, "profile 0x%02x media_bd_re\n", cur_profile);
cd_media_bd_re = 1;
break;
case 0x50:
+ info(udev, "profile 0x%02x media_hddvd\n", cur_profile);
cd_media_hddvd = 1;
break;
case 0x51:
+ info(udev, "profile 0x%02x media_hddvd_r\n", cur_profile);
cd_media_hddvd_r = 1;
break;
case 0x52:
+ info(udev, "profile 0x%02x media_hddvd_rw\n", cur_profile);
cd_media_hddvd_rw = 1;
break;
default:
+ info(udev, "profile 0x%02x <ignored>\n", cur_profile);
break;
}
return 0;