Source-Changes-D archive

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

Re: CVS commit: src/sys/fs/msdosfs

christos@ wrote:

> | Anyway KASSERT() (or sanity check) should also be centralized
> | to getdisksize()?
> 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.

(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.
Izumi Tsutsui

Home | Main Index | Thread Index | Old Index