From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X71Rp-0007G8-IJ for qemu-devel@nongnu.org; Tue, 15 Jul 2014 08:03:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X71Rg-0004pM-SY for qemu-devel@nongnu.org; Tue, 15 Jul 2014 08:03:05 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60365 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X71Rg-0004pI-Li for qemu-devel@nongnu.org; Tue, 15 Jul 2014 08:02:56 -0400 Message-ID: <53C5186F.8030102@suse.de> Date: Tue, 15 Jul 2014 14:02:55 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1405363942-6865-1-git-send-email-Joakim.Tjernlund@transmode.se> <53C43A21.1090907@suse.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] linux-user: make binfmt flag O require P List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Joakim Tjernlund Cc: Riku Voipio , =?ISO-8859-1?Q?Andreas_F=E4rber?= , qemu-devel@nongnu.org On 07/14/2014 11:37 PM, Joakim Tjernlund wrote: > Joakim Tjernlund/Transmode wrote on 2014/07/14 23:04:51: >>> Why do we need to modify argv[] here when we are building a >>> target_argv[] further down anyway? >> Because parse_opts() will not do it for me and I cannot figure out how > to modify >> parse_opts() whithout breaking it. > I took another look and now I came up with: > > From 886985747369947e3b28d7a5fb807abd4beae10c Mon Sep 17 00:00:00 2001 > From: Joakim Tjernlund > Date: Mon, 14 Jul 2014 20:17:28 +0200 > Subject: [PATCH] linux-user: make binfmt flag O require P > > QEMU can autodetect if it is started from Linux binfmt loader > when binfmt flag O is on. > Use that and require binfmt flag P as well which will enable QEMU > to pass in correct argv0 to the application. > > Signed-off-by: Joakim Tjernlund Acked-by: Alexander Graf Alex