diff options
-rw-r--r-- | sbin/pdisk/dump.c | 4 | ||||
-rw-r--r-- | sbin/pdisk/file_media.c | 17 | ||||
-rw-r--r-- | sbin/pdisk/file_media.h | 13 | ||||
-rw-r--r-- | sbin/pdisk/partition_map.c | 8 | ||||
-rw-r--r-- | sbin/pdisk/partition_map.h | 4 | ||||
-rw-r--r-- | sbin/pdisk/pdisk.c | 4 | ||||
-rw-r--r-- | sbin/pdisk/validate.c | 4 |
7 files changed, 27 insertions, 27 deletions
diff --git a/sbin/pdisk/dump.c b/sbin/pdisk/dump.c index 08fd0009a04..2a6efdbcbca 100644 --- a/sbin/pdisk/dump.c +++ b/sbin/pdisk/dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.c,v 1.22 2016/01/17 14:28:25 krw Exp $ */ +/* $OpenBSD: dump.c,v 1.23 2016/01/17 15:57:12 krw Exp $ */ // // dump.c - dumping partition maps @@ -526,7 +526,7 @@ void display_patches(partition_map *entry) { long long offset; - FILE_MEDIA m; + struct file_media *m; static unsigned char *patch_block; PatchListPtr p; PatchDescriptorPtr q; diff --git a/sbin/pdisk/file_media.c b/sbin/pdisk/file_media.c index ad8717090b6..763f9df544e 100644 --- a/sbin/pdisk/file_media.c +++ b/sbin/pdisk/file_media.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file_media.c,v 1.26 2016/01/16 22:28:14 krw Exp $ */ +/* $OpenBSD: file_media.c,v 1.27 2016/01/17 15:57:12 krw Exp $ */ /* * file_media.c - @@ -104,10 +104,10 @@ compute_block_size(int fd, char *name) } -FILE_MEDIA +struct file_media * open_file_as_media(char *file, int oflag) { - FILE_MEDIA a; + struct file_media *a; int fd; off_t off; struct stat info; @@ -136,12 +136,12 @@ open_file_as_media(char *file, int oflag) close(fd); } } - return (FILE_MEDIA) a; + return (a); } long -read_file_media(FILE_MEDIA a, long long offset, unsigned long count, +read_file_media(struct file_media *a, long long offset, unsigned long count, void *address) { long rtn_value; @@ -182,7 +182,8 @@ read_file_media(FILE_MEDIA a, long long offset, unsigned long count, long -write_file_media(FILE_MEDIA a, long long offset, unsigned long count, void *address) +write_file_media(struct file_media *a, long long offset, unsigned long count, + void *address) { long rtn_value; off_t off; @@ -214,7 +215,7 @@ write_file_media(FILE_MEDIA a, long long offset, unsigned long count, void *addr long -close_file_media(FILE_MEDIA a) +close_file_media(struct file_media *a) { if (a == 0) { return 0; @@ -226,7 +227,7 @@ close_file_media(FILE_MEDIA a) long -os_reload_file_media(FILE_MEDIA a) +os_reload_file_media(struct file_media *a) { long rtn_value; diff --git a/sbin/pdisk/file_media.h b/sbin/pdisk/file_media.h index 4105a9ff855..d37c91f3ada 100644 --- a/sbin/pdisk/file_media.h +++ b/sbin/pdisk/file_media.h @@ -1,4 +1,4 @@ -/* $OpenBSD: file_media.h,v 1.7 2016/01/16 22:28:14 krw Exp $ */ +/* $OpenBSD: file_media.h,v 1.8 2016/01/17 15:57:12 krw Exp $ */ /* * file_media.h - @@ -39,7 +39,6 @@ /* * Types */ -typedef struct file_media *FILE_MEDIA; struct file_media { long long size_in_bytes; /* offset granularity */ @@ -61,10 +60,10 @@ struct file_media { /* * Forward declarations */ -FILE_MEDIA open_file_as_media(char *file, int oflag); -long read_file_media(FILE_MEDIA m, long long offset, unsigned long count, void *address); -long write_file_media(FILE_MEDIA m, long long offset, unsigned long count, void *address); -long close_file_media(FILE_MEDIA m); -long os_reload_file_media(FILE_MEDIA m); +struct file_media *open_file_as_media(char *file, int oflag); +long read_file_media(struct file_media *m, long long offset, unsigned long count, void *address); +long write_file_media(struct file_media *m, long long offset, unsigned long count, void *address); +long close_file_media(struct file_media *m); +long os_reload_file_media(struct file_media *m); #endif /* __file_media__ */ diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c index a30fd95afde..eb652e5443c 100644 --- a/sbin/pdisk/partition_map.c +++ b/sbin/pdisk/partition_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: partition_map.c,v 1.26 2016/01/17 14:28:25 krw Exp $ */ +/* $OpenBSD: partition_map.c,v 1.27 2016/01/17 15:57:12 krw Exp $ */ // // partition_map.c - partition map routines @@ -115,7 +115,7 @@ int write_block(partition_map_header *map, unsigned long num, char *buf); partition_map_header * open_partition_map(char *name, int *valid_file) { - FILE_MEDIA m; + struct file_media *m; partition_map_header * map; int writable; @@ -298,7 +298,7 @@ read_partition_map(partition_map_header *map) void write_partition_map(partition_map_header *map) { - FILE_MEDIA m; + struct file_media *m; char *block; partition_map * entry; int i = 0; @@ -394,7 +394,7 @@ init_partition_map(char *name, partition_map_header* oldmap) partition_map_header * create_partition_map(char *name, partition_map_header *oldmap) { - FILE_MEDIA m; + struct file_media *m; partition_map_header * map; DPME *data; unsigned long number; diff --git a/sbin/pdisk/partition_map.h b/sbin/pdisk/partition_map.h index bfc5fb1a769..5b324df322a 100644 --- a/sbin/pdisk/partition_map.h +++ b/sbin/pdisk/partition_map.h @@ -1,4 +1,4 @@ -/* $OpenBSD: partition_map.h,v 1.9 2016/01/17 14:28:25 krw Exp $ */ +/* $OpenBSD: partition_map.h,v 1.10 2016/01/17 15:57:12 krw Exp $ */ // // partition_map.h - partition map routines @@ -43,7 +43,7 @@ // Types // struct partition_map_header { - FILE_MEDIA m; + struct file_media *m; char *name; struct partition_map * disk_order; struct partition_map * base_order; diff --git a/sbin/pdisk/pdisk.c b/sbin/pdisk/pdisk.c index 41c927dcaab..b1c5edb2af5 100644 --- a/sbin/pdisk/pdisk.c +++ b/sbin/pdisk/pdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdisk.c,v 1.36 2016/01/16 22:28:14 krw Exp $ */ +/* $OpenBSD: pdisk.c,v 1.37 2016/01/17 15:57:12 krw Exp $ */ // // pdisk - an editor for Apple format partition tables @@ -701,7 +701,7 @@ do_change_map_size(partition_map_header *map) void do_display_block(partition_map_header *map, char *alt_name) { - FILE_MEDIA m; + struct file_media *m; long number; char *name; static unsigned char *display_block; diff --git a/sbin/pdisk/validate.c b/sbin/pdisk/validate.c index 1b37428a5b2..901ae4370f7 100644 --- a/sbin/pdisk/validate.c +++ b/sbin/pdisk/validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: validate.c,v 1.15 2016/01/16 22:28:14 krw Exp $ */ +/* $OpenBSD: validate.c,v 1.16 2016/01/17 15:57:12 krw Exp $ */ // // validate.c - @@ -84,7 +84,7 @@ static char *buffer; static Block0 *b0; static DPME *mb; static partition_map_header *the_map; -static FILE_MEDIA the_media; +static struct file_media *the_media; static int g; |