On Fri, Dec 13, 2013 at 07:40:54PM +0400, Andrey Borzenkov wrote:
> > 2) make it possible for grub-mkstandalone to build images with the
> >    prefix set to something other than (memdisk)/boot/grub
> 
> Like below?

Indeed, I like this general approach, and it's probably better than
fiddling around with "search".

> I'm not keen on using --boot-directory; may be using full
> --grub-directory (without implied ../grub) will actually be more
> logical.

I agree - I would prefer to explicitly specify the whole thing.  Could
you redo the patch that way?

>  enum
>    {
>      OPTION_OUTPUT = 'o',
> -    OPTION_FORMAT = 'O'
> +    OPTION_FORMAT = 'O',
> +    OPTION_BOOT_DIRECTORY = 0x301,
> +
>    };

Stray newline.

> @@ -346,8 +359,8 @@ main (int argc, char *argv[])
>    grub_install_push_module ("tar");
>  
>    grub_install_make_image_wrap (grub_install_source_directory,
> -                             "(memdisk)/boot/grub", output_image,
> -                             memdisk_img, NULL,
> +                             xasprintf ("(memdisk)%s/%s", bootdir, "grub"),
> +                             output_image, memdisk_img, NULL,
>                               grub_util_get_target_name (format), 0);
>  
>    grub_util_unlink (memdisk_img);

I'd probably assign the result of that xasprintf to a variable in order
to be able to free it, for valgrind-friendliness.

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to