Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga/amiga If lp->d_secsize is updated, we need to...
details: https://anonhg.NetBSD.org/src/rev/8be835ea5e16
branches: trunk
changeset: 351804:8be835ea5e16
user: rin <rin%NetBSD.org@localhost>
date: Mon Feb 27 15:59:36 2017 +0000
description:
If lp->d_secsize is updated, we need to reallocate the buffer.
Thanks mlelstv for his comment on port-amiga.
diffstat:
sys/arch/amiga/amiga/disksubr.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 5651fe532c95 -r 8be835ea5e16 sys/arch/amiga/amiga/disksubr.c
--- a/sys/arch/amiga/amiga/disksubr.c Mon Feb 27 14:13:56 2017 +0000
+++ b/sys/arch/amiga/amiga/disksubr.c Mon Feb 27 15:59:36 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.65 2017/02/25 22:45:59 rin Exp $ */
+/* $NetBSD: disksubr.c,v 1.66 2017/02/27 15:59:36 rin Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.65 2017/02/25 22:45:59 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.66 2017/02/27 15:59:36 rin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -239,7 +239,11 @@
lp->d_partitions[i].p_offset = 0;
}
- lp->d_secsize = rbp->nbytes;
+ if (lp->d_secsize != rbp->nbytes) {
+ lp->d_secsize = rbp->nbytes;
+ allocbuf(bp, (int)lp->d_secsize, 1);
+ rbp = baddr(bp);
+ }
lp->d_nsectors = rbp->nsectors;
lp->d_ntracks = rbp->nheads;
/*
Home |
Main Index |
Thread Index |
Old Index