[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCHv2] add "info ioapic" monitor command
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] Re: [PATCHv2] add "info ioapic" monitor command |
Date: |
Wed, 30 Dec 2009 11:50:13 -0200 |
On Wed, 30 Dec 2009 15:22:19 +0200
Gleb Natapov <address@hidden> wrote:
> > > +void do_info_ioapic(Monitor *mon, QObject **ret_data)
> > > +{
> > > + int i;
> > > + QList *list;
> > > +
> > > + *ret_data = NULL;
> > > +
> > > + if (!ioapic)
> > > + return;
> > > +
> > > + list = qlist_new();
> > > +
> > > + for (i = 0; i < IOAPIC_NUM_PINS; i++) {
> > > + QObject *obj;
> > > + uint64 e = ioapic->ioredtbl[i];
> > > + if (e & IOAPIC_LVT_MASKED) {
> > > + obj = qobject_from_jsonf("{'index': %d, 'masked': 1}", i);
> >
> > 'masked' should be a bool, using %i will do it, like:
> >
> >
> > obj = qobject_from_jsonf("{'index': %d, 'masked': %i}", i);
> No need to put anything here? ------------------------------^?
> OR should it be
> obj = qobject_from_jsonf("{'index': %d, 'masked': %i}", i, true);
Oh yes, you right. Actually, you can do:
obj = qobject_from_jsonf("{'index': %d, 'masked': true }", i);
I would also include this key in the unmasked dict (the one
you fill in the else clause), just for consistency in the protocol.
And yes, having to worry about the protocol in the handler is a sign
that we have to improve.
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, (continued)
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Gleb Natapov, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Izik Eidus, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Gleb Natapov, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Anthony Liguori, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Gleb Natapov, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Anthony Liguori, 2009/12/31
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Gleb Natapov, 2009/12/31
Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Luiz Capitulino, 2009/12/30
[Qemu-devel] Re: [PATCHv2] add "info ioapic" monitor command, Luiz Capitulino, 2009/12/30
Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Avi Kivity, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Gleb Natapov, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Avi Kivity, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Anthony Liguori, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Gleb Natapov, 2009/12/30
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Anthony Liguori, 2009/12/31
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Gleb Natapov, 2009/12/31
- Re: [Qemu-devel] [PATCHv2] add "info ioapic" monitor command, Anthony Liguori, 2009/12/31