Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jul 2015 15:11:29 GMT
From:      def@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r288535 - in soc2013/def/crashdump-head: sbin/savecore sys/amd64/amd64 sys/arm/arm sys/ddb sys/i386/i386 sys/kern sys/mips/mips
Message-ID:  <201507181511.t6IFBT9L093633@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: def
Date: Sat Jul 18 15:11:28 2015
New Revision: 288535
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=288535

Log:
  Kernel dump header has 512B again.

Modified:
  soc2013/def/crashdump-head/sbin/savecore/savecore.c
  soc2013/def/crashdump-head/sys/amd64/amd64/minidump_machdep.c
  soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c
  soc2013/def/crashdump-head/sys/ddb/db_textdump.c
  soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c
  soc2013/def/crashdump-head/sys/kern/kern_dump.c
  soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c

Modified: soc2013/def/crashdump-head/sbin/savecore/savecore.c
==============================================================================
--- soc2013/def/crashdump-head/sbin/savecore/savecore.c	Sat Jul 18 13:52:05 2015	(r288534)
+++ soc2013/def/crashdump-head/sbin/savecore/savecore.c	Sat Jul 18 15:11:28 2015	(r288535)
@@ -517,7 +517,7 @@
 		printf("sectorsize = %u\n", sectorsize);
 	}
 
-	lasthd = mediasize - sizeof(kdhl);
+	lasthd = mediasize - sectorsize;
 	lseek(fd, lasthd, SEEK_SET);
 	error = read(fd, &kdhl, sizeof kdhl);
 	if (error != sizeof kdhl) {

Modified: soc2013/def/crashdump-head/sys/amd64/amd64/minidump_machdep.c
==============================================================================
--- soc2013/def/crashdump-head/sys/amd64/amd64/minidump_machdep.c	Sat Jul 18 13:52:05 2015	(r288534)
+++ soc2013/def/crashdump-head/sys/amd64/amd64/minidump_machdep.c	Sat Jul 18 15:11:28 2015	(r288535)
@@ -49,7 +49,7 @@
 #include <machine/vmparam.h>
 #include <machine/minidump.h>
 
-CTASSERT((sizeof(struct kerneldumpheader) % 512) == 0);
+CTASSERT(sizeof(struct kerneldumpheader) == 512);
 
 /*
  * Don't touch the first SIZEOF_METADATA bytes on the dump device. This

Modified: soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c
==============================================================================
--- soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c	Sat Jul 18 13:52:05 2015	(r288534)
+++ soc2013/def/crashdump-head/sys/arm/arm/minidump_machdep.c	Sat Jul 18 15:11:28 2015	(r288535)
@@ -50,7 +50,7 @@
 #include <machine/minidump.h>
 #include <machine/cpufunc.h>
 
-CTASSERT((sizeof(struct kerneldumpheader) % 512) == 0);
+CTASSERT(sizeof(struct kerneldumpheader) == 512);
 
 /*
  * Don't touch the first SIZEOF_METADATA bytes on the dump device. This

Modified: soc2013/def/crashdump-head/sys/ddb/db_textdump.c
==============================================================================
--- soc2013/def/crashdump-head/sys/ddb/db_textdump.c	Sat Jul 18 13:52:05 2015	(r288534)
+++ soc2013/def/crashdump-head/sys/ddb/db_textdump.c	Sat Jul 18 15:11:28 2015	(r288535)
@@ -113,7 +113,7 @@
  * Various size assertions -- pretty much everything must be one block in
  * size.
  */
-CTASSERT((sizeof(struct kerneldumpheader) % TEXTDUMP_BLOCKSIZE) == 0);
+CTASSERT(sizeof(struct kerneldumpheader) == 512);
 CTASSERT(sizeof(struct ustar_header) == TEXTDUMP_BLOCKSIZE);
 
 /*

Modified: soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c
==============================================================================
--- soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c	Sat Jul 18 13:52:05 2015	(r288534)
+++ soc2013/def/crashdump-head/sys/i386/i386/minidump_machdep.c	Sat Jul 18 15:11:28 2015	(r288535)
@@ -45,7 +45,7 @@
 #include <machine/vmparam.h>
 #include <machine/minidump.h>
 
-CTASSERT((sizeof(struct kerneldumpheader) % 512) == 0);
+CTASSERT(sizeof(struct kerneldumpheader) == 512);
 
 /*
  * Don't touch the first SIZEOF_METADATA bytes on the dump device. This

Modified: soc2013/def/crashdump-head/sys/kern/kern_dump.c
==============================================================================
--- soc2013/def/crashdump-head/sys/kern/kern_dump.c	Sat Jul 18 13:52:05 2015	(r288534)
+++ soc2013/def/crashdump-head/sys/kern/kern_dump.c	Sat Jul 18 15:11:28 2015	(r288535)
@@ -47,7 +47,7 @@
 #include <machine/md_var.h>
 #include <machine/pcb.h>
 
-CTASSERT((sizeof(struct kerneldumpheader) % 512) == 0);
+CTASSERT(sizeof(struct kerneldumpheader) == 512);
 
 /*
  * Don't touch the first SIZEOF_METADATA bytes on the dump device. This

Modified: soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c
==============================================================================
--- soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c	Sat Jul 18 13:52:05 2015	(r288534)
+++ soc2013/def/crashdump-head/sys/mips/mips/minidump_machdep.c	Sat Jul 18 15:11:28 2015	(r288535)
@@ -47,7 +47,7 @@
 #include <machine/minidump.h>
 #include <machine/cache.h>
 
-CTASSERT((sizeof(struct kerneldumpheader) % 512) == 0);
+CTASSERT(sizeof(struct kerneldumpheader) == 512);
 
 /*
  * Don't touch the first SIZEOF_METADATA bytes on the dump device. This



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507181511.t6IFBT9L093633>