On 07.12.2013 20:51, Andrey Borzenkov wrote: > It is legal to use "configfile <top level filename>" where filename does > not contain directory part. In this case config_directory is set to filename. > Set it to empty string so $config_directory/file works as expected. > The only filenames valid in GRUB are of forms: [(device)]/path [(device)]blocklist All others are invalid even if the happend to be accepted by current version. > May be it makes sense to generate full pathname (including device part) > so that interpretation of $config_directory does not depend on possible > change of $root. > > --- > grub-core/normal/main.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c > index 991a595..16f22fb 100644 > --- a/grub-core/normal/main.c > +++ b/grub-core/normal/main.c > @@ -196,6 +196,8 @@ read_config_file (const char *config) > ptr = grub_strrchr (config_dir, '/'); > if (ptr) > *ptr = 0; > + else if (config_dir) > + *config_dir = 0; > grub_env_set ("config_directory", config_dir); > grub_free (config_dir); > >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel