From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RX5LT-0002Mn-8Y for qemu-devel@nongnu.org; Sun, 04 Dec 2011 01:14:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RX5LR-0003cB-DA for qemu-devel@nongnu.org; Sun, 04 Dec 2011 01:14:39 -0500 Received: from e33.co.us.ibm.com ([32.97.110.151]:53188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RX5LR-0003bz-1y for qemu-devel@nongnu.org; Sun, 04 Dec 2011 01:14:37 -0500 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 3 Dec 2011 23:14:34 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pB46EVIr071456 for ; Sat, 3 Dec 2011 23:14:31 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pB46EVVx015679 for ; Sat, 3 Dec 2011 23:14:31 -0700 From: "Aneesh Kumar K.V" In-Reply-To: <0NU781-1RMXwd37xU-00Tlba@icpu819.kundenserver.de> References: <0NU781-1RMXwd37xU-00Tlba@icpu819.kundenserver.de> Date: Sun, 04 Dec 2011 11:44:25 +0530 Message-ID: <87k46cuam6.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] Still build failure for qemu-1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: erik.rull@rdsoftware.de, qemu-devel@nongnu.org On Fri, 02 Dec 2011 14:22:03 +0100, erik.rull@rdsoftware.de wrote: > Hi all, > > there was the promise to test the build failure from rc4 with the released > version and that it should work. > > Its still present :-( please assist me here: > > CC libhw64/9pfs/coxattr.o > CC libhw64/9pfs/virtio-9p-handle.o > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function > 'handle_update_file_cred': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:95: warning: implicit > declaration of function 'openat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:95: warning: nested extern > declaration of 'openat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:103: warning: implicit > declaration of function 'fchownat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:103: warning: nested extern > declaration of 'fchownat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function 'handle_lstat': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:120: warning: implicit > declaration of function 'fstatat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:120: warning: nested extern > declaration of 'fstatat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function 'handle_readlink': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:135: warning: implicit > declaration of function 'readlinkat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:135: warning: nested extern > declaration of 'readlinkat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function 'handle_opendir': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:167: warning: implicit > declaration of function 'fdopendir' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:167: warning: nested extern > declaration of 'fdopendir' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:167: warning: assignment > makes pointer from integer without a cast > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function 'handle_mknod': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:265: warning: implicit > declaration of function 'mknodat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:265: warning: nested extern > declaration of 'mknodat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function 'handle_mkdir': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:283: warning: implicit > declaration of function 'mkdirat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:283: warning: nested extern > declaration of 'mkdirat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function 'handle_symlink': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:333: warning: implicit > declaration of function 'symlinkat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:333: warning: nested extern > declaration of 'symlinkat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function 'handle_link': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:363: warning: implicit > declaration of function 'linkat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:363: warning: nested extern > declaration of 'linkat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function 'handle_renameat': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:570: warning: implicit > declaration of function 'renameat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:570: warning: nested extern > declaration of 'renameat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function 'handle_unlinkat': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:593: warning: implicit > declaration of function 'unlinkat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:593: warning: nested extern > declaration of 'unlinkat' > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c: In function > 'handle_ioc_getversion': > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:616: error: > 'FS_IOC_GETVERSION' undeclared (first use in this function) > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:616: error: (Each undeclared > identifier is reported only once > /home/erik/qemu-1.0/hw/9pfs/virtio-9p-handle.c:616: error: for each > function it appears in.) > make[2]: *** [9pfs/virtio-9p-handle.o] Error 1 > make[1]: *** [subdir-libhw64] Error 2 > make[1]: Leaving directory `/home/erik/qemu-1.0' Can you try the below patch ? >>From 08397638951fd3c131a6145c849f0a218aa52347 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Tue, 29 Nov 2011 15:10:52 +0530 Subject: [PATCH] hw/9pfs: Improve portability to older systems handle fs driver require a set of newly added syscalls. Don't Compile handle FS driver if those syscalls are not available. Instead of adding #ifdef for all those syscalls we check for open by handle syscall. If that is available then rest of the syscalls used by the driver should be available. Signed-off-by: Aneesh Kumar K.V --- Makefile.objs | 4 ++-- fsdev/qemu-fsdev.c | 2 ++ hw/9pfs/virtio-9p-handle.c | 33 --------------------------------- 3 files changed, 4 insertions(+), 35 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index d7a6539..3a699ee 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -310,8 +310,8 @@ hw-obj-$(CONFIG_SOUND) += $(sound-obj-y) 9pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-local.o virtio-9p-xattr.o 9pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-xattr-user.o virtio-9p-posix-acl.o 9pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-coth.o cofs.o codir.o cofile.o -9pfs-nested-$(CONFIG_VIRTFS) += coxattr.o virtio-9p-handle.o -9pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-synth.o +9pfs-nested-$(CONFIG_VIRTFS) += coxattr.o virtio-9p-synth.o +9pfs-nested-$(CONFIG_OPEN_BY_HANDLE) += virtio-9p-handle.o hw-obj-$(CONFIG_REALLY_VIRTFS) += $(addprefix 9pfs/, $(9pfs-nested-y)) $(addprefix 9pfs/, $(9pfs-nested-y)): QEMU_CFLAGS+=$(GLIB_CFLAGS) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index 7fd2aa7..6684f7e 100644 --- a/fsdev/qemu-fsdev.c +++ b/fsdev/qemu-fsdev.c @@ -23,7 +23,9 @@ static QTAILQ_HEAD(FsDriverEntry_head, FsDriverListEntry) fsdriver_entries = static FsDriverTable FsDrivers[] = { { .name = "local", .ops = &local_ops}, +#ifdef CONFIG_OPEN_BY_HANDLE { .name = "handle", .ops = &handle_ops}, +#endif { .name = "synth", .ops = &synth_ops}, }; diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c index 7644ae5..a62f690 100644 --- a/hw/9pfs/virtio-9p-handle.c +++ b/hw/9pfs/virtio-9p-handle.c @@ -45,7 +45,6 @@ struct handle_data { int handle_bytes; }; -#ifdef CONFIG_OPEN_BY_HANDLE static inline int name_to_handle(int dirfd, const char *name, struct file_handle *fh, int *mnt_id, int flags) { @@ -56,38 +55,6 @@ static inline int open_by_handle(int mountfd, const char *fh, int flags) { return open_by_handle_at(mountfd, (struct file_handle *)fh, flags); } -#else - -struct rpl_file_handle { - unsigned int handle_bytes; - int handle_type; - unsigned char handle[0]; -}; -#define file_handle rpl_file_handle - -#ifndef AT_REMOVEDIR -#define AT_REMOVEDIR 0x200 -#endif -#ifndef AT_EMPTY_PATH -#define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */ -#endif -#ifndef O_PATH -#define O_PATH 010000000 -#endif - -static inline int name_to_handle(int dirfd, const char *name, - struct file_handle *fh, int *mnt_id, int flags) -{ - errno = ENOSYS; - return -1; -} - -static inline int open_by_handle(int mountfd, const char *fh, int flags) -{ - errno = ENOSYS; - return -1; -} -#endif static int handle_update_file_cred(int dirfd, const char *name, FsCred *credp) { -- 1.7.5.4