qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	qemu-riscv@nongnu.org, qemu-ppc@nongnu.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-s390x@nongnu.org, qemu-arm@nongnu.org
Subject: Re: [PATCH-for-10.0 3/3] hw/boards: Rename no_sdcard -> create_default_sdcard_drive
Date: Tue, 4 Feb 2025 08:07:41 +0100	[thread overview]
Message-ID: <47db9d33-8fa4-4ebf-90c9-db6e252cc38e@redhat.com> (raw)
In-Reply-To: <20241125181420.24424-4-philmd@linaro.org>

On 25/11/2024 19.14, Philippe Mathieu-Daudé wrote:
> Invert the 'no_sdcard' logic, renaming it as the more
> explicit "create_default_sdcard_drive". Machines are
> supposed to create a SD Card drive when this flag is
> set. In many cases it doesn't make much sense (as
> boards don't expose SD Card host controller),

This indeed shows the insanity of the previous state, thanks for tackling it!

> but this
> is patch only aims to expose that nonsense; so no
> logical change intended (mechanical patch using gsed).
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
...
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index 86fcf9c81f..5cec73ae68 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -285,7 +285,7 @@ struct MachineClass {
>           no_cdrom:1,
>           pci_allow_0_address:1,
>           legacy_fw_cfg_order:1;
> -    OnOffAuto no_sdcard;
> +    bool create_default_sdcard_drive;

Can we maybe still bikeshed about the naming here? The current name is a 
little bit long, and maybe we could "standardize" the prefix of the flags 
here a little bit. We already have one switch starting with "has_..." and 
some others starting with "auto_enable_...", so I'd maybe suggest one of 
those instead:

   has_default_sdcard
   auto_enable_sdcard

WDYT?

  Thomas


>       bool is_default;
>       const char *default_machine_opts;
>       const char *default_boot_order;



  reply	other threads:[~2025-02-04  7:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 18:14 [PATCH-for-10.0 0/3] hw/boards: Try to make sense of MachineClass::no_sdcard flag Philippe Mathieu-Daudé
2024-11-25 18:14 ` [PATCH-for-10.0 1/3] hw/boards: Convert no_sdcard flag to OnOffAuto tri-state Philippe Mathieu-Daudé
2025-02-04  6:59   ` Thomas Huth
2024-11-25 18:14 ` [PATCH-for-10.0 2/3] hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF Philippe Mathieu-Daudé
2025-02-04  7:00   ` Thomas Huth
2024-11-25 18:14 ` [PATCH-for-10.0 3/3] hw/boards: Rename no_sdcard -> create_default_sdcard_drive Philippe Mathieu-Daudé
2025-02-04  7:07   ` Thomas Huth [this message]
2025-02-04 11:09     ` Philippe Mathieu-Daudé
2024-11-26  5:24 ` [PATCH-for-10.0 0/3] hw/boards: Try to make sense of MachineClass::no_sdcard flag Philippe Mathieu-Daudé
2025-02-04  7:11   ` Thomas Huth

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=47db9d33-8fa4-4ebf-90c9-db6e252cc38e@redhat.com \
    --to=thuth@redhat.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).