From owner-svn-src-head@FreeBSD.ORG Tue May 3 18:55:16 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCBB3106564A; Tue, 3 May 2011 18:55:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A22E08FC0A; Tue, 3 May 2011 18:55:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43ItG2r006895; Tue, 3 May 2011 18:55:16 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43ItGoP006893; Tue, 3 May 2011 18:55:16 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105031855.p43ItGoP006893@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 3 May 2011 18:55:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221398 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 18:55:16 -0000 Author: ae Date: Tue May 3 18:55:16 2011 New Revision: 221398 URL: http://svn.freebsd.org/changeset/base/221398 Log: Document make_dev_alias_p(). MFC after: 2 weeks Modified: head/share/man/man9/make_dev.9 Modified: head/share/man/man9/make_dev.9 ============================================================================== --- head/share/man/man9/make_dev.9 Tue May 3 18:54:18 2011 (r221397) +++ head/share/man/man9/make_dev.9 Tue May 3 18:55:16 2011 (r221398) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2010 +.Dd May 03, 2011 .Dt MAKE_DEV 9 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nm make_dev_credf , .Nm make_dev_p , .Nm make_dev_alias , +.Nm make_dev_alias_p , .Nm destroy_dev , .Nm destroy_dev_sched , .Nm destroy_dev_sched_cb , @@ -54,6 +55,8 @@ and DEVFS registration for devices .Fn make_dev_p "int flags" "struct cdev **cdev" "struct cdevsw *devsw" "struct ucred *cr" "uid_t uid" "gid_t gid" "int mode" "const char *fmt" ... .Ft struct cdev * .Fn make_dev_alias "struct cdev *pdev" "const char *fmt" ... +.Ft int +.Fn make_dev_alias_p "int flags" "struct cdev **cdev" "struct cdev *pdev" "const char *fmt" ... .Ft void .Fn destroy_dev "struct cdev *dev" .Ft void @@ -149,6 +152,15 @@ created device will be never destroyed return an error if the device name is invalid or already exists .El .Pp +Only +.Dv MAKEDEV_NOWAIT , +.Dv MAKEDEV_WAITOK +and +.Dv MAKEDEV_CHECKNAME +values are accepted for the +.Fn make_dev_alias_p +function. +.Pp The .Dv MAKEDEV_WAITOK flag is assumed if none of @@ -214,6 +226,13 @@ It is an error to call prior to calling .Fn make_dev . .Pp +.Fn make_dev_alias_p +function is similar to +.Fn make_dev_alias +but it takes a pointer to the resulting +.Ft *cdev +as an argument and may return an error. +.Pp The .Fa cdev returned by @@ -321,6 +340,8 @@ pointer, otherwise it will return .Sh ERRORS The .Fn make_dev_p +and +.Fn make_dev_alias_p call will fail and the device will be not registered if: .Bl -tag -width Er .It Bq Er ENOMEM