Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm add SWAP_GETDUMPDEV command support.



details:   https://anonhg.NetBSD.org/src/rev/e06c8ab56002
branches:  trunk
changeset: 499335:e06c8ab56002
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Nov 17 11:39:39 2000 +0000

description:
add SWAP_GETDUMPDEV command support.

diffstat:

 sys/uvm/uvm_swap.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r bf0f35b8a22a -r e06c8ab56002 sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c        Fri Nov 17 11:32:55 2000 +0000
+++ b/sys/uvm/uvm_swap.c        Fri Nov 17 11:39:39 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_swap.c,v 1.39 2000/11/13 14:50:55 chs Exp $        */
+/*     $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $        */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Matthew R. Green
@@ -602,6 +602,13 @@
        if ((error = suser(p->p_ucred, &p->p_acflag)))
                goto out;
 
+       if (SCARG(uap, cmd) == SWAP_GETDUMPDEV) {
+               dev_t   *devp = (dev_t *)SCARG(uap, arg);
+
+               error = copyout(&dumpdev, devp, sizeof(dumpdev));
+               goto out;
+       }
+
        /*
         * at this point we expect a path name in arg.   we will
         * use namei() to gain a vnode reference (vref), and lock
@@ -642,6 +649,7 @@
 
        error = 0;              /* assume no error */
        switch(SCARG(uap, cmd)) {
+
        case SWAP_DUMPDEV:
                if (vp->v_type != VBLK) {
                        error = ENOTBLK;



Home | Main Index | Thread Index | Old Index