From owner-freebsd-current Wed Nov 1 10:52:53 2000 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 9F05937B4D7 for ; Wed, 1 Nov 2000 10:52:49 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.9.3) with ESMTP id eA1IoDu22111; Wed, 1 Nov 2000 19:50:13 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Andrew Gallatin Cc: Marcel Moolenaar , freebsd-current@freebsd.org Subject: Re: linux emulation In-Reply-To: Your message of "Wed, 01 Nov 2000 13:37:36 EST." <14848.25175.990127.871765@grasshopper.cs.duke.edu> Date: Wed, 01 Nov 2000 19:50:13 +0100 Message-ID: <22109.973104613@critter> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I was just looking at that piece of code, and I couldn't entirely make out what it was even trying to do. Can somebody more linuxolator savy explain what the function linux_ustat() should produce. I also find this comment rather interesting... /* * XXX - Don't return an error if we can't find a vnode for the * device. Our dev_t is 32-bits whereas Linux only has a 16-bits * dev_t. The dev_t that is used now may as well be a truncated * dev_t returned from previous syscalls. Just return a bzeroed * ustat in that case. */ Poul-Henning In message <14848.25175.990127.871765@grasshopper.cs.duke.edu>, Andrew Gallatin writes: > >Marcel Moolenaar writes: > > Wesley Morgan wrote: > > > > > > Anyone having problems with the linuxulator the past couple days? > > > > Define "past couple of days". I have a working linuxulator made on Oct > > 29, 12:25 PST. > >phk took away mkbdev on 10/31. The following "fixes" it, but I >have no idea if it is correct: > >Drew > >Index: compat/linux/linux_stats.c >=================================================================== >RCS file: /home/ncvs/src/sys/compat/linux/linux_stats.c,v >retrieving revision 1.22 >diff -u -r1.22 linux_stats.c >--- compat/linux/linux_stats.c 2000/08/22 01:51:11 1.22 >+++ compat/linux/linux_stats.c 2000/11/01 18:34:05 >@@ -360,8 +379,8 @@ > * dev_t returned from previous syscalls. Just return a bzeroed > * ustat in that case. > */ >- dev = makebdev(uap->dev >> 8, uap->dev & 0xFF); >- if (vfinddev(dev, VBLK, &vp)) { >+ dev = makedev(uap->dev >> 8, uap->dev & 0xFF); >+ if (vfinddev(dev, VCHR, &vp)) { > if (vp->v_mount == NULL) > return (EINVAL); > stat = &(vp->v_mount->mnt_stat); > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message