All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 0/2] Extend 'part' cmd and C API to get part info
Date: Fri, 14 Jun 2019 16:56:19 +0300	[thread overview]
Message-ID: <CAByghJYaRe7PakndGQbKUd2y=JyPCaPBMkPp9aDWZ-RYr1JdhQ@mail.gmail.com> (raw)
In-Reply-To: <20190614130454.26797-1-igor.opaniuk@gmail.com>

Please ignore this patch-set,
"disk: part: Extend API to get partition info" won't be used and was
sent by by confusion.
I'll re-send a single "cmd: part: Add 'number' sub-command" as v5.

On Fri, Jun 14, 2019 at 4:04 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote:
>
> This patch-series extends `part` cmd and disk/part C API for getting
> partition info by it's name:
>
> 1. part "number" sub-command serves for getting the partition index from
> partition name. Also it can be used to test the existence of specified
> partition.
>
> 2. Introduces part_get_info_by_dev_and_name_or_num() function which
> allows us to get partition info from its number or name. Partition of
> interest is specified by string like "device_num:partition_number" or
> "device_num#partition_name".
>
> Initially these patches were a part of
> "android: implement A/B boot process" [1] patch-series, but then
> due to multiple requests decided to send it separately, while the
> work on A/B series is still in progress.
>
>
> Use case:
>
> For example, in Linaro Lab this U-Boot command for automatic testing
> of Linux rootfs is used:
>
>     => setenv bootpart 1:f
>
> where 0xf is "userdata" partition. But the number of "userdata"
> partition can be changed any time, when partition table is changed.
>
> So it would be nice to get rid of that 0xf magic number and use
> partition name instead, like this:
>
>     => part number mmc 1 userdata part_num
>     => setenv bootpart 1:${part_num}
>
>
> [1] https://patchwork.ozlabs.org/cover/1044152/
>
> Ruslan Trofymenko (2):
>   cmd: part: Add 'number' sub-command
>   disk: part: Extend API to get partition info
>
>  cmd/part.c     | 16 +++++++++++-
>  disk/part.c    | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  include/part.h | 21 ++++++++++++++++
>  3 files changed, 104 insertions(+), 1 deletion(-)
>
> --
> 2.17.1
>


-- 
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk

      parent reply	other threads:[~2019-06-14 13:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 13:04 [U-Boot] [PATCH v4 0/2] Extend 'part' cmd and C API to get part info Igor Opaniuk
2019-06-14 13:04 ` [U-Boot] [PATCH v4 1/2] cmd: part: Add 'number' sub-command Igor Opaniuk
2019-06-14 13:26   ` Roman Stratiienko
2019-06-14 13:52     ` Igor Opaniuk
2019-06-14 13:56       ` Eugeniu Rosca
2019-06-14 13:04 ` [U-Boot] [PATCH v4 2/2] disk: part: Extend API to get partition info Igor Opaniuk
2019-06-14 13:56 ` Igor Opaniuk [this message]

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='CAByghJYaRe7PakndGQbKUd2y=JyPCaPBMkPp9aDWZ-RYr1JdhQ@mail.gmail.com' \
    --to=igor.opaniuk@gmail.com \
    --cc=u-boot@lists.denx.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.