Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Add DV_VIRTUAL for non-backed virtual devices and allow ...



details:   https://anonhg.NetBSD.org/src/rev/2048921af95e
branches:  trunk
changeset: 749334:2048921af95e
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Nov 26 20:52:19 2009 +0000

description:
Add DV_VIRTUAL for non-backed virtual devices and allow to mount
root from a DV_VIRTUAL device.

diffstat:

 sys/kern/vfs_subr.c |  7 +++++--
 sys/sys/device.h    |  5 +++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (47 lines):

diff -r 2f3dccce741a -r 2048921af95e sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Thu Nov 26 20:15:20 2009 +0000
+++ b/sys/kern/vfs_subr.c       Thu Nov 26 20:52:19 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.389 2009/11/19 03:01:05 enami Exp $     */
+/*     $NetBSD: vfs_subr.c,v 1.390 2009/11/26 20:52:19 pooka Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.389 2009/11/19 03:01:05 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.390 2009/11/26 20:52:19 pooka Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -2505,6 +2505,9 @@
                }
                break;
 
+       case DV_VIRTUAL:
+               break;
+
        default:
                printf("%s: inappropriate for root file system\n",
                    device_xname(root_device));
diff -r 2f3dccce741a -r 2048921af95e sys/sys/device.h
--- a/sys/sys/device.h  Thu Nov 26 20:15:20 2009 +0000
+++ b/sys/sys/device.h  Thu Nov 26 20:52:19 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.125 2009/11/12 19:10:30 dyoung Exp $ */
+/* $NetBSD: device.h,v 1.126 2009/11/26 20:52:19 pooka Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -102,7 +102,8 @@
        DV_TTY,                 /* serial line interface (?) */
        DV_AUDIODEV,            /* audio device */
        DV_DISPLAYDEV,          /* display device */
-       DV_BUS                  /* bus device */
+       DV_BUS,                 /* bus device */
+       DV_VIRTUAL,             /* unbacked virtual device */
 } devclass_t;
 
 /*



Home | Main Index | Thread Index | Old Index