From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6uJm-0007r6-2O for qemu-devel@nongnu.org; Thu, 12 Jun 2008 17:26:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6uJj-0007oM-R3 for qemu-devel@nongnu.org; Thu, 12 Jun 2008 17:26:48 -0400 Received: from [199.232.76.173] (port=51100 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6uJj-0007o2-Md for qemu-devel@nongnu.org; Thu, 12 Jun 2008 17:26:47 -0400 Received: from il.qumranet.com ([212.179.150.194]:33946) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K6uJj-0003zO-Ax for qemu-devel@nongnu.org; Thu, 12 Jun 2008 17:26:47 -0400 Message-ID: <4851948E.4070300@qumranet.com> Date: Fri, 13 Jun 2008 00:26:38 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] New scriptarg=... -net parameter allows passing of an argument References: <18513.23567.23400.891876@mariner.uk.xensource.com> <48516D47.6080005@codemonkey.ws> In-Reply-To: <48516D47.6080005@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori wrote: > Ian Jackson wrote: >> Previously, network scripts would have to do all of their work based >> only on the script name and interface name. If the script's behaviour >> is supposed to be different for different network interfaces this >> might involve constructing a special script for each interface with >> the associated need to delete it etc. >> > > env args should get passed down to the script although I can see an > argument for being able to specify this in -net. My only suggestion > would be to use an env arg instead of "$2" as it will make it easier > to extend in the future. Environment variables are global, whereas scriptarg is per-interface. Consider the case where scriptarg denotes the bridge name we want the interface to attach to. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.