diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-01-17 16:16:00 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-01-17 16:16:00 +0000 |
commit | 2f7eed32a3a1a338277df36043895268da3d3442 (patch) | |
tree | e59ecbb838940cc6ca3d200cf832475e4eb9ef2b /sbin/pdisk | |
parent | 3aa40fb9dbf5ce28b431281d8296db1820e0ed5f (diff) |
The great de-typedef'ification continues. Block0 -> struct block0.
Diffstat (limited to 'sbin/pdisk')
-rw-r--r-- | sbin/pdisk/convert.c | 4 | ||||
-rw-r--r-- | sbin/pdisk/convert.h | 4 | ||||
-rw-r--r-- | sbin/pdisk/dpme.h | 5 | ||||
-rw-r--r-- | sbin/pdisk/dump.c | 8 | ||||
-rw-r--r-- | sbin/pdisk/partition_map.c | 10 | ||||
-rw-r--r-- | sbin/pdisk/partition_map.h | 4 | ||||
-rw-r--r-- | sbin/pdisk/pdisk.c | 6 | ||||
-rw-r--r-- | sbin/pdisk/validate.c | 6 |
8 files changed, 23 insertions, 24 deletions
diff --git a/sbin/pdisk/convert.c b/sbin/pdisk/convert.c index c2de3b6f6ea..ad28b2a2fcd 100644 --- a/sbin/pdisk/convert.c +++ b/sbin/pdisk/convert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: convert.c,v 1.10 2016/01/17 16:07:06 krw Exp $ */ +/* $OpenBSD: convert.c,v 1.11 2016/01/17 16:15:59 krw Exp $ */ // // convert.c - Little-endian conversion @@ -92,7 +92,7 @@ convert_dpme(struct dpme *data, int to_cpu_form) int -convert_block0(Block0 *data, int to_cpu_form) +convert_block0(struct block0 *data, int to_cpu_form) { #if BYTE_ORDER == LITTLE_ENDIAN DDMap *m; diff --git a/sbin/pdisk/convert.h b/sbin/pdisk/convert.h index 033a3f07b36..08c7d5336de 100644 --- a/sbin/pdisk/convert.h +++ b/sbin/pdisk/convert.h @@ -1,4 +1,4 @@ -/* $OpenBSD: convert.h,v 1.6 2016/01/17 16:07:06 krw Exp $ */ +/* $OpenBSD: convert.h,v 1.7 2016/01/17 16:15:59 krw Exp $ */ // // convert.h - Little-endian conversion @@ -60,7 +60,7 @@ // // Forward declarations // -int convert_block0(Block0 *data, int to_cpu_form); +int convert_block0(struct block0 *data, int to_cpu_form); int convert_dpme(struct dpme *data, int to_cpu_form); #endif /* __convert__ */ diff --git a/sbin/pdisk/dpme.h b/sbin/pdisk/dpme.h index 26677916ba9..ea8de5bcbd3 100644 --- a/sbin/pdisk/dpme.h +++ b/sbin/pdisk/dpme.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dpme.h,v 1.8 2016/01/17 16:07:06 krw Exp $ */ +/* $OpenBSD: dpme.h,v 1.9 2016/01/17 16:15:59 krw Exp $ */ // // dpme.h - Disk Partition Map Entry (dpme) @@ -59,7 +59,7 @@ typedef unsigned long u32; // Physical block zero of the disk has this format -struct Block0 { +struct block0 { u16 sbSig; /* unique value for SCSI block 0 */ u16 sbBlkSize; /* block size of device */ u32 sbBlkCount; /* number of blocks on device */ @@ -69,7 +69,6 @@ struct Block0 { u16 sbDrvrCount; /* driver descriptor count */ u16 sbMap[247]; /* descriptor map */ }; -typedef struct Block0 Block0; // Where &sbMap[0] is actually an array DDMap[sbDrvrCount] // kludge to get around alignment junk diff --git a/sbin/pdisk/dump.c b/sbin/pdisk/dump.c index 71fb4ec3564..85e5b2a2768 100644 --- a/sbin/pdisk/dump.c +++ b/sbin/pdisk/dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.c,v 1.24 2016/01/17 16:07:06 krw Exp $ */ +/* $OpenBSD: dump.c,v 1.25 2016/01/17 16:15:59 krw Exp $ */ // // dump.c - dumping partition maps @@ -149,7 +149,7 @@ dump(char *name) void dump_block_zero(partition_map_header *map) { - Block0 *p; + struct block0 *p; DDMap *m; int i; double value; @@ -288,7 +288,7 @@ dump_partition_entry(partition_map *entry, int type_length, int name_length, int void show_data_structures(partition_map_header *map) { - Block0 *zp; + struct block0 *zp; DDMap *m; int i; partition_map * entry; @@ -486,7 +486,7 @@ dump_block(unsigned char *addr, int len) void full_dump_block_zero(partition_map_header *map) { - Block0 *zp; + struct block0 *zp; DDMap *m; int i; diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c index a07407468f9..fddd7d62c0d 100644 --- a/sbin/pdisk/partition_map.c +++ b/sbin/pdisk/partition_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: partition_map.c,v 1.28 2016/01/17 16:07:06 krw Exp $ */ +/* $OpenBSD: partition_map.c,v 1.29 2016/01/17 16:15:59 krw Exp $ */ // // partition_map.c - partition map routines @@ -482,7 +482,7 @@ create_partition_map(char *name, partition_map_header *oldmap) int coerce_block0(partition_map_header *map) { - Block0 *p; + struct block0 *p; p = map->misc; if (p == NULL) { @@ -720,7 +720,7 @@ compute_device_size(char *name) void sync_device_size(partition_map_header *map) { - Block0 *p; + struct block0 *p; unsigned long size; double d; @@ -788,7 +788,7 @@ int contains_driver(partition_map *entry) { partition_map_header *map; - Block0 *p; + struct block0 *p; DDMap *m; int i; int f; @@ -1132,7 +1132,7 @@ void remove_driver(partition_map *entry) { partition_map_header *map; - Block0 *p; + struct block0 *p; DDMap *m; int i; int j; diff --git a/sbin/pdisk/partition_map.h b/sbin/pdisk/partition_map.h index b0fc1fcad1b..46678e58506 100644 --- a/sbin/pdisk/partition_map.h +++ b/sbin/pdisk/partition_map.h @@ -1,4 +1,4 @@ -/* $OpenBSD: partition_map.h,v 1.11 2016/01/17 16:07:06 krw Exp $ */ +/* $OpenBSD: partition_map.h,v 1.12 2016/01/17 16:15:59 krw Exp $ */ // // partition_map.h - partition map routines @@ -47,7 +47,7 @@ struct partition_map_header { char *name; struct partition_map * disk_order; struct partition_map * base_order; - Block0 *misc; + struct block0 *misc; int writable; int changed; int written; diff --git a/sbin/pdisk/pdisk.c b/sbin/pdisk/pdisk.c index e7af945ee57..1453a9253ae 100644 --- a/sbin/pdisk/pdisk.c +++ b/sbin/pdisk/pdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdisk.c,v 1.38 2016/01/17 16:07:06 krw Exp $ */ +/* $OpenBSD: pdisk.c,v 1.39 2016/01/17 16:15:59 krw Exp $ */ // // pdisk - an editor for Apple format partition tables @@ -126,10 +126,10 @@ main(int argc, char **argv) "is not equal to block size (%d)\n", sizeof(struct dpme), DEV_BSIZE); } - if (sizeof(Block0) != DEV_BSIZE) { + if (sizeof(struct block0) != DEV_BSIZE) { errx(1, "Size of block zero structure (%zu) " "is not equal to block size (%d)\n", - sizeof(Block0), DEV_BSIZE); + sizeof(struct block0), DEV_BSIZE); } name_index = get_options(argc, argv); diff --git a/sbin/pdisk/validate.c b/sbin/pdisk/validate.c index 08be343c8ca..9824773201a 100644 --- a/sbin/pdisk/validate.c +++ b/sbin/pdisk/validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: validate.c,v 1.17 2016/01/17 16:07:06 krw Exp $ */ +/* $OpenBSD: validate.c,v 1.18 2016/01/17 16:15:59 krw Exp $ */ // // validate.c - @@ -81,7 +81,7 @@ typedef struct range_list range_list; // Global Variables // static char *buffer; -static Block0 *b0; +static struct block0 *b0; static struct dpme *mb; static partition_map_header *the_map; static struct file_media *the_media; @@ -115,7 +115,7 @@ get_block_zero(void) if (read_file_media(the_media, (long long) 0, DEV_BSIZE, buffer) == 0) { rtn_value = 0; } else { - b0 = (Block0 *) buffer; + b0 = (struct block0 *) buffer; convert_block0(b0, 1); rtn_value = 1; } |