All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH,HURD] Fix grub-probe with userland partition support
Date: Mon, 23 Apr 2012 10:52:09 +0200	[thread overview]
Message-ID: <4F951839.4070309@gmail.com> (raw)
In-Reply-To: <20120422182439.GE4755@type.famille.thibault.fr>

[-- Attachment #1: Type: text/plain, Size: 1808 bytes --]

On 22.04.2012 20:24, Samuel Thibault wrote:
> Hello,
>
> GNU/Hurd is moving to userland partition support, i.e. /dev/hd0s* slices
> are actually served by userland translators which use libparted.  The
> grub probe code needs to be fixed for that, here is a proposed patch.
>
> The principle is that it gets the store translator behind the file being
> probed for, and compares the storage area there with what grub detects
> itself.  That is why it makes use of the map array, which I preferred
> to rename to hostdisk_map (thus big but trivial changes in hostdisk.c):
> even if it was already an external symbol, it's preferrable to prefix
> it.
map was never intended to be globally visible. At most perhaps
"semi-local" due to difficulties of split between getroot.c and hostdisk.c
Moreover the behaviour of find_root_device must be independent of what
is already in map since we don't rely anymore at map being populated at
all and at entries only on as-needed basis.
Additional problems include:

+      if (disk->dev->id != GRUB_DISK_DEVICE_BIOSDISK_ID && disk->dev->id != GRUB_DISK_DEVICE_HOSTDISK_ID)
+	{
No need to check for BIOSDISK. It's not used for hostdisk.
+      store_offset_t start = partition->start * GRUB_DISK_SECTOR_SIZE,
+		     length = partition->len * GRUB_DISK_SECTOR_SIZE,
This is both stylistically incorrect and wrong.
Stylistically at declaration we repeat type on every line.
Additionally partition->start is only relative to container, not whole disk. You have to use grub_disk_partition_get_start for this.


>
> Samuel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2012-04-23  8:52 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-22 18:24 [PATCH,HURD] Fix grub-probe with userland partition support Samuel Thibault
2012-04-23  8:52 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2012-04-23  9:40   ` Samuel Thibault
2012-04-23 10:45     ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-23 11:06       ` Samuel Thibault
2012-04-23 11:17         ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-23 21:26           ` Samuel Thibault
2012-04-23 23:34             ` Samuel Thibault
2012-04-24  8:55               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:00                 ` Samuel Thibault
2012-04-24  9:12                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:16                     ` Samuel Thibault
2012-04-24  9:26                       ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:36                         ` Samuel Thibault
2012-04-24  9:38                           ` Samuel Thibault
2012-04-24  9:44                             ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:49                               ` Samuel Thibault
2012-04-24  9:04               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24  9:19                 ` Samuel Thibault
2012-04-24  9:55                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24 12:42                     ` Samuel Thibault
2012-04-24 13:19                       ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24 17:13                         ` Samuel Thibault
2012-04-24 20:14                           ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24 22:21                             ` Samuel Thibault
2012-04-24 22:31                               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24 22:39                                 ` Samuel Thibault
2012-04-24 22:46                                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-24 23:52                                 ` Samuel Thibault
2012-04-24 23:57                                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-25  0:27                                     ` Samuel Thibault
2012-04-25  8:36                                       ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-25  9:37                                         ` Samuel Thibault
2012-04-27 18:45                                           ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-30 18:58                                             ` Samuel Thibault
2012-05-01 13:12                                               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-05-03 21:42                                               ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-04-23  9:07 ` Vladimir 'φ-coder/phcoder' Serbinenko

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=4F951839.4070309@gmail.com \
    --to=phcoder@gmail.com \
    --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.