Various stylistic nit picking.

Sponsored by: DARPA & NAI Labs.
This commit is contained in:
Poul-Henning Kamp 2002-04-09 15:17:59 +00:00
parent a4ef1c5f92
commit c7b1a1d1c3
3 changed files with 16 additions and 16 deletions

View File

@ -148,14 +148,14 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
error = g_io_getattr("GEOM::sectorsize", cp, &j, &secsize);
if (error) {
secsize = 512;
printf("g_bsd_taste: error %d Sectors are %d bytes\n",
printf("g_dev_taste: error %d Sectors are %d bytes\n",
error, secsize);
}
j = sizeof mediasize;
error = g_io_getattr("GEOM::mediasize", cp, &j, &mediasize);
if (error) {
mediasize = 0;
printf("g_error %d Mediasize is %lld bytes\n",
printf("g_dev_taste: %d Mediasize is %lld bytes\n",
error, (long long)mediasize);
}
g_topology_lock();

View File

@ -92,7 +92,7 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags)
int error, i, j, npart;
u_char *buf;
struct g_pc98_softc *ms;
u_int secsize, u, v;
u_int sectorsize, u, v;
u_int fwsect, fwhead;
off_t mediasize, start, length;
@ -110,12 +110,12 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags)
while (1) { /* a trick to allow us to use break */
if (gp->rank != 2 && flags == G_TF_NORMAL)
break;
j = sizeof secsize;
error = g_io_getattr("GEOM::sectorsize", cp, &j, &secsize);
j = sizeof sectorsize;
error = g_io_getattr("GEOM::sectorsize", cp, &j, &sectorsize);
if (error) {
secsize = 512;
sectorsize = 512;
printf("g_pc98_taste: error %d Sectors are %d bytes\n",
error, secsize);
error, sectorsize);
}
j = sizeof mediasize;
error = g_io_getattr("GEOM::mediasize", cp, &j, &mediasize);
@ -139,7 +139,7 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags)
error, fwhead);
}
buf = g_read_data(cp, 0,
secsize < 1024 ? 1024 : secsize, &error);
sectorsize < 1024 ? 1024 : sectorsize, &error);
if (buf == NULL || error != 0)
break;
@ -157,8 +157,8 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags)
continue;
printf("Index: %d\n", i);
g_hexdump(buf+512 + i * 32, 32);
start = v * fwsect * fwhead * secsize;
length = (u - v) * fwsect * fwhead * secsize;
start = v * fwsect * fwhead * sectorsize;
length = (u - v) * fwsect * fwhead * sectorsize;
printf("c%d - c%d (%llx - %llx) = %s\n",
v, u, start, length, buf + 512 + 16 + i * 32);
npart++;

View File

@ -92,7 +92,7 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags)
int error, i, j, npart;
u_char *buf;
struct g_sunlabel_softc *ms;
u_int secsize, u, v, csize;
u_int sectorsize, u, v, csize;
off_t mediasize;
g_trace(G_T_TOPOLOGY, "g_sunlabel_taste(%s,%s)", mp->name, pp->name);
@ -109,12 +109,12 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags)
while (1) { /* a trick to allow us to use break */
if (gp->rank != 2 && flags == G_TF_NORMAL)
break;
j = sizeof secsize;
error = g_io_getattr("GEOM::sectorsize", cp, &j, &secsize);
j = sizeof sectorsize;
error = g_io_getattr("GEOM::sectorsize", cp, &j, &sectorsize);
if (error) {
secsize = 512;
sectorsize = 512;
printf("g_sunlabel_taste: error %d Sectors are %d bytes\n",
error, secsize);
error, sectorsize);
}
j = sizeof mediasize;
error = g_io_getattr("GEOM::mediasize", cp, &j, &mediasize);
@ -123,7 +123,7 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags)
printf("g_error %d Mediasize is %lld bytes\n",
error, (long long)mediasize);
}
buf = g_read_data(cp, 0, secsize, &error);
buf = g_read_data(cp, 0, sectorsize, &error);
if (buf == NULL || error != 0)
break;