/*
- * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2010 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
static int devfs_statfs( struct mount *mp, struct vfsstatfs *sbp, vfs_context_t ctx);
static int devfs_vfs_getattr(mount_t mp, struct vfs_attr *fsap, vfs_context_t ctx);
+#if !defined(SECURE_KERNEL)
extern int setup_kmem;
__private_extern__ void devfs_setup_kmem(void);
-
+#endif
/*-
* Called from the generic VFS startups.
UID_ROOT, GID_WHEEL, 0622, "console");
devfs_make_node(makedev(2, 0), DEVFS_CHAR,
UID_ROOT, GID_WHEEL, 0666, "tty");
+#if !defined(SECURE_KERNEL)
if (setup_kmem) {
devfs_setup_kmem();
}
+#endif
devfs_make_node(makedev(3, 2), DEVFS_CHAR,
UID_ROOT, GID_WHEEL, 0666, "null");
devfs_make_node(makedev(3, 3), DEVFS_CHAR,
return 0;
}
+#if !defined(SECURE_KERNEL)
__private_extern__ void
devfs_setup_kmem(void)
{
devfs_make_node(makedev(3, 1), DEVFS_CHAR,
UID_ROOT, GID_KMEM, 0640, "kmem");
}
+#endif
/*-
/*
* Get vnode to be covered
*/
- NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE,
+ NDINIT(&nd, LOOKUP, OP_MOUNT, FOLLOW | LOCKLEAF, UIO_SYSSPACE,
CAST_USER_ADDR_T(mntname), ctx);
if ((error = namei(&nd))) {
- printf("devfs_kernel_mount: failed to find directory '%s', %d",
+ printf("devfs_kernel_mount: failed to find directory '%s', %d\n",
mntname, error);
return (error);
}
error = devfs_mount(mp, NULL, USER_ADDR_NULL, ctx);
if (error) {
- printf("devfs_kernel_mount: mount %s failed: %d", mntname, error);
+ printf("devfs_kernel_mount: mount %s failed: %d\n", mntname, error);
mp->mnt_vtable->vfc_refcount--;
vfs_unbusy(mp);