Deleted Added
full compact
dumpon.c (50476) dumpon.c (53838)
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "From: @(#)swapon.c 8.1 (Berkeley) 6/5/93";
43#endif
44static const char rcsid[] =
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "From: @(#)swapon.c 8.1 (Berkeley) 6/5/93";
43#endif
44static const char rcsid[] =
45 "$FreeBSD: head/sbin/dumpon/dumpon.c 50476 1999-08-28 00:22:10Z peter $";
45 "$FreeBSD: head/sbin/dumpon/dumpon.c 53838 1999-11-28 16:25:17Z phk $";
46#endif /* not lint */
47
48#include <err.h>
49#include <stdio.h>
50#include <unistd.h>
51#include <sys/param.h>
52#include <sys/types.h>
53#include <sys/sysctl.h>

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

79 usage();
80
81 if (strcmp(argv[0], "off")) {
82 rv = stat(argv[0], &stab);
83 if (rv) {
84 err(EX_OSFILE, "%s", argv[0]);
85 }
86
46#endif /* not lint */
47
48#include <err.h>
49#include <stdio.h>
50#include <unistd.h>
51#include <sys/param.h>
52#include <sys/types.h>
53#include <sys/sysctl.h>

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

79 usage();
80
81 if (strcmp(argv[0], "off")) {
82 rv = stat(argv[0], &stab);
83 if (rv) {
84 err(EX_OSFILE, "%s", argv[0]);
85 }
86
87 if (!S_ISBLK(stab.st_mode)) {
87 if (!S_ISCHR(stab.st_mode)) {
88 errx(EX_USAGE, "%s: must specify a block device",
89 argv[0]);
90 }
91 } else {
92 stab.st_rdev = NODEV;
93 }
94
95 mib[0] = CTL_KERN;

--- 30 unchanged lines hidden ---
88 errx(EX_USAGE, "%s: must specify a block device",
89 argv[0]);
90 }
91 } else {
92 stab.st_rdev = NODEV;
93 }
94
95 mib[0] = CTL_KERN;

--- 30 unchanged lines hidden ---