From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vtz0B-0000mK-H3 for mharc-grub-devel@gnu.org; Fri, 20 Dec 2013 07:16:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtz08-0000l6-Gh for grub-devel@gnu.org; Fri, 20 Dec 2013 07:16:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vtz07-0003No-AD for grub-devel@gnu.org; Fri, 20 Dec 2013 07:16:20 -0500 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:59827 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtz07-0003Ni-4P for grub-devel@gnu.org; Fri, 20 Dec 2013 07:16:19 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1Vtz06-0005tx-2A for grub-devel@gnu.org; Fri, 20 Dec 2013 12:16:18 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Vtz05-0006kA-DI for grub-devel@gnu.org; Fri, 20 Dec 2013 12:16:17 +0000 Date: Fri, 20 Dec 2013 12:16:16 +0000 From: Colin Watson To: grub-devel@gnu.org Subject: Re: [PATCH] add --boot-directory option to grub-mkstandalone Message-ID: <20131220121616.GA25815@riva.ucam.org> References: <20131213131841.GW5883@riva.ucam.org> <1386949254-7733-1-git-send-email-arvidjaar@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1386949254-7733-1-git-send-email-arvidjaar@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:ba8:1e3:: 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: Fri, 20 Dec 2013 12:16:21 -0000 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 [cjwatson@ubuntu.com]