From: Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Muli Ben-Yehuda <muli-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH 2/2] Allow memory to be specified in kvmctl
Date: Tue, 09 Oct 2007 17:18:29 -0500 [thread overview]
Message-ID: <470BFE35.6030200@us.ibm.com> (raw)
In-Reply-To: <20071009221404.GO4335-WD1JZD8MxeCTrf4lBMg6DdBPR1lH4CV8@public.gmane.org>
Muli Ben-Yehuda wrote:
> On Tue, Oct 09, 2007 at 05:09:19PM -0500, Anthony Liguori wrote:
>
>
>>>> + default:
>>>> + fprintf(stderr,
>>>> + "Unrecongized memory suffix: %c\n",
>>>> + *endptr);
>>>> + exit(1);
>>>> + }
>>>> + break;
>>>>
>>>>
>>> How about adding a sanity check that memory_size makes sense here
>>> rather than having kvm_create() fail obscurely? For example if the
>>> user got the memory size wrong for some reason we'll end up with
>>> memory_size = 0 here.
>>>
>> There's an exit(1) and it's using stroull() so the only way that
>> memory_size could equal 0 is if the user specified --memory=0. I'm
>>
>
> Or made a mistake and specified memory=G, or memory=100G when he meant
> 100M, etc.
>
Okay, in that case, I agree. Have updated my patch.
Regards,
Anthony Liguori
>> not sure I agree it's worth checking for that sort of circumstance,
>> perhaps the user had a reason for doing it?
>>
>
> I'm a fan of the principle of least surprise.
>
> Cheers,
> Muli
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
prev parent reply other threads:[~2007-10-09 22:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 21:31 [PATCH 1/2] Remove memory size from linker script Anthony Liguori
[not found] ` <11919655141141-git-send-email-aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-10-09 21:31 ` [PATCH 2/2] Allow memory to be specified in kvmctl Anthony Liguori
[not found] ` <11919655153228-git-send-email-aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-10-09 21:54 ` Muli Ben-Yehuda
[not found] ` <20071009215449.GM4335-WD1JZD8MxeCTrf4lBMg6DdBPR1lH4CV8@public.gmane.org>
2007-10-09 22:09 ` Anthony Liguori
[not found] ` <470BFC0F.5040707-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-10-09 22:14 ` Muli Ben-Yehuda
[not found] ` <20071009221404.GO4335-WD1JZD8MxeCTrf4lBMg6DdBPR1lH4CV8@public.gmane.org>
2007-10-09 22:18 ` Anthony Liguori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=470BFE35.6030200@us.ibm.com \
--to=aliguori-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=muli-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.