mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Cory Tusar <Cory.Tusar@zii.aero>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>,
	Chris Healy <Chris.Healy@zii.aero>
Subject: Re: [PATCH 1/2] common: boot: Instantiate storage for global.boot.machine_id
Date: Mon, 17 Jun 2019 14:21:23 +0200	[thread overview]
Message-ID: <20190617122123.m24jeihvqfxt7tpf@pengutronix.de> (raw)
In-Reply-To: <20190614203438.18900-2-cory.tusar@zii.aero>

On Fri, Jun 14, 2019 at 08:35:08PM +0000, Cory Tusar wrote:
> There are references throughout the documentation (and elsewhere in the
> boot code) regarding the use of machine-id in a bootloader spec file.
> However, there was no global storage allocated for this variable.
> 
> This commit adds the necessary storage and associated initialization.
> 
> Signed-off-by: Cory Tusar <cory.tusar@zii.aero>
> ---
>  common/boot.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/common/boot.c b/common/boot.c
> index 974eaf5d0..fae2ff935 100644
> --- a/common/boot.c
> +++ b/common/boot.c
> @@ -348,4 +348,13 @@ void bootsources_list(struct bootentries *bootentries)
>  		printf("%-20s %s\n", entry->title, entry->description);
>  }
>  
> +static int boot_init(void)
> +{
> +	globalvar_add_simple("boot.machine_id", NULL);
> +
> +	return 0;
> +}
> +late_initcall(boot_init);

There already is an initcall in this file adding a globalvar. Could you
add this change to the existing initcall and rename
init_boot_watchdog_timeout() to something more suitable?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-06-17 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 20:35 [PATCH 0/2] Fix machine-id operation Cory Tusar
2019-06-14 20:35 ` [PATCH 1/2] common: boot: Instantiate storage for global.boot.machine_id Cory Tusar
2019-06-17 12:21   ` Sascha Hauer [this message]
2019-06-17 18:06     ` Cory Tusar
2019-06-14 20:35 ` [PATCH 2/2] common: blspec: Both environment and config file machine-id must match Cory Tusar

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=20190617122123.m24jeihvqfxt7tpf@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=Chris.Healy@zii.aero \
    --cc=Cory.Tusar@zii.aero \
    --cc=barebox@lists.infradead.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