From: "Jan Beulich" Subject: Re: [PATCH for-4.5 V6 10/14] Add arch specific module handling to read_file() Date: Wed, 24 Sep 2014 17:02:34 +0100 Message-ID: <5423073A02000078000387A5@mail.emea.novell.com> References: <1411534992-27443-1-git-send-email-roy.franz@linaro.org> <1411534992-27443-11-git-send-email-roy.franz@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411534992-27443-11-git-send-email-roy.franz@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roy Franz Cc: keir@xen.org, ian.campbell@citrix.com, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 24.09.14 at 07:03, wrote: > +static void __init efi_arch_handle_module(struct file *file, const CHAR16 *name, > + char *options) > +{ > + union string local_name; > + void *ptr; > + > + /* > + * Make a copy, as conversion is destructive, and caller still wants > + * wide string available after this call returns. > + */ > + if ( efi_bs->AllocatePool(EfiLoaderData, (wstrlen(name) + 1) * sizeof(*name), > + &ptr) != EFI_SUCCESS ) > + blexit(L"ERROR Unable to allocate string buffer"); As I keep seeing this: Please drop these "ERROR " prefixes from blexit() messages - their text already makes clear that this is an error (and even more so together with the module returning to whatever component invoked it). > + > + local_name.w = ptr; > + wstrcpy(local_name.w, name); > + w2s(&local_name); > + > + place_string(&mb_modules[mbi.mods_count].string, options); > + place_string(&mb_modules[mbi.mods_count].string, ""); What is this good for btw? I don't see anything similar being done in the original code. Jan