From: "Yoshinori K. Okuji" <okuji@enbug.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Set size of partition correctly in grub_disk_open()
Date: Sat, 8 Jul 2006 18:07:44 +0200 [thread overview]
Message-ID: <200607081807.44495.okuji@enbug.org> (raw)
In-Reply-To: <87wtarepr8.wl%jeroen@vrijschrift.org>
Hi Jeroen,
On Wednesday 05 July 2006 22:54, Jeroen Dekkers wrote:
> if (p)
> - disk->partition = grub_partition_probe (disk, p + 1);
> + {
> + disk->partition = grub_partition_probe (disk, p + 1);
> + if (! disk->partition)
> + {
> + grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such partition");
> + goto fail;
> + }
I agree with this part.
> +
> + disk->total_sectors = grub_partition_get_len (disk->partition);
> + }
But I don't agree with this part. The member "total_sectors" must describe the
size of the whole disk but not of the partition. This is because GRUB
accesses partitions through the disk interface. When accessing a partition,
GRUB tweaks offsets by the start sector of the partition. If not, it is
another bug.
Thanks,
Okuji
next prev parent reply other threads:[~2006-07-08 16:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-05 20:54 [PATCH] Set size of partition correctly in grub_disk_open() Jeroen Dekkers
2006-07-08 16:07 ` Yoshinori K. Okuji [this message]
2006-07-08 20:39 ` Jeroen Dekkers
2006-07-08 21:10 ` Yoshinori K. Okuji
2006-07-08 23:35 ` Jeroen Dekkers
2006-07-09 1:11 ` Yoshinori K. Okuji
2006-07-09 12:01 ` Jeroen Dekkers
2006-07-09 13:29 ` Yoshinori K. Okuji
2006-07-09 14:38 ` Tomáš Ebenlendr
2006-07-09 21:37 ` Jeroen Dekkers
2006-07-11 17:06 ` Yoshinori K. Okuji
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=200607081807.44495.okuji@enbug.org \
--to=okuji@enbug.org \
--cc=grub-devel@gnu.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 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.