It's relatively simple, but we'll do it a couple of times; pull it
out into a macro.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 61152 Build 58036: arc lint + arc unit
Event Timeline
Comment Actions
I'd prefer it to take the slot number, and do the "slot - 1" translation in the macro. That came to mind looking at D48075 which passes in slot - 1.
That prompted a quick scan of kern_osd.c, which has a lot of "i" starting at zero, and "i + 1" to refer to the slot number. But then osd_exit has 1 one-based "i", with "i - 1" referring to the slot index. and osd_init has "i" being the type and hiding its zero-based-ness with OSD_FIRST. This all seems to be an off-by-one waiting to happen.