Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x68k/stand/libsa x68k/stand: Correct a condition ex...



details:   https://anonhg.NetBSD.org/src/rev/e1940e382b36
branches:  trunk
changeset: 367271:e1940e382b36
user:      isaki <isaki%NetBSD.org@localhost>
date:      Tue Jun 21 12:20:43 2022 +0000

description:
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.

diffstat:

 sys/arch/x68k/stand/libsa/sdcd.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 3ce26a44e808 -r e1940e382b36 sys/arch/x68k/stand/libsa/sdcd.c
--- a/sys/arch/x68k/stand/libsa/sdcd.c  Tue Jun 21 06:52:17 2022 +0000
+++ b/sys/arch/x68k/stand/libsa/sdcd.c  Tue Jun 21 12:20:43 2022 +0000
@@ -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 @@
        }
        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);



Home | Main Index | Thread Index | Old Index