grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] add --boot-directory option to grub-mkstandalone


From: Colin Watson
Subject: Re: [PATCH] add --boot-directory option to grub-mkstandalone
Date: Fri, 20 Dec 2013 12:16:16 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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                                       address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]