Deleted Added
full compact
savecore.c (126347) savecore.c (133814)
1/*-
2 * Copyright (c) 2002 Poul-Henning Kamp
3 * Copyright (c) 2002 Networks Associates Technology, Inc.
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp
7 * and NAI Labs, the Security Research Division of Network Associates, Inc.
8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the

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

60 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
61 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
62 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
63 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
64 * SUCH DAMAGE.
65 */
66
67#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Poul-Henning Kamp
3 * Copyright (c) 2002 Networks Associates Technology, Inc.
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp
7 * and NAI Labs, the Security Research Division of Network Associates, Inc.
8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the

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

60 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
61 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
62 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
63 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
64 * SUCH DAMAGE.
65 */
66
67#include <sys/cdefs.h>
68__FBSDID("$FreeBSD: head/sbin/savecore/savecore.c 126347 2004-02-28 10:42:27Z maxim $");
68__FBSDID("$FreeBSD: head/sbin/savecore/savecore.c 133814 2004-08-16 07:02:14Z ru $");
69
70#include <sys/param.h>
71#include <sys/disk.h>
72#include <sys/kerneldump.h>
73#include <sys/param.h>
74#include <sys/mount.h>
75#include <sys/stat.h>
76#include <errno.h>

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

83#include <string.h>
84#include <syslog.h>
85#include <time.h>
86#include <unistd.h>
87
88/* The size of the buffer used for I/O. */
89#define BUFFERSIZE (1024*1024)
90
69
70#include <sys/param.h>
71#include <sys/disk.h>
72#include <sys/kerneldump.h>
73#include <sys/param.h>
74#include <sys/mount.h>
75#include <sys/stat.h>
76#include <errno.h>

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

83#include <string.h>
84#include <syslog.h>
85#include <time.h>
86#include <unistd.h>
87
88/* The size of the buffer used for I/O. */
89#define BUFFERSIZE (1024*1024)
90
91int checkfor, compress, clear, force, keep, verbose; /* flags */
92int nfound, nsaved, nerr; /* statistics */
91static int checkfor, compress, clear, force, keep, verbose; /* flags */
92static int nfound, nsaved, nerr; /* statistics */
93
94extern FILE *zopen(const char *, const char *);
95
96static void
97printheader(FILE *f, const struct kerneldumpheader *h, const char *device,
98 int bounds)
99{
100 uint64_t dumplen;

--- 469 unchanged lines hidden ---
93
94extern FILE *zopen(const char *, const char *);
95
96static void
97printheader(FILE *f, const struct kerneldumpheader *h, const char *device,
98 int bounds)
99{
100 uint64_t dumplen;

--- 469 unchanged lines hidden ---