tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: msdosfs and small sectors
Le 17/07/2014 06:01, matthew green a écrit :
>>> + if (secsize < DEV_BSIZE) {
>>> +#ifdef DIAGNOSTIC
>>> + printf("Invalid block secsize %d\n", secsize);
>>> +#endif
>>> + error = EINVAL;
>>> + goto error_exit;
>>> + }
>>>
>>> if (argp->flags & MSDOSFSMNT_GEMDOSFS) {
>>> if (secsize != GEMDOSFS_BSIZE) {
>>
>> That's an abuse of DIAGNOSTIC. It should only be used to control
>> whether to assert on things that cannot happen. (Bad data on a mount
>> point is not a software invariant.)
>
> agreed -- these sorts of messages should be under DEBUG.
>
I don't see what's wrong with that; on -current at least if it
breaks something people will immediately get a clear message, so
that if we someone says "I get invalid ..." we can quickly revert
the change.
I think my commit was clear on that:
"Put the printf under DIAGNOSTIC temporarily to see if someone complains."
^^^^^^^^^^^
Home |
Main Index |
Thread Index |
Old Index