From owner-p4-projects@FreeBSD.ORG Thu Nov 11 19:30:46 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 95D4816A525; Thu, 11 Nov 2004 19:30:46 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4331516A4FE for ; Thu, 11 Nov 2004 19:30:46 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25D8543D5D for ; Thu, 11 Nov 2004 19:30:44 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id iABJUi1L031735 for ; Thu, 11 Nov 2004 19:30:44 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iABJUhpf031732 for perforce@freebsd.org; Thu, 11 Nov 2004 19:30:43 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Thu, 11 Nov 2004 19:30:43 GMT Message-Id: <200411111930.iABJUhpf031732@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 64893 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2004 19:30:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=64893 Change 64893 by rwatson@rwatson_tislabs on 2004/11/11 19:29:52 Correct possible merge-o from integ: variable arguments need to be processed in make_dev_credv(), but started/stopped and passed down transparently in make_dev() and make_dev_cred(). Otherwise all the devices get funny names, which is counter-productive to usability and functionality. Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/kern/kern_conf.c#12 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/kern/kern_conf.c#12 (text+ko) ==== @@ -442,10 +442,9 @@ static struct cdev * make_dev_credv(struct cdevsw *devsw, int minornr, uid_t uid, gid_t gid, - struct ucred *cr, int perms, const char *fmt, ...) + struct ucred *cr, int perms, const char *fmt, va_list ap) { struct cdev *dev; - va_list ap; int i; KASSERT((minornr & ~0xffff00ff) == 0, @@ -469,7 +468,6 @@ ("make_dev() by driver %s on pre-existing device (maj=%d, min=%d, name=%s)", devsw->d_name, major(dev), minor(dev), devtoname(dev))); - va_start(ap, fmt); i = vsnrprintf(dev->__si_namebuf, sizeof dev->__si_namebuf, 32, fmt, ap); if (i > (sizeof dev->__si_namebuf - 1)) { printf("WARNING: Device name truncated! (%s)\n",