Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libkvm only do bounce buffering for character devices.
details: https://anonhg.NetBSD.org/src/rev/16acbeb059a7
branches: trunk
changeset: 969965:16acbeb059a7
user: chs <chs%NetBSD.org@localhost>
date: Sun Mar 08 00:06:42 2020 +0000
description:
only do bounce buffering for character devices.
diffstat:
lib/libkvm/kvm.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r a4eaec933cc1 -r 16acbeb059a7 lib/libkvm/kvm.c
--- a/lib/libkvm/kvm.c Sun Mar 08 00:04:11 2020 +0000
+++ b/lib/libkvm/kvm.c Sun Mar 08 00:06:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kvm.c,v 1.104 2018/11/05 00:43:30 mrg Exp $ */
+/* $NetBSD: kvm.c,v 1.105 2020/03/08 00:06:42 chs Exp $ */
/*-
* Copyright (c) 1989, 1992, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)kvm.c 8.2 (Berkeley) 2/13/94";
#else
-__RCSID("$NetBSD: kvm.c,v 1.104 2018/11/05 00:43:30 mrg Exp $");
+__RCSID("$NetBSD: kvm.c,v 1.105 2020/03/08 00:06:42 chs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -352,7 +352,12 @@
/* swap is not configured? not fatal */
}
} else {
- kd->fdalign = DEV_BSIZE; /* XXX */
+ if (S_ISCHR(st.st_mode)) {
+ kd->fdalign = DEV_BSIZE;
+ } else {
+ kd->fdalign = 1;
+ }
+
/*
* This is a crash dump.
* Initialize the virtual address translation machinery.
Home |
Main Index |
Thread Index |
Old Index