From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Wray Subject: Re: xm create option parsing.. Date: Fri, 30 Jul 2004 09:19:00 +0100 Sender: xen-devel-admin@lists.sourceforge.net Message-ID: <410A0474.3090303@hpl.hp.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Steven Hand Cc: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org Steven Hand wrote: > As far as I can see, "xm create -c vmid=1" will create a domain and > attach to its console while "xm create vmid=1 -c" won't. > > Any reason for this? The option parsing routines xm/opts.py and > xm/create.py seems substantial enough. > It's an artifact of getopt - it stops parsing options at the first non-option. So xm create -c vmid=1 sets the -c option, whereas xm create vmid=1 -c doesn't. It think there's a getopt flag to process options anywhere in the args, but this is a problem for a multicommand like xm that has its own options as well as subcommand options. Basically options (-x, --x) have to precede args. Mike ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com