From owner-cvs-all@FreeBSD.ORG Thu Nov 8 15:51:53 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 573A616A41A; Thu, 8 Nov 2007 15:51:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2871413C4B6; Thu, 8 Nov 2007 15:51:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lA8FprK5056083; Thu, 8 Nov 2007 15:51:53 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lA8FprZF056082; Thu, 8 Nov 2007 15:51:53 GMT (envelope-from jhb) Message-Id: <200711081551.lA8FprZF056082@repoman.freebsd.org> From: John Baldwin Date: Thu, 8 Nov 2007 15:51:53 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern tty_pty.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2007 15:51:53 -0000 jhb 2007-11-08 15:51:53 UTC FreeBSD src repository Modified files: sys/kern tty_pty.c Log: Make it easier to add more ptys to the pty(4) driver: - Use unit2minor() and minor2unit() to generate minor numbers to support unit numbers higher than 255. - Use simple string operations on the 'names' array rather than hard-coded constants and switch statements so that more ptys can be added by simply expanding the 'names' array. MFC after: 1 week Revision Changes Path 1.153 +12 -19 src/sys/kern/tty_pty.c