Rename the autoloaded property list from <module>.prop to <module>.plist

as discussed on tech-kern.
This commit is contained in:
jnemeth 2010-11-28 00:26:38 +00:00
parent 8c7bf08190
commit 22405528a4
4 changed files with 16 additions and 15 deletions

View File

@ -1,4 +1,4 @@
# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1463 $>
# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1464 $>
#
#
# [Note: This file does not mention every change made to the NetBSD source tree.
@ -791,3 +791,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
openssh: Import 5.6. [adam 20101121]
dhcpcd(8): Import dhcpcd-5.2.9. [roy 20101127]
postfix(1): Import version 2.7.2 [tron 20101127]
module: Rename <module>.prop to <module>.plist. [jnemeth 20101127]

View File

@ -1,4 +1,4 @@
.\" $NetBSD: modctl.2,v 1.5 2010/08/18 01:55:32 pgoyette Exp $
.\" $NetBSD: modctl.2,v 1.6 2010/11/28 00:26:38 jnemeth Exp $
.\"
.\" Copyright (c) 2009 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -24,7 +24,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 26, 2009
.Dd November 27, 2010
.Dt MODCTL 2
.Os
.Sh NAME
@ -98,7 +98,7 @@ The name/path of the module to load.
Zero or more of the following flag values:
.Bl -tag -compact -width "MODCTL_LOAD_FORCE"
.It Dv MODCTL_NO_PROP
Don't load \*[Lt]module\*[Gt].prop.
Don't load \*[Lt]module\*[Gt].plist.
.It Dv MODCTL_LOAD_FORCE
Ignore kernel version mismatch.
.El
@ -221,7 +221,7 @@ and
is not
.Dv 0 .
The kernel is unable to internalize the plist.
Or, there is a problem with the module or \*[Lt]module\*[Gt].prop.
Or, there is a problem with the module or \*[Lt]module\*[Gt].plist.
.It Bq Er EMLINK
The argument
.Fa operation

View File

@ -1,4 +1,4 @@
.\" $NetBSD: module.9,v 1.21 2010/08/25 06:45:35 jnemeth Exp $
.\" $NetBSD: module.9,v 1.22 2010/11/28 00:26:38 jnemeth Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd August 25, 2010
.Dd November 27, 2010
.Dt MODULE 9
.Os
.Sh NAME
@ -199,7 +199,7 @@ If a module is being loaded from the file system, and the
.Dv MODCTL_NO_PROP
flag is not set, the system searches for a file with the same name as the
module file, but with the suffix
.Dq Pa .prop .
.Dq Pa .plist .
If this file is found, the prop_dictionary it contains is loaded and
merged with the prop_dictionary from the
.Fa props

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_module_vfs.c,v 1.9 2010/11/19 06:44:43 dholland Exp $ */
/* $NetBSD: kern_module_vfs.c,v 1.10 2010/11/28 00:26:38 jnemeth Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.9 2010/11/19 06:44:43 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.10 2010/11/28 00:26:38 jnemeth Exp $");
#define _MODULE_INTERNAL
#include <sys/param.h>
@ -100,7 +100,7 @@ module_load_vfs(const char *name, int flags, bool autoload,
}
/*
* Load and process <module>.prop if it exists.
* Load and process <module>.plist if it exists.
*/
if (((flags & MODCTL_NO_PROP) == 0 && filedictp) || autoload) {
error = module_load_plist_vfs(path, nochroot, &moduledict);
@ -159,10 +159,10 @@ module_load_plist_vfs(const char *modpath, const bool nochroot,
proppath = PNBUF_GET();
strcpy(proppath, modpath);
pathlen = strlen(proppath);
if ((pathlen >= 5) && (strcmp(&proppath[pathlen - 5], ".kmod") == 0)) {
strcpy(&proppath[pathlen - 5], ".prop");
} else if (pathlen < MAXPATHLEN - 5) {
strcat(proppath, ".prop");
if ((pathlen >= 6) && (strcmp(&proppath[pathlen - 5], ".kmod") == 0)) {
strcpy(&proppath[pathlen - 5], ".plist");
} else if (pathlen < MAXPATHLEN - 6) {
strcat(proppath, ".plist");
} else {
error = ENOENT;
goto out1;