Mon Jan 21 13:21:05 2013 UTC ()
Slightly modify sd attach message, as kernel does.

before:
 sd0: HITACHI DK315C-14 rev H7H6, 2807459 512 byte blocks

after:
 sd0: HITACHI DK315C-14 rev H7H6, 512 bytes/sect x 2807459 sectors


(tsutsui)
diff -r1.3 -r1.4 src/sys/arch/luna68k/stand/boot/sd.c

cvs diff -r1.3 -r1.4 src/sys/arch/luna68k/stand/boot/sd.c (expand / switch to unified diff)

--- src/sys/arch/luna68k/stand/boot/sd.c 2013/01/14 01:37:57 1.3
+++ src/sys/arch/luna68k/stand/boot/sd.c 2013/01/21 13:21:04 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: sd.c,v 1.3 2013/01/14 01:37:57 tsutsui Exp $ */ 1/* $NetBSD: sd.c,v 1.4 2013/01/21 13:21:04 tsutsui Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1992 OMRON Corporation. 4 * Copyright (c) 1992 OMRON Corporation.
5 * 5 *
6 * This code is derived from software contributed to Berkeley by 6 * This code is derived from software contributed to Berkeley by
7 * OMRON Corporation. 7 * OMRON Corporation.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -189,27 +189,27 @@ sdident(struct sd_softc *sc, struct hp_d @@ -189,27 +189,27 @@ sdident(struct sd_softc *sc, struct hp_d
189 break; 189 break;
190 idstr[i+1] = 0; 190 idstr[i+1] = 0;
191 for (i = 23; i > 7; --i) 191 for (i = 23; i > 7; --i)
192 if (idstr[i] != ' ') 192 if (idstr[i] != ' ')
193 break; 193 break;
194 idstr[i+1] = 0; 194 idstr[i+1] = 0;
195 for (i = 7; i >= 0; --i) 195 for (i = 7; i >= 0; --i)
196 if (idstr[i] != ' ') 196 if (idstr[i] != ' ')
197 break; 197 break;
198 idstr[i+1] = 0; 198 idstr[i+1] = 0;
199 printf("sd%d: %s %s rev %s", hd->hp_unit, idstr, &idstr[8], 199 printf("sd%d: %s %s rev %s", hd->hp_unit, idstr, &idstr[8],
200 &idstr[24]); 200 &idstr[24]);
201 201
202 printf(", %d %d byte blocks\n", sc->sc_blks, sc->sc_blksize); 202 printf(", %d bytes/sect x %d sectors\n", sc->sc_blksize, sc->sc_blks);
203 if (sc->sc_blksize != DEV_BSIZE) { 203 if (sc->sc_blksize != DEV_BSIZE) {
204 if (sc->sc_blksize < DEV_BSIZE) { 204 if (sc->sc_blksize < DEV_BSIZE) {
205 printf("sd%d: need %d byte blocks - drive ignored\n", 205 printf("sd%d: need %d byte blocks - drive ignored\n",
206 unit, DEV_BSIZE); 206 unit, DEV_BSIZE);
207 return (-1); 207 return (-1);
208 } 208 }
209 for (i = sc->sc_blksize; i > DEV_BSIZE; i >>= 1) 209 for (i = sc->sc_blksize; i > DEV_BSIZE; i >>= 1)
210 ++sc->sc_bshift; 210 ++sc->sc_bshift;
211 sc->sc_blks <<= sc->sc_bshift; 211 sc->sc_blks <<= sc->sc_bshift;
212 } 212 }
213 sc->sc_wpms = 32 * (60 * DEV_BSIZE / 2); /* XXX */ 213 sc->sc_wpms = 32 * (60 * DEV_BSIZE / 2); /* XXX */
214 return(inqbuf.type); 214 return(inqbuf.type);
215} 215}