Re: [SLOF] [PATCH v3] slof/fs/packages/disk-label.fs: improve checking for DOS boot partitions
Segher Boessenkool <[email protected]> Wed, 27 Mar 2024 08:43:25 -0500
| Newsgroups | org.kernel.vger.kvm-ppc |
|---|---|
| Message-ID | <[email protected]> |
Hi! On Wed, Mar 27, 2024 at 01:41:27AM -0400, Kautuk Consul wrote: > -\ read sector to array "block" > -: read-sector ( sector-number -- ) > +\ read sector to array "block" and return actual bytes read > +: read-sector-ret ( sector-number -- actual-bytes ) What does "-ret" mean? The name could be clearer. Why factor it like this, anyway? Shouldn't "read" always read exactly the number of bytes it is asked to? So, "read-sector" should always read exactly one sector, never more, never less. If an exception happens you can (should!) throw an exception. Which you can then catch at a pretty high level. Segher