From owner-freebsd-emulation@FreeBSD.ORG Tue Jun 3 21:38:14 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A6A31065670 for ; Tue, 3 Jun 2008 21:38:14 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 015E68FC0A for ; Tue, 3 Jun 2008 21:38:13 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 8D677680D60; Tue, 3 Jun 2008 23:37:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eTVw65a-bPye; Tue, 3 Jun 2008 23:37:18 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 23868680D5D; Tue, 3 Jun 2008 23:37:18 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m53LbHwP056904; Tue, 3 Jun 2008 23:37:17 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 3 Jun 2008 23:37:17 +0200 From: Roman Divacky To: Chagin Dmitry Message-ID: <20080603213717.GA56678@freebsd.org> References: <200805191106.m4JB6oBF011533@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: Current problem reports assigned to freebsd-emulation@FreeBSD.org X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2008 21:38:14 -0000 > struct l_dirent { > - l_long d_ino; > + l_ino_t d_ino; > l_off_t d_off; > l_ushort d_reclen; > char d_name[LINUX_NAME_MAX + 1]; this part is correct... linux indeed uses unsigned long which is l_ino_t. > @@ -536,6 +538,7 @@ linux_getdents64(struct thread *td, struct > linux_getdents64_args *args) > return (getdents_common(td, args, 1)); > } > > + > /* > * These exist mainly for hooks for doing /compat/linux translation. > */ > @@ -905,6 +908,7 @@ linux_truncate(struct thread *td, struct > linux_truncate_args *args) > return (error); > } > > +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) > int > linux_truncate64(struct thread *td, struct linux_truncate64_args *args) > { > @@ -922,6 +926,8 @@ linux_truncate64(struct thread *td, struct > linux_truncate64_args *args) > LFREEPATH(path); > return (error); > } > +#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ > + > int > linux_ftruncate(struct thread *td, struct linux_ftruncate_args *args) > { > @@ -1119,6 +1125,7 @@ linux_mount(struct thread *td, struct > linux_mount_args *args) > return (error); > } > > +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) > int > linux_oldumount(struct thread *td, struct linux_oldumount_args *args) > { > @@ -1128,6 +1135,7 @@ linux_oldumount(struct thread *td, struct > linux_oldumount_args *args) > args2.flags = 0; > return (linux_umount(td, &args2)); > } > +#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ > > int > linux_umount(struct thread *td, struct linux_umount_args *args) > @@ -1258,7 +1266,7 @@ bsd_to_linux_flock64(struct flock *bsd_flock, struct > l_flock64 *linux_flock) > #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ > > static int > -fcntl_common(struct thread *td, struct linux_fcntl64_args *args) > +fcntl_common(struct thread *td, struct linux_fcntl_args *args) > { > struct l_flock linux_flock; > struct flock bsd_flock; > @@ -1382,17 +1390,13 @@ fcntl_common(struct thread *td, struct > linux_fcntl64_args *args) > int > linux_fcntl(struct thread *td, struct linux_fcntl_args *args) > { > - struct linux_fcntl64_args args64; > > #ifdef DEBUG > if (ldebug(fcntl)) > printf(ARGS(fcntl, "%d, %08x, *"), args->fd, args->cmd); > #endif > > - args64.fd = args->fd; > - args64.cmd = args->cmd; > - args64.arg = args->arg; > - return (fcntl_common(td, &args64)); > + return (fcntl_common(td, args)); > } > > #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) > @@ -1401,6 +1405,7 @@ linux_fcntl64(struct thread *td, struct > linux_fcntl64_args *args) > { > struct l_flock64 linux_flock; > struct flock bsd_flock; > + struct linux_fcntl_args fcntl_args; > int error; > > #ifdef DEBUG > @@ -1441,7 +1446,10 @@ linux_fcntl64(struct thread *td, struct > linux_fcntl64_args *args) > (intptr_t)&bsd_flock)); > } > > - return (fcntl_common(td, args)); > + fcntl_args.fd = args->fd; > + fcntl_args.cmd = args->cmd; > + fcntl_args.arg = args->arg; > + return (fcntl_common(td, &fcntl_args)); > } > #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ the replacement of fcntl64 with fcntl does not make any sense to me. those structures are exactly the same... can you test if just the first fix (long -> unsigned long) is sufficient to make the problem go away? thnx! roman