Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 2008 16:47:44 +0200
From:      Ed Schouten <ed@80386.nl>
To:        John E Hein <jhein@timing.com>
Cc:        freebsd-emulation@freebsd.org, philip@freebsd.org
Subject:   Re: Linux major/minor conversion not entirely correct
Message-ID:  <20080602144744.GU64397@hoeg.nl>
In-Reply-To: <18500.1974.681847.564212@gromit.timing.com>
References:  <20080602073152.GO64397@hoeg.nl> <18500.1974.681847.564212@gromit.timing.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
* John E Hein <jhein@timing.com> wrote:
> Ed Schouten wrote at 09:31 +0200 on Jun  2, 2008:
>  > +		/*
>  > +		 * Linux checks major and minors of the slave device
>  > +		 * to make sure it's a pty device, so let's make him
>  > +		 * believe it is.
>  > +		 */
>  > +		devno = strtoul(node + strlen("pts/"), NULL, 10);
>  > +		*major = 136 + (devno / 256);
>  > +		*minor = devno % 256;
>  > +		return 0;
> 
> Where does the magic number 136 come from?

Linux uses major numbers 136,137,138,... for PTY's.

-- 
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkhECBAACgkQ52SDGA2eCwV6AQCeMYE8lwW2+ue8pdziJ9Ol7SR7
XD4An1VqSVk0raWiZo8qEEe9fmieoYFI
=33dv
-----END PGP SIGNATURE-----
home | help

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