Module Name: src
Committed By: isaki
Date: Tue Jun 21 12:20:43 UTC 2022
Modified Files:
src/sys/arch/x68k/stand/libsa: sdcd.c
Log Message:
x68k/stand: Correct a condition expression.
- start is LBA but dblk is relative from this partition.
- The first term was wrong. It should be '(x & 0x1fffff) == x', but
it's more simple to use numerical comparison.
There would have been no impact.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/stand/libsa/sdcd.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/x68k/stand/libsa/sdcd.c
diff -u src/sys/arch/x68k/stand/libsa/sdcd.c:1.15 src/sys/arch/x68k/stand/libsa/sdcd.c:1.16
--- src/sys/arch/x68k/stand/libsa/sdcd.c:1.15 Tue Feb 11 08:06:07 2014
+++ src/sys/arch/x68k/stand/libsa/sdcd.c Tue Jun 21 12:20:43 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: sdcd.c,v 1.15 2014/02/11 08:06:07 tsutsui Exp $ */
+/* $NetBSD: sdcd.c,v 1.16 2022/06/21 12:20:43 isaki Exp $ */
/*
* Copyright (c) 2001 MINOURA Makoto.
@@ -289,7 +289,7 @@ sdstrategy(void *arg, int rw, daddr_t db
}
nblks = howmany(size, 256 << current_blklen);
- if ((dblk & 0x1fffff) == 0x1fffff && (nblks & 0xff) == nblks) {
+ if (start < 0x200000 && nblks < 256) {
if (rw & F_WRITE)
error = IOCS_S_WRITE(start, nblks, current_id,
current_blklen, buf);