Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs create null devices
details: https://anonhg.NetBSD.org/src/rev/4e1422604f29
branches: trunk
changeset: 785869:4e1422604f29
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Apr 04 01:29:55 2013 +0000
description:
create null devices
diffstat:
sys/rump/librump/rumpvfs/devnull.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 52bff9db0919 -r 4e1422604f29 sys/rump/librump/rumpvfs/devnull.c
--- a/sys/rump/librump/rumpvfs/devnull.c Wed Apr 03 23:51:20 2013 +0000
+++ b/sys/rump/librump/rumpvfs/devnull.c Thu Apr 04 01:29:55 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: devnull.c,v 1.3 2011/02/10 11:01:31 pooka Exp $ */
+/* $NetBSD: devnull.c,v 1.4 2013/04/04 01:29:55 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: devnull.c,v 1.3 2011/02/10 11:01:31 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: devnull.c,v 1.4 2013/04/04 01:29:55 pooka Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -60,7 +60,12 @@
error = devsw_attach("null", NULL, &null_bmaj, &null_cdevsw,&null_cmaj);
KASSERT(error || null_cmaj == 2);
- return error;
+ error = rump_vfs_makeonedevnode(S_IFCHR,
+ "/dev/null", null_cmaj, DEV_NULL);
+ if (error)
+ return error;
+ return rump_vfs_makeonedevnode(S_IFCHR,
+ "/dev/zero", null_cmaj, DEV_ZERO);
}
static int
Home |
Main Index |
Thread Index |
Old Index