From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctxCO-0004kv-IP for qemu-devel@nongnu.org; Fri, 31 Mar 2017 10:06:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctxCK-0002bm-Ev for qemu-devel@nongnu.org; Fri, 31 Mar 2017 10:06:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42922) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctxCK-0002ap-6b for qemu-devel@nongnu.org; Fri, 31 Mar 2017 10:06:40 -0400 References: <149096834395.26958.7919143982719167728.stgit@bahia.lan> From: Paolo Bonzini Message-ID: <50a94a08-4200-71ea-d74a-f28df015d2c6@redhat.com> Date: Fri, 31 Mar 2017 16:06:35 +0200 MIME-Version: 1.0 In-Reply-To: <149096834395.26958.7919143982719167728.stgit@bahia.lan> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [for-2.10 PATCH] fsdev: move stub to libqemustub.a List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz , qemu-devel@nongnu.org Cc: Pradeep Jagadeesh On 31/03/2017 15:52, Greg Kurz wrote: > The qemu_fsdev_add() stub is used by targets that don't build VirtFS, like > CRIS for example. This can be handled by libqemustub.a. It can, the question is do we want them to. :) The original purpose of the stubs was for function residing in files that aren't easily separated from the rest of the build. Putting everything in stubs/ easily leads to dead code in libqemustub.a, though I understand that it's somewhat easier (no need to use if/else and CONFIG_ALL). Paolo > Signed-off-by: Greg Kurz > --- > fsdev/Makefile.objs | 6 ------ > fsdev/qemu-fsdev-dummy.c | 21 --------------------- > stubs/Makefile.objs | 1 + > stubs/qemu-fsdev-dummy.c | 21 +++++++++++++++++++++ > 4 files changed, 22 insertions(+), 27 deletions(-) > delete mode 100644 fsdev/qemu-fsdev-dummy.c > create mode 100644 stubs/qemu-fsdev-dummy.c > > diff --git a/fsdev/Makefile.objs b/fsdev/Makefile.objs > index 659df6e18767..e2eea86d680a 100644 > --- a/fsdev/Makefile.objs > +++ b/fsdev/Makefile.objs > @@ -2,11 +2,5 @@ ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) > # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add. > # only pull in the actual virtio-9p device if we also enabled virtio. > common-obj-y = qemu-fsdev.o 9p-marshal.o 9p-iov-marshal.o > -else > -common-obj-y = qemu-fsdev-dummy.o > endif > common-obj-y += qemu-fsdev-opts.o qemu-fsdev-throttle.o > - > -# Toplevel always builds this; targets without virtio will put it in > -# common-obj-y > -common-obj-$(CONFIG_ALL) += qemu-fsdev-dummy.o > diff --git a/fsdev/qemu-fsdev-dummy.c b/fsdev/qemu-fsdev-dummy.c > deleted file mode 100644 > index 6dc0fbc4c402..000000000000 > --- a/fsdev/qemu-fsdev-dummy.c > +++ /dev/null > @@ -1,21 +0,0 @@ > -/* > - * 9p > - * > - * Copyright IBM, Corp. 2010 > - * > - * Authors: > - * Gautham R Shenoy > - * > - * This work is licensed under the terms of the GNU GPL, version 2. See > - * the COPYING file in the top-level directory. > - * > - */ > -#include "qemu/osdep.h" > -#include "qemu-fsdev.h" > -#include "qemu/config-file.h" > -#include "qemu/module.h" > - > -int qemu_fsdev_add(QemuOpts *opts) > -{ > - return 0; > -} > diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs > index 224f04ba6970..f67943da20e9 100644 > --- a/stubs/Makefile.objs > +++ b/stubs/Makefile.objs > @@ -37,3 +37,4 @@ stub-obj-y += target-monitor-defs.o > stub-obj-y += target-get-monitor-def.o > stub-obj-y += pc_madt_cpu_entry.o > stub-obj-y += vmgenid.o > +stub-obj-$(CONFIG_VIRTFS) += qemu-fsdev-dummy.o > diff --git a/stubs/qemu-fsdev-dummy.c b/stubs/qemu-fsdev-dummy.c > new file mode 100644 > index 000000000000..12f2be21f915 > --- /dev/null > +++ b/stubs/qemu-fsdev-dummy.c > @@ -0,0 +1,21 @@ > +/* > + * 9p > + * > + * Copyright IBM, Corp. 2010 > + * > + * Authors: > + * Gautham R Shenoy > + * > + * This work is licensed under the terms of the GNU GPL, version 2. See > + * the COPYING file in the top-level directory. > + * > + */ > +#include "qemu/osdep.h" > +#include "fsdev/qemu-fsdev.h" > +#include "qemu/config-file.h" > +#include "qemu/module.h" > + > +int qemu_fsdev_add(QemuOpts *opts) > +{ > + return 0; > +} >