From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 2/4] FAT: make use of disk_partition_t.part
Date: Wed, 17 Oct 2012 09:23:23 -0700 [thread overview]
Message-ID: <20121017162323.GF27770@bill-the-cat> (raw)
In-Reply-To: <14225216.rgynsXC36r@bloomfield>
On Mon, Oct 15, 2012 at 08:07:44PM +0200, Pavel Herrmann wrote:
> On Monday 15 of October 2012 10:40:25 Stephen Warren wrote:
> > On 10/13/2012 01:38 PM, Pavel Herrmann wrote:
> > > Hi
> > >
> > > On Wednesday 10 October 2012 12:14:00 Stephen Warren wrote:
> > >> From: Stephen Warren <swarren@nvidia.com>
> > >>
> > >> This removes the standalone cur_part_nr variable, opening the way to
> > >> replacing fat_register_device() with fat_set_blk_dev().
> > >>
> > >> Note that when get_partition_info() fails and we use the entire disk,
> > >> the correct partition number is 0 (whole disk) not 1 (first partition),
> > >> so that change is also made here.
> > >>
> > >> An alternative to this (and the previous) patch might be to simply
> > >> remove the partition number from the printf(). I don't know how attached
> > >> people are to it.
> > >>
> > >> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> > >
> > > Just as a heads up, in the DM any difference between a partition and a
> > > whole block device (also between different interfaces for disks) is
> > > hidden from any user code (code other than the one keeping track of
> > > partitions/disks, that only uses such information to determine whether to
> > > scan for partitions), you only get some object that can read/write blocks
> > > if you ask it nicely, and you have to make do with that (if you need more
> > > then you're probably doing something wrong).
> > > As a result, there is no notion of partition number, and the string you
> > > are
> > > patching up here (along with many others, due to unification of disk
> > > interfaces) is changed.
> >
> > OK, so do you think it'd be better right now to drop patches 1 and 2 in
> > this series, and just remove the partition number from fat.c's printf()
> > call? That'd certainly be simple to do.
>
> Well, in my case I have done a broader abstraction, that could be used for
> non-continuous partitions as well (think LVM) with minimal effort (think extend
> identifier structure used for searching to more than
> interface:number:partnumber, no changes in FS code), and partition number
> loses any meaning in that context.
> Whether dropping the number now is an acceptable change would be up to Tom
> Rini, I would vote for it though, if that meant anything around here.
OK, lets rework this series as suggested here to make the DM work a
little easier. Drop the print instead.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121017/712e7b43/attachment.pgp>
next prev parent reply other threads:[~2012-10-17 16:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 18:13 [U-Boot] [PATCH V3 1/4] part: add partition number to disk_partition_t Stephen Warren
2012-10-10 18:14 ` [U-Boot] [PATCH V3 2/4] FAT: make use of disk_partition_t.part Stephen Warren
2012-10-13 19:38 ` Pavel Herrmann
2012-10-15 16:40 ` Stephen Warren
2012-10-15 18:07 ` Pavel Herrmann
2012-10-17 16:23 ` Tom Rini [this message]
2012-10-10 18:14 ` [U-Boot] [PATCH V3 3/4] FAT: initialize all fields in cur_part_info, simplify init Stephen Warren
2012-10-10 18:14 ` [U-Boot] [PATCH V3 4/4] FAT: implement fat_set_blk_dev(), convert cmd_fat.c Stephen Warren
2012-10-10 18:44 ` Benoît Thébaudeau
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=20121017162323.GF27770@bill-the-cat \
--to=trini@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox