From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBgxS-0005fY-Fp for qemu-devel@nongnu.org; Fri, 07 Feb 2014 03:38:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBgxM-0004Kb-GM for qemu-devel@nongnu.org; Fri, 07 Feb 2014 03:38:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBgxM-0004Jv-7j for qemu-devel@nongnu.org; Fri, 07 Feb 2014 03:38:40 -0500 Message-ID: <52F49B7E.6090308@redhat.com> Date: Fri, 07 Feb 2014 09:38:22 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1391729892-17783-1-git-send-email-pbonzini@redhat.com> <52F4879E.7040300@redhat.com> <52F495C8.8030800@msgid.tls.msk.ru> In-Reply-To: <52F495C8.8030800@msgid.tls.msk.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v18 00/10] Shared library module support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Kevin Wolf , Peter Maydell , Peter Maydell , Stefan Hajnoczi , QEMU Developers , Alex Bligh , Miroslav Rezanina , Lluis Vilanova , Richard Henderson Il 07/02/2014 09:14, Michael Tokarev ha scritto: > 07.02.2014 11:13, Paolo Bonzini wrote: >> > Il 07/02/2014 01:06, Peter Maydell ha scritto: >>> >> Why do we need OS specific code to do this when the code >>> >> in vl.c for getting the executable path to use as a base for >>> >> finding bios blobs works fine without OS specific code? >> > >> > That's because right now module_call_init is not receiving an argv[0] to pass to qemu_exec_dir (os_find_datadir has an argument for that). It can be fixed (in the whole call chain, including e.g. bdrv_init/bdrv_init_with_whitelist). > > We can add a global variable (either executable_dir or whole -L path), > init it in vl.c as we do now, and use it in other places in a uniform > way. FWIW there's not just vl.c, there's also qemu-io.c and qemu-img.c. In the future tests could also need to do the same. > BTW, It'd be really good to have a separate, arch-specific directory for > the plugins, like /usr/lib/x86_64-linux-gnu/qemu/, so it will be > multiarch-able. But it is not really a show-stopper. Why isn't it enough to do --libdir=/usr/lib/x86_64-linux-gnu? Paolo