All of lore.kernel.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Kautuk Consul <kconsul@linux.ibm.com>
Cc: aik@ozlabs.ru, Thomas Huth <thuth@redhat.com>,
	slof@lists.ozlabs.org, kvm-ppc@vger.kernel.org
Subject: Re: [SLOF] [PATCH v3] slof/fs/packages/disk-label.fs: improve checking for DOS boot partitions
Date: Wed, 27 Mar 2024 08:43:25 -0500	[thread overview]
Message-ID: <20240327134325.GF19790@gate.crashing.org> (raw)
In-Reply-To: <20240327054127.633598-1-kconsul@linux.ibm.com>

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

  parent reply	other threads:[~2024-03-27 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  5:41 [PATCH v3] slof/fs/packages/disk-label.fs: improve checking for DOS boot partitions Kautuk Consul
2024-03-27  7:45 ` Thomas Huth
2024-03-27  7:49   ` Kautuk Consul
2024-03-27 13:43 ` Segher Boessenkool [this message]
2024-03-28  4:39   ` [SLOF] " Kautuk Consul
2024-03-28 10:47     ` Segher Boessenkool
2024-03-28 11:02       ` Kautuk Consul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240327134325.GF19790@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=aik@ozlabs.ru \
    --cc=kconsul@linux.ibm.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=slof@lists.ozlabs.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.