From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 1/5] xl: Command line: Adjust "Fix segfaults from `xl psr-cat-cbm-set`..." Date: Fri, 17 Jul 2015 18:04:45 +0100 Message-ID: <55A935AD.7060707@citrix.com> References: <1437152451-22507-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1437152451-22507-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson , xen-devel@lists.xensource.com Cc: Chao Peng , Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 17/07/15 18:00, Ian Jackson wrote: > This adjust commit a49077e5 "Fix segfaults from `xl psr-cat-cbm-set` > command line handling": > > * Do not use the constant `required_argument' here (we simply use 1 > everywhere else). > > * Fix the minimum required arguments argument to SWITCH_FOREACH_OPT. > > Leave the separate check on optind, because it checks for too many as > well as too few arguments. > > (There are many things in xl which fail to check for too many > arguments. I do not intend to drain that swamp now: I started but > decided a complete overhaul of most of xl's command line argument > processing would be best.) > > This is just a code cleanup with no ultimate functional change. > > Signed-off-by: Ian Jackson > CC: Chao Peng > CC: Andrew Cooper Reviewed-by: Andrew Cooper I had not realised about the final parameter to SWITCH_FOREACH_OPT(). (The patch was a fix while I was attempting to get something else working)