From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UOwy7-0002t4-78 for mharc-grub-devel@gnu.org; Sun, 07 Apr 2013 17:17:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOwy0-0002sB-Vd for grub-devel@gnu.org; Sun, 07 Apr 2013 17:17:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOwxv-00018X-Hx for grub-devel@gnu.org; Sun, 07 Apr 2013 17:17:36 -0400 Received: from mail-ea0-x22d.google.com ([2a00:1450:4013:c01::22d]:52816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOwxv-00016b-BY for grub-devel@gnu.org; Sun, 07 Apr 2013 17:17:31 -0400 Received: by mail-ea0-f173.google.com with SMTP id k11so1961522eaj.4 for ; Sun, 07 Apr 2013 14:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=wkMxHlhcD8AlXCAml/A388gxTRmBOvOvQjE5iUT1hQs=; b=ZevSBzkkhhTf/POWknP4B8zsbTmwOS2QfgKn2gzzux0tmKLdtS8YBA+RR+ziCg4EbG lL0+vesb5OObZrTlS+jSEBQ47trZdzp2RkNEEcW6/Brk3AzYQJ40gQMhWJMr227rXM/m ZxRPS3TrCE7bWrOCb53UjBolyqgNGQBRujtLiZ93UYa8lQhnmPezxs9DDUn0pqQ6yX4e rUmkmb9W4GcTKskyvRpJpAGwI76jwB2jfx7H65xkCrQdnRJPZqLU3xGbd3eiRvEiF3fv sAc/QBCn8pg62ZHDhonMG1oUIzmVY29JxZy7PitA+I1kJSW+rasT9srQxYG8fMPxcGsp fAug== X-Received: by 10.15.24.14 with SMTP id i14mr41778789eeu.25.1365369450033; Sun, 07 Apr 2013 14:17:30 -0700 (PDT) Received: from [192.168.56.2] (ge-19-103-61.service.infuturo.it. [151.19.103.61]) by mx.google.com with ESMTPS id t4sm28424084eel.0.2013.04.07.14.17.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Apr 2013 14:17:29 -0700 (PDT) Message-ID: <5161E27A.5050009@gmail.com> Date: Sun, 07 Apr 2013 23:17:46 +0200 From: Francesco Lavra User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH 6/7] add ARM Linux loader References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22d Cc: Leif Lindholm 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: Sun, 07 Apr 2013 21:17:41 -0000 Hi, I noticed another minor issue in this patch. On 03/24/2013 06:01 PM, Leif Lindholm wrote: > --- grub-core/loader/arm/linux.c 1970-01-01 00:00:00 +0000 > +++ grub-core/loader/arm/linux.c 2013-03-24 13:49:04 +0000 [...] > +static grub_err_t > +grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), > + int argc, char *argv[]) > +{ > + grub_file_t file; > + int size; > + > + if (argc == 0) > + return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); > + > + file = grub_file_open (argv[0]); > + if (!file) > + return grub_errno; > + > + size = grub_file_size (file); > + if (size == 0) > + goto fail; > + > +#ifdef GRUB_MACHINE_EFI > + initrd_start = (grub_addr_t) grub_efi_allocate_loader_memory (LINUX_INITRD_PHYS_OFFSET, size); > +#else > + initrd_start = LINUX_INITRD_ADDRESS; > +#endif > + grub_dprintf ("loader", "Loading initrd to 0x%08x\n", > + (grub_addr_t) initrd_start); > + > + if (grub_file_read (file, (void *) initrd_start, size) != size) > + goto fail; > + > + initrd_end = initrd_start + size; > + > + return GRUB_ERR_NONE; The file should be closed also if the initrd is successfully loaded. > + > +fail: > + grub_file_close (file); > + > + return grub_errno; > +} -- Francesco