summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2016-01-17 16:26:27 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2016-01-17 16:26:27 +0000
commit541799b37400b015408f9595e3b4e3f3d23dfe0e (patch)
tree5822fb1dc3c6fa3101524314ecd29df2b90395d6
parent2f7eed32a3a1a338277df36043895268da3d3442 (diff)
The great de-typedef'ification continues. DDMap -> struct ddmap.
-rw-r--r--sbin/pdisk/convert.c6
-rw-r--r--sbin/pdisk/dpme.h7
-rw-r--r--sbin/pdisk/dump.c14
-rw-r--r--sbin/pdisk/partition_map.c10
4 files changed, 18 insertions, 19 deletions
diff --git a/sbin/pdisk/convert.c b/sbin/pdisk/convert.c
index ad28b2a2fcd..dbe1cbdc94a 100644
--- a/sbin/pdisk/convert.c
+++ b/sbin/pdisk/convert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: convert.c,v 1.11 2016/01/17 16:15:59 krw Exp $ */
+/* $OpenBSD: convert.c,v 1.12 2016/01/17 16:26:26 krw Exp $ */
//
// convert.c - Little-endian conversion
@@ -95,7 +95,7 @@ int
convert_block0(struct block0 *data, int to_cpu_form)
{
#if BYTE_ORDER == LITTLE_ENDIAN
- DDMap *m;
+ struct ddmap *m;
u16 count;
int i;
@@ -131,7 +131,7 @@ convert_block0(struct block0 *data, int to_cpu_form)
}
if (count > 0) {
- m = (DDMap *) data->sbMap;
+ m = (struct ddmap *) data->sbMap;
for (i = 0; i < count; i++) {
reverse4((u8 *)&m[i].ddBlock);
reverse2((u8 *)&m[i].ddSize);
diff --git a/sbin/pdisk/dpme.h b/sbin/pdisk/dpme.h
index ea8de5bcbd3..a65217af11e 100644
--- a/sbin/pdisk/dpme.h
+++ b/sbin/pdisk/dpme.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dpme.h,v 1.9 2016/01/17 16:15:59 krw Exp $ */
+/* $OpenBSD: dpme.h,v 1.10 2016/01/17 16:26:26 krw Exp $ */
//
// dpme.h - Disk Partition Map Entry (dpme)
@@ -70,14 +70,13 @@ struct block0 {
u16 sbMap[247]; /* descriptor map */
};
-// Where &sbMap[0] is actually an array DDMap[sbDrvrCount]
+// Where &sbMap[0] is actually an array struct ddmap[sbDrvrCount]
// kludge to get around alignment junk
-struct DDMap {
+struct ddmap {
u32 ddBlock; /* 1st driver's starting block (in sbBlkSize blocks!) */
u16 ddSize; /* size of 1st driver (512-byte blks) */
u16 ddType; /* system type (1 for Mac+) */
};
-typedef struct DDMap DDMap;
// Each partition map entry (blocks 1 through n) has this format
diff --git a/sbin/pdisk/dump.c b/sbin/pdisk/dump.c
index 85e5b2a2768..4e3a01a1f3d 100644
--- a/sbin/pdisk/dump.c
+++ b/sbin/pdisk/dump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump.c,v 1.25 2016/01/17 16:15:59 krw Exp $ */
+/* $OpenBSD: dump.c,v 1.26 2016/01/17 16:26:26 krw Exp $ */
//
// dump.c - dumping partition maps
@@ -150,7 +150,7 @@ void
dump_block_zero(partition_map_header *map)
{
struct block0 *p;
- DDMap *m;
+ struct ddmap *m;
int i;
double value;
int prefix;
@@ -170,7 +170,7 @@ dump_block_zero(partition_map_header *map)
p->sbDevType, p->sbDevId);
if (p->sbDrvrCount > 0) {
printf("Drivers-\n");
- m = (DDMap *) p->sbMap;
+ m = (struct ddmap *) p->sbMap;
for (i = 0; i < p->sbDrvrCount; i++) {
printf("%u: %3u @ %lu, ", i+1,
m[i].ddSize, get_align_long(&m[i].ddBlock));
@@ -289,7 +289,7 @@ void
show_data_structures(partition_map_header *map)
{
struct block0 *zp;
- DDMap *m;
+ struct ddmap *m;
int i;
partition_map * entry;
struct dpme *p;
@@ -328,7 +328,7 @@ show_data_structures(partition_map_header *map)
} else {
printf("%u driver%s-\n", zp->sbDrvrCount,
(zp->sbDrvrCount>1)?"s":kStringEmpty);
- m = (DDMap *) zp->sbMap;
+ m = (struct ddmap *) zp->sbMap;
for (i = 0; i < zp->sbDrvrCount; i++) {
printf("%u: @ %lu for %u, type=0x%x\n", i+1,
get_align_long(&m[i].ddBlock),
@@ -487,7 +487,7 @@ void
full_dump_block_zero(partition_map_header *map)
{
struct block0 *zp;
- DDMap *m;
+ struct ddmap *m;
int i;
if (map == NULL) {
@@ -508,7 +508,7 @@ full_dump_block_zero(partition_map_header *map)
printf(" device id: 0x%x\n", zp->sbDevId);
printf(" data: 0x%lx\n", zp->sbData);
printf(" driver count: %d\n", zp->sbDrvrCount);
- m = (DDMap *) zp->sbMap;
+ m = (struct ddmap *) zp->sbMap;
for (i = 0; &m[i].ddType < &zp->sbMap[247]; i++) {
if (m[i].ddBlock == 0 && m[i].ddSize == 0 && m[i].ddType == 0) {
break;
diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c
index fddd7d62c0d..73330eea58a 100644
--- a/sbin/pdisk/partition_map.c
+++ b/sbin/pdisk/partition_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: partition_map.c,v 1.29 2016/01/17 16:15:59 krw Exp $ */
+/* $OpenBSD: partition_map.c,v 1.30 2016/01/17 16:26:26 krw Exp $ */
//
// partition_map.c - partition map routines
@@ -789,7 +789,7 @@ contains_driver(partition_map *entry)
{
partition_map_header *map;
struct block0 *p;
- DDMap *m;
+ struct ddmap *m;
int i;
int f;
u32 start;
@@ -808,7 +808,7 @@ contains_driver(partition_map *entry)
f = p->sbBlkSize / map->logical_block;
}
if (p->sbDrvrCount > 0) {
- m = (DDMap *) p->sbMap;
+ m = (struct ddmap *) p->sbMap;
for (i = 0; i < p->sbDrvrCount; i++) {
start = get_align_long(&m[i].ddBlock);
if (entry->data->dpme_pblock_start <= f*start
@@ -1133,7 +1133,7 @@ remove_driver(partition_map *entry)
{
partition_map_header *map;
struct block0 *p;
- DDMap *m;
+ struct ddmap *m;
int i;
int j;
int f;
@@ -1158,7 +1158,7 @@ remove_driver(partition_map *entry)
f = p->sbBlkSize / map->logical_block;
}
if (p->sbDrvrCount > 0) {
- m = (DDMap *) p->sbMap;
+ m = (struct ddmap *) p->sbMap;
for (i = 0; i < p->sbDrvrCount; i++) {
start = get_align_long(&m[i].ddBlock);