Received: from list by lists.gnu.org with archive (Exim 4.71) id 1WpAru-0005ii-W0 for mharc-grub-devel@gnu.org; Tue, 27 May 2014 02:28:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpArm-0005he-Jz for grub-devel@gnu.org; Tue, 27 May 2014 02:28:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpArf-0000QH-55 for grub-devel@gnu.org; Tue, 27 May 2014 02:28:06 -0400 Received: from mail-ob0-f182.google.com ([209.85.214.182]:58410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpAre-0000Q2-Vl for grub-devel@gnu.org; Tue, 27 May 2014 02:27:59 -0400 Received: by mail-ob0-f182.google.com with SMTP id wn1so8785949obc.13 for ; Mon, 26 May 2014 23:27:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type; bh=tS4D9LsuPTV9Bj2qDDuWPRUJuj2PIofhGBkH8969Ouw=; b=EQ8aZdpM/lIZWkkXoOLL9JWMnhmLkwPsN1IKqmkJuM8V5kJyaPfGh8KVwaMWjhDQNX SonZTqmuqM/r84XR9gy/tvt/Bjd8XGVOCOqxHpC/z9L9/CiNXW44SNJOwlLxBX5zSFNk CSlzEPJ9WBRPoJn4ot7ZhTV1cLhDPudy6CgAb7yyCIwGopA/93C9UXgv9H1LpawIv5yW r/OixUGSxbby4mHZNTGjpywe5rIKtjheolyAUueqsm4VEP20bk1N1zQqDT9Or2egnBWk XVg9nsm502saTzt5s3oi0sB/hOFr2ChXKrp3zljWmEDy2818qYB7p5YMW8unj66dPs4T Xt7A== X-Gm-Message-State: ALoCoQnHD/qU2FM2D8CAk7sJXnCdkUJF1jfievwXH3KobLx1uLOxGrvk6kdS6vrMJCgKyU7Ygq8p X-Received: by 10.182.76.38 with SMTP id h6mr30206475obw.8.1401172077357; Mon, 26 May 2014 23:27:57 -0700 (PDT) Received: from crass-Ideapad-Z570 (cpe-70-117-77-21.austin.res.rr.com. [70.117.77.21]) by mx.google.com with ESMTPSA id u16sm26829613obt.23.2014.05.26.23.27.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 26 May 2014 23:27:56 -0700 (PDT) Date: Tue, 27 May 2014 01:27:47 -0500 From: Glenn Washburn To: Vladimir =?UTF-8?B?J8+GLWNvZGVyL3BoY29kZXIn?= Serbinenko Subject: Re: [PATCH] Allow user-defined functions to override builtins. Message-ID: <20140527012747.1ee715ab@crass-Ideapad-Z570> In-Reply-To: <53815D83.8080703@gmail.com> References: <20140519013715.1e36d215@crass-Ideapad-Z570> <537DA7CC.8000507@gmail.com> <20140524024734.1c602c5b@crass-Ideapad-Z570> <53815D83.8080703@gmail.com> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.20; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/E4cBUp/FJqGbCoHrR9=Np_Y"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.214.182 Cc: The development of GRUB 2 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, 27 May 2014 06:28:14 -0000 --Sig_/E4cBUp/FJqGbCoHrR9=Np_Y Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 25 May 2014 05:03:31 +0200 Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: > On 24.05.2014 09:47, Glenn Washburn wrote: > > But the prefix variable is used for other things in the loaded > > config file. So if I change the prefix to be that of the running > > grub to load the correct modules, other parts of the config will > > break (for instance, loading fonts or locales). > Localesneed to come from folder matching running GRUB, otherwise > you'll get string mismatches. Fonts typically come from themes or is > unifont. >=20 > Additionally your approach doesn't solve the problem in the first > place. insmod is just one of possible ways to load modules. For > various autoloads there is no command to hook. I'm not sure of a good solution to the locale problem, but I don't think I've run in to it (I use english, which I don't think needs them). So ignore my comment about locales. As far as module auto-loading, please correct me if I'm wrong, but I think auto-loading mostly happens when resolving dependencies when loading another module. I have seen, for instance, the "help loadfont" command auto-load the font modules, but in what other situations does modules auto-loading occur? In my case, I think things generally work because auto-loading is happening as a reaction to an explicit load from insmod. In this context things will work as desired because the changed prefix set in the insmod hook will be used. Michel also had a good use for it, which is to provide cheap builtin trace/logging. I expect as grub gets more powerful more uses not thought of will crop up. --Sig_/E4cBUp/FJqGbCoHrR9=Np_Y Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQEcBAEBAgAGBQJThDBjAAoJEEPj94mUXoYs9z4IAIbuYkKBW3rMyff93H5IRK9n qvru2bbqHfncjCMWksANeEdyQiovDsxgjO4A9rKlB4pKSNJNac3rQUnV9XwNPUHB MQxCmQ7C1aulSpJFMDPdICRUWXjks/6FUWPKssM+E4pB9UDam42kwih6L6zeADK2 4a2XmJDMGMa93R/gIz7juv4Azcf8LOr/hhcr014j8IiKLXc4nQR7zRfZJiatTFml hlg1qx2ct599/zyedhoe7JfqUwlwkSTY9vrXTyf6VvVIrYC40/lGk7xUJsQtjotQ 7+qdJIymn6DFSqSI6q7jOnfUwk6vB3irXCelhSLWzouck72A6vGiJu9Qaxsy05c= =zgx2 -----END PGP SIGNATURE----- --Sig_/E4cBUp/FJqGbCoHrR9=Np_Y--