public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>,
	Al Viro <viro@ftp.uk.linux.org>
Subject: [PATCH] Fix cockups (wot I made) in fs/partitions/acorn.c
Date: Tue, 24 Jun 2003 00:20:08 +0100	[thread overview]
Message-ID: <20030624002008.K28325@flint.arm.linux.org.uk> (raw)

It seems that my test config didn't actually have this enabled (it does
now.)  I'll push it Linus-wards tomorrow unless someone screams.

diff -urN orig/fs/partitions/acorn.c linux/fs/partitions/acorn.c
--- orig/fs/partitions/acorn.c	Mon Jun 23 11:51:28 2003
+++ linux/fs/partitions/acorn.c	Mon Jun 23 12:28:58 2003
@@ -517,7 +517,7 @@
 	const unsigned char *data;
 	unsigned char buffer[256];
 	struct eesox_part *p;
-	u32 start = 0;
+	sector_t start = 0;
 	int i, slot = 1;
 
 	data = read_dev_sector(bdev, 7, &sect);
@@ -533,22 +533,22 @@
 	put_dev_sector(sect);
 
 	for (i = 0, p = (struct eesox_part *)buffer; i < 8; i++, p++) {
-		u32 next;
+		sector_t next;
 
 		if (memcmp(p->magic, "Eesox", 6))
 			break;
 
-		next = le32_to_cpu(p->start) + first_sector;
+		next = le32_to_cpu(p->start);
 		if (i)
 			put_partition(state, slot++, start, next - start);
 		start = next;
 	}
 
 	if (i != 0) {
-		unsigned long size;
+		sector_t size;
 
-		size = hd->part[minor(to_kdev_t(bdev->bd_dev))].nr_sects;
-		add_gd_partition(hd, minor++, start, size - start);
+		size = get_capacity(bdev->bd_disk);
+		put_partition(state, slot++, start, size - start);
 		printk("\n");
 	}
 

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


                 reply	other threads:[~2003-06-23 23:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20030624002008.K28325@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.uk.linux.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