[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field
From: |
Alex Williamson |
Subject: |
[Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field |
Date: |
Tue, 08 Jun 2010 14:09:40 -0600 |
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
- [Qemu-devel] [RFC PATCH 2/6] ram_blocks: Convert to a QLIST, (continued)
[Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field, Alex Williamson, 2010/06/08
- [Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field, Anthony Liguori, 2010/06/08
- [Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field,
Alex Williamson <=
- [Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field, Chris Wright, 2010/06/08
- Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field, Paul Brook, 2010/06/08
- Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field, Anthony Liguori, 2010/06/08
- Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field, Paul Brook, 2010/06/08
- Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field, Alex Williamson, 2010/06/09
- Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field, Paul Brook, 2010/06/09
- Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field, Alex Williamson, 2010/06/09