add preliminary support for devfs (e.g. MOUNT_DEVFS #define, etc.)

This commit is contained in:
cgd 1993-06-10 01:02:59 +00:00
parent 7cbe7ab893
commit b907fbcbb9
3 changed files with 27 additions and 6 deletions

View File

@ -1,8 +1,8 @@
# $Header: /cvsroot/src/sbin/init/Makefile,v 1.5 1993/04/26 14:54:38 cgd Exp $
# $Id: Makefile,v 1.6 1993/06/10 01:02:59 cgd Exp $
PROG= init
#SRCS= init.c
CFLAGS+= -DSECURE_CONSOLE
CFLAGS+= -DSECURE_CONSOLE -DUSE_DEVFS
DPADD= ${LIBUTIL}
LDADD= -lutil
NOMAN=noman

View File

@ -29,11 +29,10 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: init.c,v 1.7 1993/06/10 01:03:02 cgd Exp $
*/
/* $Header: /cvsroot/src/sbin/init/init.c,v 1.6 1993/04/26 14:54:43 cgd Exp $ */
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/signal.h>
@ -46,6 +45,10 @@
#include <pwd.h>
#endif
#ifdef USE_DEVFS
#include <sys/mount.h>
#endif
#define NTTY 32 /* max ttys */
#define NARG 16 /* max args to login/getty */
@ -175,6 +178,15 @@ char **argv;
sflag++;
else if(!strcmp(argv[1], "-f"))
Reboot = 0;
#ifdef USE_DEVFS
if (mount(MOUNT_DEVFS, "/dev", 0, (caddr_t) 0) < 0) {
writes(2, "init: couldn't mount /dev\n");
perror( " mount");
writes(2, " trying to continue...\n");
}
#endif
top:
/* Single user mode? */
if(sflag) {

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)vfs_conf.c 7.3 (Berkeley) 6/28/90
* $Id: vfs_conf.c,v 1.6 1993/05/20 02:55:34 cgd Exp $
* $Id: vfs_conf.c,v 1.7 1993/06/10 01:03:24 cgd Exp $
*/
#include "param.h"
@ -80,6 +80,10 @@ extern struct vfsops fdesc_vfsops;
extern struct vfsops kernfs_vfsops;
#endif
#ifdef DEVFS
extern struct vfsops devfs_vfsops;
#endif
struct vfsops *vfssw[] = {
(struct vfsops *)0, /* 0 = MOUNT_NONE */
&ufs_vfsops, /* 1 = MOUNT_UFS */
@ -113,4 +117,9 @@ struct vfsops *vfssw[] = {
#else
(struct vfsops *)0,
#endif
#ifdef DEVFS
&devfs_vfsops, /* 8 = MOUNT_DEVFS */
#else
(struct vfsops *)0,
#endif
};