Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/ufs/lfs Pull up revision 1.37 (requested by pk):



details:   https://anonhg.NetBSD.org/src/rev/1c309e9d4c45
branches:  netbsd-1-4
changeset: 470477:1c309e9d4c45
user:      he <he%NetBSD.org@localhost>
date:      Wed Mar 29 20:22:02 2000 +0000

description:
Pull up revision 1.37 (requested by pk):
  Prevent lfs_mountroot() from attempting to use a network device
  as root.

diffstat:

 sys/ufs/lfs/lfs_vfsops.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r be41f408f247 -r 1c309e9d4c45 sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c  Wed Mar 29 20:19:16 2000 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c  Wed Mar 29 20:22:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vfsops.c,v 1.28.2.6 2000/01/20 21:11:46 he Exp $   */
+/*     $NetBSD: lfs_vfsops.c,v 1.28.2.7 2000/03/29 20:22:02 he Exp $   */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -164,6 +164,11 @@
        struct proc *p = curproc;       /* XXX */
        int error;
        
+       if (root_device->dv_class != DV_DISK)
+               return (ENODEV);
+
+       if (rootdev == NODEV)
+               return (ENODEV);
        /*
         * Get vnodes for swapdev and rootdev.
         */



Home | Main Index | Thread Index | Old Index