Module Name: src
Committed By: mlelstv
Date: Sun Jun 7 20:00:11 UTC 2015
Modified Files:
src/sys/arch/amiga/amiga: machdep.c
Log Message:
Fix space calculation for dump header. Round up to clicks to avoid
disk alignment issues.
To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/sys/arch/amiga/amiga/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amiga/amiga/machdep.c
diff -u src/sys/arch/amiga/amiga/machdep.c:1.243 src/sys/arch/amiga/amiga/machdep.c:1.244
--- src/sys/arch/amiga/amiga/machdep.c:1.243 Mon Mar 24 20:06:31 2014
+++ src/sys/arch/amiga/amiga/machdep.c Sun Jun 7 20:00:11 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.243 2014/03/24 20:06:31 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.244 2015/06/07 20:00:11 mlelstv Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -50,7 +50,7 @@
#include "empm.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.243 2014/03/24 20:06:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.244 2015/06/07 20:00:11 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -535,7 +535,7 @@ cpu_dumpconf(void)
else if (dumplo == 0)
dumplo = nblks - btodb(ctob(dumpsize));
}
- --dumplo; /* XXX assume header fits in one block */
+ dumplo -= btodb(ctob(btoc(MDHDRSIZE + ctob(1) - 1)));
/*
* Don't dump on the first PAGE_SIZE (why PAGE_SIZE?)
* in case the dump device includes a disk label.