All of lore.kernel.org
 help / color / mirror / Atom feed
From: mchitale@ventanamicro.com
To: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Sean Anderson <sean.anderson@seco.com>,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Subject: Re: [PATCH v1 1/2] part: Add a function to find ESP partition
Date: Thu, 21 Sep 2023 17:05:01 +0530	[thread overview]
Message-ID: <a9b76195135665aac150760992ea662e617dcf43.camel@ventanamicro.com> (raw)
In-Reply-To: <20230914162930.GB305624@bill-the-cat>

On Thu, 2023-09-14 at 12:29 -0400, Tom Rini wrote:
> On Thu, Sep 14, 2023 at 03:38:20PM +0530, Mayuresh Chitale wrote:
> > If a disk has an EFI system partition (ESP) then it can be used to
> > locate the boot files. Add a function to find the ESP.
> > 
> > Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
> > Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com
> > >
> > ---
> >  disk/part.c    | 16 ++++++++++++++++
> >  include/part.h | 10 ++++++++++
> >  2 files changed, 26 insertions(+)
> > 
> > diff --git a/disk/part.c b/disk/part.c
> > index 72241b7b23..2be0866671 100644
> > --- a/disk/part.c
> > +++ b/disk/part.c
> > @@ -841,3 +841,19 @@ int part_get_bootable(struct blk_desc *desc)
> >  
> >  	return 0;
> >  }
> > +
> > +int part_get_esp(struct blk_desc *desc)
> > +{
> > +	struct disk_partition info;
> > +	int p;
> > +
> > +	for (p = 1; p <= MAX_SEARCH_PARTITIONS; p++) {
> > +		int ret;
> > +
> > +		ret = part_get_info(desc, p, &info);
> > +		if (!ret && (info.bootable &
> > PART_EFI_SYSTEM_PARTITION))
> > +			return p;
> > +	}
> > +
> > +	return 0;
> > +}
> > diff --git a/include/part.h b/include/part.h
> > index db34bc6bb7..036f9fd762 100644
> > --- a/include/part.h
> > +++ b/include/part.h
> > @@ -689,6 +689,13 @@ int part_get_type_by_name(const char *name);
> >   * @return first bootable partition, or 0 if there is none
> >   */
> >  int part_get_bootable(struct blk_desc *desc);
> > +/**
> 
> Missing blank line?
> 
Ok, I will add it.


  reply	other threads:[~2023-09-21 11:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 10:08 [PATCH v1 0/2] SPL EBBR - EFI System Partition support Mayuresh Chitale
2023-09-14 10:08 ` [PATCH v1 1/2] part: Add a function to find ESP partition Mayuresh Chitale
2023-09-14 16:29   ` Tom Rini
2023-09-21 11:35     ` mchitale [this message]
2023-09-14 10:08 ` [PATCH v1 2/2] spl: Add support for booting from ESP Mayuresh Chitale
2023-09-14 16:29   ` Tom Rini
2023-09-21 11:33     ` mchitale
2023-09-21 15:43       ` Tom Rini
2023-09-14 14:15 ` [PATCH v1 0/2] SPL EBBR - EFI System Partition support Heinrich Schuchardt
2023-09-14 14:36   ` Sean Anderson

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=a9b76195135665aac150760992ea662e617dcf43.camel@ventanamicro.com \
    --to=mchitale@ventanamicro.com \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=sean.anderson@seco.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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.