On Jul 5,  3:37am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote:
-- Subject: Re: CVS commit: src/sys/fs/msdosfs

| > Well, I am not sure if KASSERT() is the best solution here. But
| > what else can we do? I agree that there should be at least a
| > warning.
| 
| Check
| (secsize != 0 && secsize <= MAXBSIZE && powerof2(secsize) && numsec > 0)
| in getdisksize() and return ENXIO if it fails?
| It looks callers of getdisksize() check a returned error value
| so they will also fail properly (refusing mountfs etc.),
| even without a diagnostic warning.

Perhaps print a diagnostic, return -1 with EINVAL so that we know which
driver failed?

christos

Reply via email to