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

Re: [Xen-devel] [PATCH v6 02/15] x86/boot/reloc: create generic alloc and copy functions



>>> On 12.09.16 at 22:18, <daniel.kiper@xxxxxxxxxx> wrote:
> -multiboot_info_t __stdcall *reloc(multiboot_info_t *mbi_old, u32 trampoline)
> +multiboot_info_t __stdcall *reloc(u32 mbi_old, u32 trampoline)
>  {
>      multiboot_info_t *mbi;
>      int i;
>  
>      alloc = trampoline;
>  
> -    mbi = reloc_mbi_struct(mbi_old, sizeof(*mbi));
> +    mbi = _p(copy_mem(mbi_old, sizeof(*mbi)));
>  
>      if ( mbi->flags & MBI_CMDLINE )
> -        mbi->cmdline = (u32)reloc_mbi_string((char *)mbi->cmdline);
> +        mbi->cmdline = copy_string(mbi->cmdline);
>  
>      if ( mbi->flags & MBI_MODULES )
>      {
> -        module_t *mods = reloc_mbi_struct(
> -            (module_t *)mbi->mods_addr, mbi->mods_count * sizeof(module_t));
> +        module_t *mods;
>  
> -        mbi->mods_addr = (u32)mods;
> +        mbi->mods_addr = copy_mem(mbi->mods_addr, mbi->mods_count * 
> sizeof(module_t));

With this long line suitably wrapped,
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>


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

 


Rackspace

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