summaryrefslogtreecommitdiff
path: root/sbin/pdisk
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/pdisk')
-rw-r--r--sbin/pdisk/dump.c48
-rw-r--r--sbin/pdisk/dump.h12
-rw-r--r--sbin/pdisk/partition_map.c152
-rw-r--r--sbin/pdisk/partition_map.h28
-rw-r--r--sbin/pdisk/pdisk.c68
-rw-r--r--sbin/pdisk/validate.c8
-rw-r--r--sbin/pdisk/validate.h4
7 files changed, 159 insertions, 161 deletions
diff --git a/sbin/pdisk/dump.c b/sbin/pdisk/dump.c
index 745d4f4b70e..7de95ec4654 100644
--- a/sbin/pdisk/dump.c
+++ b/sbin/pdisk/dump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump.c,v 1.28 2016/01/17 16:44:01 krw Exp $ */
+/* $OpenBSD: dump.c,v 1.29 2016/01/17 17:44:05 krw Exp $ */
//
// dump.c - dumping partition maps
@@ -96,11 +96,11 @@ const char * kStringNot = " not";
// Forward declarations
//
void adjust_value_and_compute_prefix(double *value, int *prefix);
-void dump_block_zero(partition_map_header *map);
-void dump_partition_entry(partition_map *entry, int type_length, int name_length, int digits);
-int get_max_base_or_length(partition_map_header *map);
-int get_max_name_string_length(partition_map_header *map);
-int get_max_type_string_length(partition_map_header *map);
+void dump_block_zero(struct partition_map_header *map);
+void dump_partition_entry(struct partition_map *entry, int type_length, int name_length, int digits);
+int get_max_base_or_length(struct partition_map_header *map);
+int get_max_name_string_length(struct partition_map_header *map);
+int get_max_type_string_length(struct partition_map_header *map);
//
@@ -109,7 +109,7 @@ int get_max_type_string_length(partition_map_header *map);
int
dump(char *name)
{
- partition_map_header *map;
+ struct partition_map_header *map;
int junk;
map = open_partition_map(name, &junk);
@@ -126,7 +126,7 @@ dump(char *name)
void
-dump_block_zero(partition_map_header *map)
+dump_block_zero(struct partition_map_header *map)
{
struct block0 *p;
struct ddmap *m;
@@ -168,9 +168,9 @@ dump_block_zero(partition_map_header *map)
void
-dump_partition_map(partition_map_header *map, int disk_order)
+dump_partition_map(struct partition_map_header *map, int disk_order)
{
- partition_map * entry;
+ struct partition_map * entry;
int max_type_length;
int max_name_length;
int digits;
@@ -217,9 +217,9 @@ dump_partition_map(partition_map_header *map, int disk_order)
void
-dump_partition_entry(partition_map *entry, int type_length, int name_length, int digits)
+dump_partition_entry(struct partition_map *entry, int type_length, int name_length, int digits)
{
- partition_map_header *map;
+ struct partition_map_header *map;
int j;
struct dpme *p;
u32 size;
@@ -265,12 +265,12 @@ dump_partition_entry(partition_map *entry, int type_length, int name_length, int
void
-show_data_structures(partition_map_header *map)
+show_data_structures(struct partition_map_header *map)
{
struct block0 *zp;
struct ddmap *m;
int i;
- partition_map * entry;
+ struct partition_map * entry;
struct dpme *p;
if (map == NULL) {
@@ -362,9 +362,9 @@ show_data_structures(partition_map_header *map)
void
-full_dump_partition_entry(partition_map_header *map, int ix)
+full_dump_partition_entry(struct partition_map_header *map, int ix)
{
- partition_map * cur;
+ struct partition_map * cur;
struct dpme *p;
int i;
u32 t;
@@ -463,7 +463,7 @@ dump_block(unsigned char *addr, int len)
}
void
-full_dump_block_zero(partition_map_header *map)
+full_dump_block_zero(struct partition_map_header *map)
{
struct block0 *zp;
struct ddmap *m;
@@ -502,7 +502,7 @@ full_dump_block_zero(partition_map_header *map)
void
-display_patches(partition_map *entry)
+display_patches(struct partition_map *entry)
{
long long offset;
struct file_media *m;
@@ -569,9 +569,9 @@ display_patches(partition_map *entry)
}
int
-get_max_type_string_length(partition_map_header *map)
+get_max_type_string_length(struct partition_map_header *map)
{
- partition_map * entry;
+ struct partition_map * entry;
int max;
int length;
@@ -592,9 +592,9 @@ get_max_type_string_length(partition_map_header *map)
}
int
-get_max_name_string_length(partition_map_header *map)
+get_max_name_string_length(struct partition_map_header *map)
{
- partition_map * entry;
+ struct partition_map * entry;
int max;
int length;
@@ -615,9 +615,9 @@ get_max_name_string_length(partition_map_header *map)
}
int
-get_max_base_or_length(partition_map_header *map)
+get_max_base_or_length(struct partition_map_header *map)
{
- partition_map * entry;
+ struct partition_map * entry;
int max;
if (map == NULL) {
diff --git a/sbin/pdisk/dump.h b/sbin/pdisk/dump.h
index 941abffc69f..9c3fde00c4e 100644
--- a/sbin/pdisk/dump.h
+++ b/sbin/pdisk/dump.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump.h,v 1.6 2016/01/14 04:02:05 krw Exp $ */
+/* $OpenBSD: dump.h,v 1.7 2016/01/17 17:44:05 krw Exp $ */
//
// dump.h - dumping partition maps
@@ -56,12 +56,12 @@
//
// Forward declarations
//
-void display_patches(partition_map *entry);
+void display_patches(struct partition_map *entry);
int dump(char *name);
void dump_block(unsigned char *addr, int len);
-void dump_partition_map(partition_map_header *map, int disk_order);
-void full_dump_partition_entry(partition_map_header *, int);
-void full_dump_block_zero(partition_map_header *map);
-void show_data_structures(partition_map_header *map);
+void dump_partition_map(struct partition_map_header *map, int disk_order);
+void full_dump_partition_entry(struct partition_map_header *, int);
+void full_dump_block_zero(struct partition_map_header *map);
+void show_data_structures(struct partition_map_header *map);
#endif /* __dump__ */
diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c
index 73330eea58a..267a0ad5f67 100644
--- a/sbin/pdisk/partition_map.c
+++ b/sbin/pdisk/partition_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: partition_map.c,v 1.30 2016/01/17 16:26:26 krw Exp $ */
+/* $OpenBSD: partition_map.c,v 1.31 2016/01/17 17:44:05 krw Exp $ */
//
// partition_map.c - partition map routines
@@ -91,32 +91,32 @@ enum add_action {
//
// Forward declarations
//
-int add_data_to_map(struct dpme *, long, partition_map_header *);
-int coerce_block0(partition_map_header *map);
-int contains_driver(partition_map *entry);
-void combine_entry(partition_map *entry);
+int add_data_to_map(struct dpme *, long, struct partition_map_header *);
+int coerce_block0(struct partition_map_header *map);
+int contains_driver(struct partition_map *entry);
+void combine_entry(struct partition_map *entry);
long compute_device_size(char *name);
struct dpme* create_data(const char *name, const char *dptype, u32 base, u32 length);
-void delete_entry(partition_map *entry);
-void insert_in_base_order(partition_map *entry);
-void insert_in_disk_order(partition_map *entry);
-int read_block(partition_map_header *map, unsigned long num, char *buf);
-int read_partition_map(partition_map_header *map);
-void remove_driver(partition_map *entry);
-void remove_from_disk_order(partition_map *entry);
-void renumber_disk_addresses(partition_map_header *map);
-void sync_device_size(partition_map_header *map);
-int write_block(partition_map_header *map, unsigned long num, char *buf);
+void delete_entry(struct partition_map *entry);
+void insert_in_base_order(struct partition_map *entry);
+void insert_in_disk_order(struct partition_map *entry);
+int read_block(struct partition_map_header *map, unsigned long num, char *buf);
+int read_partition_map(struct partition_map_header *map);
+void remove_driver(struct partition_map *entry);
+void remove_from_disk_order(struct partition_map *entry);
+void renumber_disk_addresses(struct partition_map_header *map);
+void sync_device_size(struct partition_map_header *map);
+int write_block(struct partition_map_header *map, unsigned long num, char *buf);
//
// Routines
//
-partition_map_header *
+struct partition_map_header *
open_partition_map(char *name, int *valid_file)
{
struct file_media *m;
- partition_map_header * map;
+ struct partition_map_header * map;
int writable;
m = open_file_as_media(name, (rflag)?O_RDONLY:O_RDWR);
@@ -134,7 +134,7 @@ open_partition_map(char *name, int *valid_file)
}
*valid_file = 1;
- map = malloc(sizeof(partition_map_header));
+ map = malloc(sizeof(struct partition_map_header));
if (map == NULL) {
warn("can't allocate memory for open partition map");
close_file_media(m);
@@ -192,10 +192,10 @@ open_partition_map(char *name, int *valid_file)
void
-close_partition_map(partition_map_header *map)
+close_partition_map(struct partition_map_header *map)
{
- partition_map * entry;
- partition_map * next;
+ struct partition_map * entry;
+ struct partition_map * next;
if (map == NULL) {
return;
@@ -214,7 +214,7 @@ close_partition_map(partition_map_header *map)
int
-read_partition_map(partition_map_header *map)
+read_partition_map(struct partition_map_header *map)
{
struct dpme *data;
u32 limit;
@@ -296,11 +296,11 @@ read_partition_map(partition_map_header *map)
void
-write_partition_map(partition_map_header *map)
+write_partition_map(struct partition_map_header *map)
{
struct file_media *m;
char *block;
- partition_map * entry;
+ struct partition_map * entry;
int i = 0;
int result = 0;
@@ -334,12 +334,12 @@ write_partition_map(partition_map_header *map)
int
-add_data_to_map(struct dpme *data, long ix, partition_map_header *map)
+add_data_to_map(struct dpme *data, long ix, struct partition_map_header *map)
{
- partition_map *entry;
+ struct partition_map *entry;
//printf("add data %d to map\n", ix);
- entry = malloc(sizeof(partition_map));
+ entry = malloc(sizeof(struct partition_map));
if (entry == NULL) {
warn("can't allocate memory for map entries");
return 0;
@@ -367,10 +367,10 @@ add_data_to_map(struct dpme *data, long ix, partition_map_header *map)
}
-partition_map_header *
-init_partition_map(char *name, partition_map_header* oldmap)
+struct partition_map_header *
+init_partition_map(char *name, struct partition_map_header* oldmap)
{
- partition_map_header *map;
+ struct partition_map_header *map;
if (oldmap != NULL) {
printf("map already exists\n");
@@ -391,11 +391,11 @@ init_partition_map(char *name, partition_map_header* oldmap)
}
-partition_map_header *
-create_partition_map(char *name, partition_map_header *oldmap)
+struct partition_map_header *
+create_partition_map(char *name, struct partition_map_header *oldmap)
{
struct file_media *m;
- partition_map_header * map;
+ struct partition_map_header * map;
struct dpme *data;
unsigned long number;
long size;
@@ -406,7 +406,7 @@ create_partition_map(char *name, partition_map_header *oldmap)
return NULL;
}
- map = malloc(sizeof(partition_map_header));
+ map = malloc(sizeof(struct partition_map_header));
if (map == NULL) {
warn("can't allocate memory for open partition map");
close_file_media(m);
@@ -480,7 +480,7 @@ create_partition_map(char *name, partition_map_header *oldmap)
int
-coerce_block0(partition_map_header *map)
+coerce_block0(struct partition_map_header *map)
{
struct block0 *p;
@@ -507,9 +507,9 @@ coerce_block0(partition_map_header *map)
int
add_partition_to_map(const char *name, const char *dptype, u32 base, u32 length,
- partition_map_header *map)
+ struct partition_map_header *map)
{
- partition_map * cur;
+ struct partition_map * cur;
struct dpme *data;
enum add_action act;
int limit;
@@ -673,9 +673,9 @@ dpme_init_flags(struct dpme *data)
}
void
-renumber_disk_addresses(partition_map_header *map)
+renumber_disk_addresses(struct partition_map_header *map)
{
- partition_map * cur;
+ struct partition_map * cur;
long ix;
// reset disk addresses
@@ -718,7 +718,7 @@ compute_device_size(char *name)
void
-sync_device_size(partition_map_header *map)
+sync_device_size(struct partition_map_header *map)
{
struct block0 *p;
unsigned long size;
@@ -737,9 +737,9 @@ sync_device_size(partition_map_header *map)
void
-delete_partition_from_map(partition_map *entry)
+delete_partition_from_map(struct partition_map *entry)
{
- partition_map_header *map;
+ struct partition_map_header *map;
struct dpme *data;
if (strncasecmp(entry->data->dpme_type, kMapType, DPISTRLEN) == 0) {
@@ -785,9 +785,9 @@ delete_partition_from_map(partition_map *entry)
int
-contains_driver(partition_map *entry)
+contains_driver(struct partition_map *entry)
{
- partition_map_header *map;
+ struct partition_map_header *map;
struct block0 *p;
struct ddmap *m;
int i;
@@ -824,9 +824,9 @@ contains_driver(partition_map *entry)
void
-combine_entry(partition_map *entry)
+combine_entry(struct partition_map *entry)
{
- partition_map *p;
+ struct partition_map *p;
u32 end;
if (entry == NULL
@@ -885,10 +885,10 @@ combine_entry(partition_map *entry)
void
-delete_entry(partition_map *entry)
+delete_entry(struct partition_map *entry)
{
- partition_map_header *map;
- partition_map *p;
+ struct partition_map_header *map;
+ struct partition_map *p;
map = entry->the_map;
map->blocks_in_map--;
@@ -911,10 +911,10 @@ delete_entry(partition_map *entry)
}
-partition_map *
-find_entry_by_disk_address(long ix, partition_map_header *map)
+struct partition_map *
+find_entry_by_disk_address(long ix, struct partition_map_header *map)
{
- partition_map * cur;
+ struct partition_map * cur;
cur = map->disk_order;
while (cur != NULL) {
@@ -927,10 +927,10 @@ find_entry_by_disk_address(long ix, partition_map_header *map)
}
-partition_map *
-find_entry_by_type(const char *type_name, partition_map_header *map)
+struct partition_map *
+find_entry_by_type(const char *type_name, struct partition_map_header *map)
{
- partition_map * cur;
+ struct partition_map * cur;
cur = map->base_order;
while (cur != NULL) {
@@ -942,10 +942,10 @@ find_entry_by_type(const char *type_name, partition_map_header *map)
return cur;
}
-partition_map *
-find_entry_by_base(u32 base, partition_map_header *map)
+struct partition_map *
+find_entry_by_base(u32 base, struct partition_map_header *map)
{
- partition_map * cur;
+ struct partition_map * cur;
cur = map->base_order;
while (cur != NULL) {
@@ -959,9 +959,9 @@ find_entry_by_base(u32 base, partition_map_header *map)
void
-move_entry_in_map(long old_index, long ix, partition_map_header *map)
+move_entry_in_map(long old_index, long ix, struct partition_map_header *map)
{
- partition_map * cur;
+ struct partition_map * cur;
cur = find_entry_by_disk_address(old_index, map);
if (cur == NULL) {
@@ -977,10 +977,10 @@ move_entry_in_map(long old_index, long ix, partition_map_header *map)
void
-remove_from_disk_order(partition_map *entry)
+remove_from_disk_order(struct partition_map *entry)
{
- partition_map_header *map;
- partition_map *p;
+ struct partition_map_header *map;
+ struct partition_map *p;
map = entry->the_map;
p = entry->next_on_disk;
@@ -999,10 +999,10 @@ remove_from_disk_order(partition_map *entry)
void
-insert_in_disk_order(partition_map *entry)
+insert_in_disk_order(struct partition_map *entry)
{
- partition_map_header *map;
- partition_map * cur;
+ struct partition_map_header *map;
+ struct partition_map * cur;
// find position in disk list & insert
map = entry->the_map;
@@ -1033,10 +1033,10 @@ insert_in_disk_order(partition_map *entry)
void
-insert_in_base_order(partition_map *entry)
+insert_in_base_order(struct partition_map *entry)
{
- partition_map_header *map;
- partition_map * cur;
+ struct partition_map_header *map;
+ struct partition_map * cur;
// find position in base list & insert
map = entry->the_map;
@@ -1069,10 +1069,10 @@ insert_in_base_order(partition_map *entry)
void
-resize_map(long new_size, partition_map_header *map)
+resize_map(long new_size, struct partition_map_header *map)
{
- partition_map * entry;
- partition_map * next;
+ struct partition_map * entry;
+ struct partition_map * next;
int incr;
// find map entry
@@ -1129,9 +1129,9 @@ doit:
void
-remove_driver(partition_map *entry)
+remove_driver(struct partition_map *entry)
{
- partition_map_header *map;
+ struct partition_map_header *map;
struct block0 *p;
struct ddmap *m;
int i;
@@ -1185,7 +1185,7 @@ remove_driver(partition_map *entry)
}
int
-read_block(partition_map_header *map, unsigned long num, char *buf)
+read_block(struct partition_map_header *map, unsigned long num, char *buf)
{
//printf("read block %d\n", num);
return read_file_media(map->m, ((long long) num) * map->logical_block,
@@ -1194,7 +1194,7 @@ read_block(partition_map_header *map, unsigned long num, char *buf)
int
-write_block(partition_map_header *map, unsigned long num, char *buf)
+write_block(struct partition_map_header *map, unsigned long num, char *buf)
{
return write_file_media(map->m, ((long long) num) * map->logical_block,
DEV_BSIZE, (void *)buf);
diff --git a/sbin/pdisk/partition_map.h b/sbin/pdisk/partition_map.h
index 46678e58506..f27cbd743d0 100644
--- a/sbin/pdisk/partition_map.h
+++ b/sbin/pdisk/partition_map.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: partition_map.h,v 1.12 2016/01/17 16:15:59 krw Exp $ */
+/* $OpenBSD: partition_map.h,v 1.13 2016/01/17 17:44:05 krw Exp $ */
//
// partition_map.h - partition map routines
@@ -57,7 +57,6 @@ struct partition_map_header {
int maximum_in_map;
unsigned long media_size; // in logical_blocks
};
-typedef struct partition_map_header partition_map_header;
struct partition_map {
struct partition_map * next_on_disk;
@@ -70,7 +69,6 @@ struct partition_map {
struct dpme *data;
int HFS_kind;
};
-typedef struct partition_map partition_map;
/* Identifies the HFS kind. */
enum {
@@ -102,18 +100,18 @@ extern int dflag;
//
// Forward declarations
//
-int add_partition_to_map(const char *name, const char *dptype, u32 base, u32 length, partition_map_header *map);
-void close_partition_map(partition_map_header *map);
-partition_map_header* create_partition_map(char *name, partition_map_header *oldmap);
-void delete_partition_from_map(partition_map *entry);
-partition_map* find_entry_by_disk_address(long, partition_map_header *);
-partition_map* find_entry_by_type(const char *type_name, partition_map_header *map);
-partition_map* find_entry_by_base(u32 base, partition_map_header *map);
-partition_map_header* init_partition_map(char *name, partition_map_header* oldmap);
-void move_entry_in_map(long, long, partition_map_header *);
-partition_map_header* open_partition_map(char *name, int *valid_file);
-void resize_map(long new_size, partition_map_header *map);
-void write_partition_map(partition_map_header *map);
+int add_partition_to_map(const char *name, const char *dptype, u32 base, u32 length, struct partition_map_header *map);
+void close_partition_map(struct partition_map_header *map);
+struct partition_map_header* create_partition_map(char *name, struct partition_map_header *oldmap);
+void delete_partition_from_map(struct partition_map *entry);
+struct partition_map* find_entry_by_disk_address(long, struct partition_map_header *);
+struct partition_map* find_entry_by_type(const char *type_name, struct partition_map_header *map);
+struct partition_map* find_entry_by_base(u32 base, struct partition_map_header *map);
+struct partition_map_header* init_partition_map(char *name, struct partition_map_header* oldmap);
+void move_entry_in_map(long, long, struct partition_map_header *);
+struct partition_map_header* open_partition_map(char *name, int *valid_file);
+void resize_map(long new_size, struct partition_map_header *map);
+void write_partition_map(struct partition_map_header *map);
void dpme_init_flags(struct dpme *data);
#endif /* __partition_map__ */
diff --git a/sbin/pdisk/pdisk.c b/sbin/pdisk/pdisk.c
index 1453a9253ae..febfdc5e9fc 100644
--- a/sbin/pdisk/pdisk.c
+++ b/sbin/pdisk/pdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pdisk.c,v 1.39 2016/01/17 16:15:59 krw Exp $ */
+/* $OpenBSD: pdisk.c,v 1.40 2016/01/17 17:44:05 krw Exp $ */
//
// pdisk - an editor for Apple format partition tables
@@ -92,21 +92,21 @@ static int first_get = 1;
//
// Forward declarations
//
-void do_change_map_size(partition_map_header *map);
-void do_create_partition(partition_map_header *map, int get_type);
-void do_delete_partition(partition_map_header *map);
-void do_display_block(partition_map_header *map, char *alt_name);
-void do_display_entry(partition_map_header *map);
-void do_examine_patch_partition(partition_map_header *map);
-int do_expert(partition_map_header *map, char *name);
-void do_rename_partition(partition_map_header *map);
-void do_change_type(partition_map_header *map);
-void do_reorder(partition_map_header *map);
-void do_write_partition_map(partition_map_header *map);
+void do_change_map_size(struct partition_map_header *map);
+void do_create_partition(struct partition_map_header *map, int get_type);
+void do_delete_partition(struct partition_map_header *map);
+void do_display_block(struct partition_map_header *map, char *alt_name);
+void do_display_entry(struct partition_map_header *map);
+void do_examine_patch_partition(struct partition_map_header *map);
+int do_expert(struct partition_map_header *map, char *name);
+void do_rename_partition(struct partition_map_header *map);
+void do_change_type(struct partition_map_header *map);
+void do_reorder(struct partition_map_header *map);
+void do_write_partition_map(struct partition_map_header *map);
void edit(char *name);
-int get_base_argument(long *number, partition_map_header *map);
+int get_base_argument(long *number, struct partition_map_header *map);
int get_command_line(int *argc, char ***argv);
-int get_size_argument(long *number, partition_map_header *map);
+int get_size_argument(long *number, struct partition_map_header *map);
int get_options(int argc, char **argv);
void print_edit_notes(void);
void print_expert_notes(void);
@@ -206,7 +206,7 @@ print_edit_notes()
void
edit(char *name)
{
- partition_map_header *map;
+ struct partition_map_header *map;
int command;
int order;
int get_type;
@@ -325,7 +325,7 @@ finis:
}
void
-do_create_partition(partition_map_header *map, int get_type)
+do_create_partition(struct partition_map_header *map, int get_type)
{
long base;
long length;
@@ -376,9 +376,9 @@ xit1:
int
-get_base_argument(long *number, partition_map_header *map)
+get_base_argument(long *number, struct partition_map_header *map)
{
- partition_map * entry;
+ struct partition_map * entry;
int result = 0;
if (get_number_argument("First block: ", number, kDefault) == 0) {
@@ -400,9 +400,9 @@ get_base_argument(long *number, partition_map_header *map)
int
-get_size_argument(long *number, partition_map_header *map)
+get_size_argument(long *number, struct partition_map_header *map)
{
- partition_map * entry;
+ struct partition_map * entry;
int result = 0;
unsigned long multiple;
@@ -432,9 +432,9 @@ get_size_argument(long *number, partition_map_header *map)
void
-do_rename_partition(partition_map_header *map)
+do_rename_partition(struct partition_map_header *map)
{
- partition_map * entry;
+ struct partition_map * entry;
long ix;
char *name;
@@ -468,9 +468,9 @@ do_rename_partition(partition_map_header *map)
}
void
-do_change_type(partition_map_header *map)
+do_change_type(struct partition_map_header *map)
{
- partition_map * entry;
+ struct partition_map * entry;
long ix;
char *type = NULL;
@@ -511,9 +511,9 @@ out:
void
-do_delete_partition(partition_map_header *map)
+do_delete_partition(struct partition_map_header *map)
{
- partition_map * cur;
+ struct partition_map * cur;
long ix;
if (map == NULL) {
@@ -539,7 +539,7 @@ do_delete_partition(partition_map_header *map)
void
-do_reorder(partition_map_header *map)
+do_reorder(struct partition_map_header *map)
{
long old_index;
long ix;
@@ -565,7 +565,7 @@ do_reorder(partition_map_header *map)
void
-do_write_partition_map(partition_map_header *map)
+do_write_partition_map(struct partition_map_header *map)
{
if (map == NULL) {
bad_input("No partition map exists");
@@ -604,7 +604,7 @@ print_expert_notes()
int
-do_expert(partition_map_header *map, char *name)
+do_expert(struct partition_map_header *map, char *name)
{
int command;
int quit = 0;
@@ -679,7 +679,7 @@ finis:
}
void
-do_change_map_size(partition_map_header *map)
+do_change_map_size(struct partition_map_header *map)
{
long size;
@@ -699,7 +699,7 @@ do_change_map_size(partition_map_header *map)
void
-do_display_block(partition_map_header *map, char *alt_name)
+do_display_block(struct partition_map_header *map, char *alt_name)
{
struct file_media *m;
long number;
@@ -765,7 +765,7 @@ xit:
void
-do_display_entry(partition_map_header *map)
+do_display_entry(struct partition_map_header *map)
{
long number;
@@ -786,9 +786,9 @@ do_display_entry(partition_map_header *map)
void
-do_examine_patch_partition(partition_map_header *map)
+do_examine_patch_partition(struct partition_map_header *map)
{
- partition_map * entry;
+ struct partition_map * entry;
if (map == NULL) {
bad_input("No partition map exists");
diff --git a/sbin/pdisk/validate.c b/sbin/pdisk/validate.c
index 5b541cc4ef2..3d293609ad8 100644
--- a/sbin/pdisk/validate.c
+++ b/sbin/pdisk/validate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: validate.c,v 1.19 2016/01/17 16:51:33 krw Exp $ */
+/* $OpenBSD: validate.c,v 1.20 2016/01/17 17:44:05 krw Exp $ */
//
// validate.c -
@@ -82,7 +82,7 @@ struct range_list {
static char *buffer;
static struct block0 *b0;
static struct dpme *mb;
-static partition_map_header *the_map;
+static struct partition_map_header *the_map;
static struct file_media *the_media;
static int g;
@@ -126,7 +126,7 @@ get_block_zero(void)
int
get_block_n(int n)
{
- partition_map * entry;
+ struct partition_map * entry;
int rtn_value;
if (the_map != NULL) {
@@ -332,7 +332,7 @@ print_range_list(struct range_list *list)
void
-validate_map(partition_map_header *map)
+validate_map(struct partition_map_header *map)
{
struct range_list *list;
char *name;
diff --git a/sbin/pdisk/validate.h b/sbin/pdisk/validate.h
index 04aea4641cd..94017e361e8 100644
--- a/sbin/pdisk/validate.h
+++ b/sbin/pdisk/validate.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: validate.h,v 1.4 2016/01/11 07:54:07 jasper Exp $ */
+/* $OpenBSD: validate.h,v 1.5 2016/01/17 17:44:05 krw Exp $ */
//
// validate.h -
@@ -56,6 +56,6 @@
//
// Forward declarations
//
-void validate_map(partition_map_header *map);
+void validate_map(struct partition_map_header *map);
#endif /* __validate__ */