Message ID | 1264003702-17329-2-git-send-email-armbru@redhat.com |
---|---|
State | New |
Headers | show |
> -----Original Message----- > From: > qemu-devel-bounces+chris.krumme=windriver.com@nongnu.org > [mailto:qemu-devel-bounces+chris.krumme=windriver.com@nongnu.o > rg] On Behalf Of Markus Armbruster > Sent: Wednesday, January 20, 2010 10:08 AM > To: qemu-devel@nongnu.org > Subject: [Qemu-devel] [PATCH v2 1/8] monitor: Document > argument type 'M' > > Was forgotten in commit b6e098d7. > > Signed-off-by: Markus Armbruster <armbru@redhat.com> > --- > monitor.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/monitor.c b/monitor.c > index b9166c3..775fe3f 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -68,6 +68,8 @@ > * 's' string (accept optional quote) > * 'i' 32 bit integer > * 'l' target long (32 or 64 bit) > + * 'M' just like 'l', except in user mode the value is > + * multiplied by 2^20 (think Mebibyte) Hello Markus, Not sure of the best answer, but thought there should be some discussion. You mention Mebibyte, which according to the all knowing Wikipedia, is abbreviated Mi. I understand that if you will only support one, then maybe you don't need to differentiate from Megabyte, but then in a later patch you use m, u, and n for powers of 10. This causes your new double format to use powers of 2 above one and powers of 10 below. Maybe this is just one of those geek things, powers of 2 for integers, and powers of 10 for fractions. Good luck. Chris > * '/' optional gdb-like print format (like "/10x") > * > * '?' optional type (for all types, except '/') > -- > 1.6.6 > > > >
"Krumme, Chris" <Chris.Krumme@windriver.com> writes: > Hello Markus, > > Not sure of the best answer, but thought there should be some > discussion. > > You mention Mebibyte, which according to the all knowing Wikipedia, is > abbreviated Mi. > > I understand that if you will only support one, then maybe you don't > need to differentiate from Megabyte, but then in a later patch you use > m, u, and n for powers of 10. This causes your new double format to use > powers of 2 above one and powers of 10 below. Really? Argument types M and b use powers of 2. Argument type T uses powers of 10. > Maybe this is just one of those geek things, powers of 2 for integers, > and powers of 10 for fractions. > > Good luck. I merely reimplemented existing usage in a way that does the right thing for QMP. Can't say I like the ad-hocery there, but improving the (non-QMP) monitor is not my objective right now.
diff --git a/monitor.c b/monitor.c index b9166c3..775fe3f 100644 --- a/monitor.c +++ b/monitor.c @@ -68,6 +68,8 @@ * 's' string (accept optional quote) * 'i' 32 bit integer * 'l' target long (32 or 64 bit) + * 'M' just like 'l', except in user mode the value is + * multiplied by 2^20 (think Mebibyte) * '/' optional gdb-like print format (like "/10x") * * '?' optional type (for all types, except '/')
Was forgotten in commit b6e098d7. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- monitor.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)