From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SMbuF-0004Zn-LW for mharc-grub-devel@gnu.org; Tue, 24 Apr 2012 05:19:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMbu8-0004YP-7P for grub-devel@gnu.org; Tue, 24 Apr 2012 05:19:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMbu1-0001Et-Ms for grub-devel@gnu.org; Tue, 24 Apr 2012 05:19:23 -0400 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:52649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMbu1-0001ET-GN for grub-devel@gnu.org; Tue, 24 Apr 2012 05:19:17 -0400 X-IronPort-AV: E=Sophos;i="4.75,472,1330902000"; d="scan'208";a="141306841" Received: from unknown (HELO type.ipv6) ([193.50.110.104]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 24 Apr 2012 11:19:16 +0200 Received: from samy by type.ipv6 with local (Exim 4.77) (envelope-from ) id 1SMbtz-0002Xb-Rv for grub-devel@gnu.org; Tue, 24 Apr 2012 11:19:15 +0200 Date: Tue, 24 Apr 2012 11:19:15 +0200 From: Samuel Thibault To: The development of GNU GRUB Subject: Re: [PATCH,HURD] Fix grub-probe with userland partition support Message-ID: <20120424091915.GD4453@type.bordeaux.inria.fr> References: <20120422182439.GE4755@type.famille.thibault.fr> <4F951839.4070309@gmail.com> <20120423094030.GB4755@type.famille.thibault.fr> <4F9532B5.9050701@gmail.com> <20120423110627.GL4755@type.famille.thibault.fr> <4F953A3B.3000708@gmail.com> <20120423212606.GV4755@type.famille.thibault.fr> <20120423233423.GC4755@type.famille.thibault.fr> <4F966CAE.3080300@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4F966CAE.3080300@gmail.com> User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.105 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 09:19:30 -0000 Vladimir 'φ-coder/phcoder' Serbinenko, le Tue 24 Apr 2012 11:04:46 +0200, a écrit : > On 24.04.2012 01:34, Samuel Thibault wrote: > > +/* Retrieve the storage information for PATH, and search which partitions > > + * contains its start. */ > > +static char * > > +find_hurd_root_device (const char *path) > > +{ > > + struct store *path_store, *part_store; > > + char *devpath = NULL; > > + const char *prefix; > > + size_t len, prefix_len; > > + store_offset_t path_start; > > + int part; > > + > > + path_store = storeinfo_store (path); > > + if (! path_store) > > + grub_util_error ("Could not retrieve storage information for `%s'", path); > > + if (! path_store->name) > > + grub_util_error ("No storage name associated with `%s'", path); > grub_util_error messages should be marked for translation. And probably > have a TRANSLATORS comment about the context. Ah, I had only had a look at the existing grub_util_info calls, which are not marked for translation. > > + if (first_run->start * part_store->block_size <= path_start && > > + (last_run->start + last_run->length) * part_store->block_size > path_start) { > Why this weird check rather than just check that start is the same? Because path_start is the start of the file, not of the partition containing the file. > Some partitions may contain more partitions, like logical container > contains logical partitions. Yes, but we do not have defined /dev namings for these yet, so we don't know how to look for them grom GRUB yet. Samuel