Subject: Re: linux compatibility jdb oddity.
To: Mark Davies <mark@mcs.vuw.ac.nz>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: current-users
Date: 05/19/2002 20:38:20
--ELM724671006-23361-0_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII

Hmm, thanks for tracking this down.

This definitely seems like some sort of stat(2) lossage. However,
plain old non-64bit safe Linux stat syscalls were not changed recently.
I spotted a strange thing in i386 linux_fakedev(), which was
changed recently during the linux 64bit syscall fixes.

Can you try if appended patch improves things any for you?

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/Ports/i386/ps2.html
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-

--ELM724671006-23361-0_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=ISO-8859-2
Content-Disposition: attachment; filename=fakedev.diff

Index: linux_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/compat/linux/arch/i386/linux_machdep.c,v
retrieving revision 1.76
diff -u -p -r1.76 linux_machdep.c
--- linux_machdep.c	2002/05/13 05:35:47	1.76
+++ linux_machdep.c	2002/05/19 18:36:21
@@ -560,10 +560,9 @@ linux_fakedev(dev, raw)
 		if (major(dev) == NETBSD_WSCONS_MAJOR)
 			return makedev(LINUX_CONS_MAJOR, (minor(dev) + 1));
 #endif
-		return 0;
-	} else {
-		return dev;
 	}
+
+	return dev;
 }
 
 #if (NWSDISPLAY > 0)

--ELM724671006-23361-0_--