Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jul 1999 22:20:43 +0200
From:      Poul-Henning Kamp <phk@freebsd.org>
To:        current@freebsd.org
Subject:   please test (linux emulation)
Message-ID:  <10556.932242843@critter.freebsd.dk>

next in thread | raw e-mail | index | archive | help

I have no idea how to excercise this piece of code, if somebody
could verify that it still DTRT I would be most grateful.

Poul-Henning

Index: linux_file.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/linux/linux_file.c,v
retrieving revision 1.26
diff -u -r1.26 linux_file.c
--- linux_file.c	1999/05/11 19:54:19	1.26
+++ linux_file.c	1999/07/17 20:18:42
@@ -43,6 +43,7 @@
 #include <sys/dirent.h>
 #include <sys/conf.h>
 #include <sys/tty.h>
+#include <miscfs/specfs/specdev.h>
 
 #include <i386/linux/linux.h>
 #include <i386/linux/linux_proto.h>
@@ -199,7 +200,6 @@
     struct filedesc *fdp;
     struct file *fp;
     struct vnode *vp;
-    struct vattr va;
     long pgid;
     struct pgrp *pgrp;
     struct tty *tp, *(*d_tty) __P((dev_t));
@@ -304,10 +304,7 @@
 	vp = (struct vnode *)fp->f_data;
 	if (vp->v_type != VCHR)
 	    return EINVAL;
-	if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p)))
-	    return error;
-
-	dev = udev2dev(va.va_rdev, 0);		/* XXX vp->v_rdev ? */
+	dev = vp->v_rdev;
 	d_tty = devsw(dev)->d_devtotty;
 	if (!d_tty || (!(tp = (*d_tty)(dev))))
 	    return EINVAL;

--
Poul-Henning Kamp             FreeBSD coreteam member
phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
FreeBSD -- It will take a long time before progress goes too far!


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10556.932242843>