tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: msdosfs and small sectors



> > +   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.


.mrg.


Home | Main Index | Thread Index | Old Index