Linux major/minor conversion not entirely correct

John E Hein jhein at timing.com
Mon Jun 2 14:46:41 UTC 2008


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?


More information about the freebsd-emulation mailing list