From owner-freebsd-emulation@FreeBSD.ORG Mon Jun 2 14:46:41 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBEE9106567A for ; Mon, 2 Jun 2008 14:46:41 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (smtp.timing.com [206.168.13.218]) by mx1.freebsd.org (Postfix) with ESMTP id 99F2D8FC1B for ; Mon, 2 Jun 2008 14:46:41 +0000 (UTC) (envelope-from jhein@timing.com) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id m52EkJ6W047757; Mon, 2 Jun 2008 08:46:19 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.14.2/8.14.2) with ESMTP id m52EkFB7014439; Mon, 2 Jun 2008 08:46:15 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.14.2/8.14.2/Submit) id m52EkEg5014436; Mon, 2 Jun 2008 08:46:14 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18500.1974.681847.564212@gromit.timing.com> Date: Mon, 2 Jun 2008 08:46:14 -0600 From: John E Hein To: Ed Schouten In-Reply-To: <20080602073152.GO64397@hoeg.nl> References: <20080602073152.GO64397@hoeg.nl> X-Mailer: VM 7.19 under Emacs 22.1.1 X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on Daffy.timing.com X-Virus-Status: Clean Cc: freebsd-emulation@freebsd.org, philip@freebsd.org Subject: Re: Linux major/minor conversion not entirely correct X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2008 14:46:41 -0000 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?