Re: libsa/sdcd: correct blocksize

Tetsuya Isaki <[email protected]> Tue, 21 Jun 2022 20:41:56 +0900
Newsgroups gmane.os.netbsd.ports.x68k
Message-ID <x7tu8e2qgr.wl%[email protected]>
At Sun, 19 Jun 2022 22:55:00 +0900,
Izumi Tsutsui wrote:
> I guess essencial part is "shift op" vs "log2 calculation" for blocksize.
> The logic seems ok but there are several comments on implementation:
> 
> - maybe it's better to have function prototypes, even if they are static
> - I wonder if human2blk(), human2bsd(), and bsd2blk() should be unsigned

Right.  I will do it.

> - is it worth to explicitly specify static inline (or gcc already does?)

gcc already does.  Furthermore, more large check_unit() or
readdisklabel() are also inlined.
Therefore I won't add inline keyword for these new functions.

> - if now cdstrategy() is identical with sdstrategy(), maybe it's better
>   to rename current sdstrategy() to sdcdstrategy() and use it both
>   sd and cd in devsw[] in stand/boot/conf.c?

I've tried a bit but there are several things to consider about it.
I won't do it at this time.

Thank you for reviewing.  I will commit it.
---
Tetsuya Isaki <[email protected] / [email protected]>