Deleted Added
full compact
kern_shutdown.c (48944) kern_shutdown.c (48948)
1/*-
2 * Copyright (c) 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
1/*-
2 * Copyright (c) 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
39 * $Id: kern_shutdown.c,v 1.55 1999/07/17 20:47:50 phk Exp $
39 * $Id: kern_shutdown.c,v 1.56 1999/07/20 20:55:50 green Exp $
40 */
41
42#include "opt_ddb.h"
43#include "opt_hw_wdog.h"
44#include "opt_panic.h"
45#include "opt_show_busybufs.h"
46
47#include <sys/param.h>

--- 355 unchanged lines hidden (view full) ---

403SYSINIT(dump_conf, SI_SUB_DUMP_CONF, SI_ORDER_FIRST, dump_conf, NULL)
404
405static int
406sysctl_kern_dumpdev SYSCTL_HANDLER_ARGS
407{
408 int error;
409 udev_t ndumpdev;
410
40 */
41
42#include "opt_ddb.h"
43#include "opt_hw_wdog.h"
44#include "opt_panic.h"
45#include "opt_show_busybufs.h"
46
47#include <sys/param.h>

--- 355 unchanged lines hidden (view full) ---

403SYSINIT(dump_conf, SI_SUB_DUMP_CONF, SI_ORDER_FIRST, dump_conf, NULL)
404
405static int
406sysctl_kern_dumpdev SYSCTL_HANDLER_ARGS
407{
408 int error;
409 udev_t ndumpdev;
410
411 if (dumpdev != NODEV)
412 ndumpdev = makeudev(devsw(dumpdev)->d_bmaj, minor(dumpdev));
413 else
414 ndumpdev = dev2udev(dumpdev);
411 ndumpdev = dev2budev(dumpdev);
415 error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req);
416 if (error == 0 && req->newptr != NULL)
417 error = setdumpdev(udev2dev(ndumpdev, 1));
418 return (error);
419}
420
421SYSCTL_PROC(_kern, KERN_DUMPDEV, dumpdev, CTLTYPE_OPAQUE|CTLFLAG_RW,
422 0, sizeof dumpdev, sysctl_kern_dumpdev, "T,dev_t", "");

--- 195 unchanged lines hidden ---
412 error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req);
413 if (error == 0 && req->newptr != NULL)
414 error = setdumpdev(udev2dev(ndumpdev, 1));
415 return (error);
416}
417
418SYSCTL_PROC(_kern, KERN_DUMPDEV, dumpdev, CTLTYPE_OPAQUE|CTLFLAG_RW,
419 0, sizeof dumpdev, sysctl_kern_dumpdev, "T,dev_t", "");

--- 195 unchanged lines hidden ---