Re: [SLOF] [PATCH v3] slof/fs/packages/disk-label.fs: improve checking for DOS boot partitions

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

 



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




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux