linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Bishara <saeed@marvell.com>
To: linux-mtd@lists.infradead.org
Cc: Saeed Bishara <saeed@marvell.com>
Subject: [PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G.
Date: Sun,  5 Sep 2010 14:23:10 +0300	[thread overview]
Message-ID: <1283685790-8619-1-git-send-email-saeed@marvell.com> (raw)

Signed-off-by: Saeed Bishara <saeed@marvell.com>
---
 drivers/mtd/cmdlinepart.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 1479da6..ae56c23 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -41,8 +41,8 @@
 
 
 /* special size referring to all the remaining space in a partition */
-#define SIZE_REMAINING UINT_MAX
-#define OFFSET_CONTINUOUS UINT_MAX
+#define SIZE_REMAINING LLONG_MAX
+#define OFFSET_CONTINUOUS LLONG_MAX
 
 struct cmdline_mtd_partition {
 	struct cmdline_mtd_partition *next;
@@ -74,8 +74,8 @@ static struct mtd_partition * newpart(char *s,
                                       int extra_mem_size)
 {
 	struct mtd_partition *parts;
-	unsigned long size;
-	unsigned long offset = OFFSET_CONTINUOUS;
+	unsigned long long size;
+	unsigned long long offset = OFFSET_CONTINUOUS;
 	char *name;
 	int name_len;
 	unsigned char *extra_mem;
@@ -93,7 +93,7 @@ static struct mtd_partition * newpart(char *s,
 		size = memparse(s, &s);
 		if (size < PAGE_SIZE)
 		{
-			printk(KERN_ERR ERRP "partition size too small (%lx)\n", size);
+			printk(KERN_ERR ERRP "partition size too small (%llx)\n", size);
 			return NULL;
 		}
 	}
-- 
1.6.0.4

             reply	other threads:[~2010-09-05 11:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-05 11:23 Saeed Bishara [this message]
2010-09-05 13:08 ` [PATCH v2] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G Saeed Bishara
2010-09-07  8:56   ` Artem Bityutskiy
2010-09-07  9:48     ` [PATCH] " Saeed Bishara
2010-09-08  8:31       ` Artem Bityutskiy

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=1283685790-8619-1-git-send-email-saeed@marvell.com \
    --to=saeed@marvell.com \
    --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;
as well as URLs for NNTP newsgroup(s).