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

Re: [Xen-devel] [PATCH for-4.5 V6 10/14] Add arch specific module handling to read_file()



>>> On 24.09.14 at 07:03, <roy.franz@xxxxxxxxxx> 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.