From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SMbgJ-0006mO-Fd for mharc-grub-devel@gnu.org; Tue, 24 Apr 2012 05:05:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMbg9-0006kB-0Q for grub-devel@gnu.org; Tue, 24 Apr 2012 05:05:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMbg7-000534-1w for grub-devel@gnu.org; Tue, 24 Apr 2012 05:04:56 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:56708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMbg6-00052u-PE for grub-devel@gnu.org; Tue, 24 Apr 2012 05:04:54 -0400 Received: by werj55 with SMTP id j55so347006wer.0 for ; Tue, 24 Apr 2012 02:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=R1QsLvDEY0iOB7vXxiOdhYwuSMlUphABK88tUWrfMag=; b=CM33iwLKsOwCVNvuINApedbGjSNdY8/TY40kCobM/D8XR5QCpY+Ev9AoGdvIWznVdZ Td8YIRwS5bL1pY8U7rwB+AZaBYMBBhmS/BG3SCOClPm5uGo5Pw7A2w/PoEnBNPY8nCQI 32/Mdz1G6za/PnJNH2S38knwuVpdobQtlWsRy8JmUiAOs+SmvjaX/o+o3bqTG4f05G9o y0fY5hrI/sNrpIXriE+Ymc5nmYAuSC7o2LlrzXqB7qisyFbcnK0OwwMgx5ZlWdgNitYb 4llgkdwl29xpnOU0ZlBxwqsiBjhqBvhJyn3wdhm+jRmdi/hbPmJUmZX9DKf51tRgWA55 F0ng== Received: by 10.180.77.233 with SMTP id v9mr28975888wiw.22.1335258292773; Tue, 24 Apr 2012 02:04:52 -0700 (PDT) Received: from debian.x201.phnet (39-234.197-178.cust.bluewin.ch. [178.197.234.39]) by mx.google.com with ESMTPS id n8sm44830808wix.10.2012.04.24.02.04.50 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Apr 2012 02:04:51 -0700 (PDT) Message-ID: <4F966CAE.3080300@gmail.com> Date: Tue, 24 Apr 2012 11:04:46 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120329 Icedove/10.0.3 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH,HURD] Fix grub-probe with userland partition support 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> In-Reply-To: <20120423233423.GC4755@type.famille.thibault.fr> X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigDEF96C2CAF50A3DDD93F8650" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.169 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:05:06 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDEF96C2CAF50A3DDD93F8650 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 24.04.2012 01:34, Samuel Thibault wrote: > +/* Retrieve the storage information for PATH, and search which partiti= ons > + * contains its start. */ > +static char * > +find_hurd_root_device (const char *path) > +{ > + struct store *path_store, *part_store; > + char *devpath =3D NULL; > + const char *prefix; > + size_t len, prefix_len; > + store_offset_t path_start; > + int part; > + > + path_store =3D 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. > + > + grub_util_info ("Storage is %s, type %d", > + path_store->name, path_store->class->id); > + > + if (path_store->class->id =3D=3D STORAGE_DEVICE) > + prefix =3D "/dev/"; > + else > + prefix =3D ""; > + > + prefix_len =3D strlen (prefix); > + len =3D strlen (path_store->name); > + devpath =3D xmalloc (prefix_len + len + 4 + 1); It's better to have an explicit sizeof ("s999") rather than 4 + 1 > + if (errno =3D=3D ENOENT && part >=3D 5) > + { Said in previous mail > + if (first_run->start * part_store->block_size <=3D path_start &&= > + (last_run->start + last_run->length) * part_store->block_size > pat= h_start) { Why this weird check rather than just check that start is the same? Some partitions may contain more partitions, like logical container contains logical partitions. --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigDEF96C2CAF50A3DDD93F8650 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk+WbK4ACgkQNak7dOguQgmfFAD/Qi/s4oFES92Plo7jfq0WeipY IEzGm5yPJgrd4KZhd7oBAJq/faSVuLMxKAVeXvNb3Stn5WP49ncYJIJyF5ez9EMi =a8fb -----END PGP SIGNATURE----- --------------enigDEF96C2CAF50A3DDD93F8650--