--===============3206771834715189182== Content-Type: multipart/alternative; boundary=001a11c314f653a23104fa35ce54 --001a11c314f653a23104fa35ce54 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le 22 mai 2014 09:32, "Vladimir '=CF=86-coder/phcoder' Serbinenko" < phcoder@gmail.com> a =C3=A9crit : > > On 19.05.2014 08:37, Glenn Washburn wrote: > > Currently, builtin commands take precedence over user-defined > > functions. This patch reverses that precedence, so that users can > > "override" builtin commands. Builtin commands may be accessed by > > issuing the command prefixed by an '@' character. > > > Overriding builtins sounds like a bad idea. For once it creates a > language which is heavily dependent on context. This gets hairy and > messy very fast. This probably true, but it add 2 great values for me. One can add tracing/debugging for cheap even on generated/3 party scripts, as afaik grub don't offer a tracing mode, this can be even more hairy. One can emulate some extra funtionnality on older version to some point, without the need to make custom wrappers, and requiring to hack 3rd party scripts. So it's true one can mess, and make the things dependant of context, and maybe not all builtin should be overwritable, but when one feel the need to override a builtin, he usually have good reason to do it, even if it can be done in other ways. > > My motivation for this change is to hook insmod in loaded configfiles > > which set $prefix to a different location than desired. If there are > > any changes needed to help get this functionality included, please let > > me know. > > > Could you detail your usercase more? $prefix is the location where > modules are, why not just set it to right location? > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > --001a11c314f653a23104fa35ce54 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Le 22 mai 2014 09:32, "Vladimir '=CF=86-coder/phcoder' Serbine= nko" <phcoder@gmail.com>= ; a =C3=A9crit :
>
> On 19.05.2014 08:37, Glenn Washburn wrote:
> > Currently, builtin commands take precedence over user-defined
> > functions. =C2=A0This patch reverses that precedence, so that use= rs can
> > "override" builtin commands. =C2=A0Builtin commands may= be accessed by
> > issuing the command prefixed by an '@' character.
> >
> Overriding builtins sounds like a bad idea. For once it creates a
> language which is heavily dependent on context. This gets hairy and > messy very fast.
This probably true, but it add 2 great values for me.
One can add tracing/debugging for cheap even on generated/3 party scripts, = as afaik grub don't offer a tracing mode, this can be even more hairy.<= br> One can emulate some extra funtionnality on older version to some point, wi= thout the need to make custom wrappers, and requiring to hack 3rd party scr= ipts.
So it's true one can mess, and make the things dependant of context, an= d maybe not all builtin should be overwritable, but when one feel the need = to override a builtin, he usually have good reason to do it, even if it can= be done in other ways.
> > My motivation for this change is to hook insmod in loaded configf= iles
> > which set $prefix to a different location than desired. =C2=A0If = there are
> > any changes needed to help get this functionality included, pleas= e let
> > me know.
> >
> Could you detail your usercase more? $prefix is the location where
> modules are, why not just set it to right location?
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://= lists.gnu.org/mailman/listinfo/grub-devel
>

--001a11c314f653a23104fa35ce54-- --===============3206771834715189182== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel --===============3206771834715189182==--