All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Robin H. Johnson" <robbat2@gentoo.org>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] block/partitions: detect LUKS-formatted disks
Date: Sun, 6 Jul 2025 22:58:16 -0700	[thread overview]
Message-ID: <aGth-G3oYNF39WJQ@infradead.org> (raw)
In-Reply-To: <20250704182853.3857-1-robbat2@gentoo.org>

I'm not sure this is the best way to approach it, as what you add
is not really a partition format.

I'd suggest checking for the LUKS signature in the atari partition
parser instead - that way the code is automatically built when the
atari partition parser is built in, and not built when not needed.

Minor nitpick:

> +	if (memcmp(data, LUKS_MAGIC_1ST_V1, 8) == 0
> +		|| memcmp(data, LUKS_MAGIC_2ND_V1, 8) == 0) {

The || goes at the end of the line for the linux coding style, and the
continuing line is indented either after the opening brace or by an
extra tab vs the following code:

	if (memcmp(data, LUKS_MAGIC_1ST_V1, 8) == 0 ||
	    memcmp(data, LUKS_MAGIC_2ND_V1, 8) == 0) {


  reply	other threads:[~2025-07-07  5:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-04 18:28 [PATCH] block/partitions: detect LUKS-formatted disks Robin H. Johnson
2025-07-07  5:58 ` Christoph Hellwig [this message]
2025-07-07 10:04 ` Milan Broz

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=aGth-G3oYNF39WJQ@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=robbat2@gentoo.org \
    /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.