Re: Packet writing problems

Julien Oster
2004-08-18T08:30:24Z

Peter Osterlund <petero2@telia.com> writes:

Hello Peter,

>> The following patch on top of your patch adds all commonly used media
>> types to the output and changes CD-R and CD-RW to be detected by
>> profile type. It also reports unconforming non-standard profiles as
>> well as profiles which have a MMC profile definition but are unknown
>> as of the current MMC3 revision.

> Will any of those printk's ever get printed? Media types that can't be
> handled by the packet driver aren't supposed to make it past the
> pkt_good_disc() test.

Quickly looking through it, pkt_good_disc() does the same and drops
media types with unsuitable or invalid profiles.

So my patch is really not useful at that place.

But couldn't you move the "inserted disc is..." messages to
pkt_good_disc()? In the current source you basically duplicate the
switch statement which checks the profile. The printks could be in the
pkt_good_disc() check just as well.

There all profiles might be included and the corresponding media type
printed out, so that the user knows why his disc is unsuitable
(i.e. it's a CD-ROM or DVD-ROM and doesn't do any writing at all).

Regards,
Julien