Deleted Added
full compact
kern_shutdown.c (225448) kern_shutdown.c (225516)
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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 225448 2011-09-08 12:56:26Z attilio $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_shutdown.c 225516 2011-09-12 20:39:31Z attilio $");
39
40#include "opt_ddb.h"
41#include "opt_kdb.h"
42#include "opt_panic.h"
43#include "opt_sched.h"
44#include "opt_watchdog.h"
45
46#include <sys/param.h>

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

700/* Call dumper with bounds checking. */
701int
702dump_write(struct dumperinfo *di, void *virtual, vm_offset_t physical,
703 off_t offset, size_t length)
704{
705
706 if (length != 0 && (offset < di->mediaoffset ||
707 offset - di->mediaoffset + length > di->mediasize)) {
39
40#include "opt_ddb.h"
41#include "opt_kdb.h"
42#include "opt_panic.h"
43#include "opt_sched.h"
44#include "opt_watchdog.h"
45
46#include <sys/param.h>

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

700/* Call dumper with bounds checking. */
701int
702dump_write(struct dumperinfo *di, void *virtual, vm_offset_t physical,
703 off_t offset, size_t length)
704{
705
706 if (length != 0 && (offset < di->mediaoffset ||
707 offset - di->mediaoffset + length > di->mediasize)) {
708 printf("Attempt to write outside dump device boundaries.\n");
709 return (ENXIO);
708 printf("Attempt to write outside dump device boundaries.\n"
709 "offset(%jd), mediaoffset(%jd), length(%ju), mediasize(%jd).\n",
710 (intmax_t)offset, (intmax_t)di->mediaoffset,
711 (uintmax_t)length, (intmax_t)di->mediasize);
712 return (ENOSPC);
710 }
711 return (di->dumper(di->priv, virtual, physical, offset, length));
712}
713
714void
715mkdumpheader(struct kerneldumpheader *kdh, char *magic, uint32_t archver,
716 uint64_t dumplen, uint32_t blksz)
717{

--- 15 unchanged lines hidden ---
713 }
714 return (di->dumper(di->priv, virtual, physical, offset, length));
715}
716
717void
718mkdumpheader(struct kerneldumpheader *kdh, char *magic, uint32_t archver,
719 uint64_t dumplen, uint32_t blksz)
720{

--- 15 unchanged lines hidden ---