From: "Chuck Meade" <chuckmeade@mindspring.com>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: linux-mtd@lists.infradead.org
Subject: RE: cmdlinepart.c patch
Date: Mon, 13 Mar 2006 08:17:39 -0500 [thread overview]
Message-ID: <IIEEICKJLNEPBBDJICNGGELBKEAA.chuckmeade@mindspring.com> (raw)
In-Reply-To: <20060313103326.GA11768@wohnheim.fh-wedel.de>
> Can you send me his patch then? Preferrably inline in the mail.
>
> Jörn
Hi Jörn,
Yes. I have included his patch inline below. I got it from this
link that he sent:
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc5/2.6.16-rc5-mm3/broken-out/mtd-cmdlinepart-allow-zero-offset-va
lue.patch
You may also be interested in this comment he made about this patch:
> I sent same fix to LKML (CC: David Woodhouse, Andrew Morton) on 29
> January. And it has been in -mm tree since 2.6.16-rc1-mm4...
So just FYI this patch is already in -mm.
Below my signature is the inline version of the patch found at the
above link.
Thanks,
Chuck
----------------------------------------------------------------
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Current cmdlinepart.c uses offset value 0 to specify a continuous
partition. This prevents creating a second partition starting at 0.
For example, I can split 4MB device using "mtdparts=id:2M,2M", but I can
not do "mtdparts=id:2M@2M,2M@0" to swap mtd0 and mtd1.
This patch introduces special OFFSET_CONTINUOUS value for a continuous
partition and allows 0 for offset value.
Also this patch replaces 0xffffffff with UINT_MAX for SIZE_REMAINING.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/mtd/cmdlinepart.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff -puN drivers/mtd/cmdlinepart.c~mtd-cmdlinepart-allow-zero-offset-value drivers/mtd/cmdlinepart.c
--- 25/drivers/mtd/cmdlinepart.c~mtd-cmdlinepart-allow-zero-offset-value Wed Feb 22 15:25:21 2006
+++ 25-akpm/drivers/mtd/cmdlinepart.c Wed Feb 22 15:25:21 2006
@@ -42,7 +42,8 @@
/* special size referring to all the remaining space in a partition */
-#define SIZE_REMAINING 0xffffffff
+#define SIZE_REMAINING UINT_MAX
+#define OFFSET_CONTINUOUS UINT_MAX
struct cmdline_mtd_partition {
struct cmdline_mtd_partition *next;
@@ -75,7 +76,7 @@ static struct mtd_partition * newpart(ch
{
struct mtd_partition *parts;
unsigned long size;
- unsigned long offset = 0;
+ unsigned long offset = OFFSET_CONTINUOUS;
char *name;
int name_len;
unsigned char *extra_mem;
@@ -314,7 +315,7 @@ static int parse_cmdline_partitions(stru
{
for(i = 0, offset = 0; i < part->num_parts; i++)
{
- if (!part->parts[i].offset)
+ if (part->parts[i].offset == OFFSET_CONTINUOUS)
part->parts[i].offset = offset;
else
offset = part->parts[i].offset;
_
next prev parent reply other threads:[~2006-03-13 13:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-06 15:46 cmdlinepart.c patch Chuck Meade
2006-03-12 22:14 ` Jörn Engel
2006-03-13 0:07 ` Chuck Meade
2006-03-13 10:33 ` Jörn Engel
2006-03-13 13:17 ` Chuck Meade [this message]
2006-03-13 13:18 ` Jörn Engel
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=IIEEICKJLNEPBBDJICNGGELBKEAA.chuckmeade@mindspring.com \
--to=chuckmeade@mindspring.com \
--cc=joern@wohnheim.fh-wedel.de \
--cc=linux-mtd@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