Re: [RFC PATCH 3/6] RAMBlock: Add a name field

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

 



On Tue, 2010-06-08 at 15:07 -0500, Anthony Liguori wrote:
> On 06/08/2010 02:15 PM, Alex Williamson wrote:
> > The offset given to a block created via qemu_ram_alloc/map() is arbitrary,
> > let the caller specify a name so we can make a positive match.
> >
> > Note, this only addresses the qemu-kvm callers so far.
> >
> > -ram_addr_t qemu_ram_map(ram_addr_t size, void *host)
> > +ram_addr_t qemu_ram_map(const char *name, ram_addr_t size, void *host)
> >   {
> >       RAMBlock *new_block;
> >
> >       size = TARGET_PAGE_ALIGN(size);
> >       new_block = qemu_malloc(sizeof(*new_block));
> >
> > +    // XXX check duplicates
> > +    snprintf(new_block->name, sizeof(new_block->name), "%s", strdup(name));
> >    
> 
> That strdup() is probably unintentional.

Yep, thanks.

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux