diff options
Diffstat (limited to 'sbin/pdisk')
-rw-r--r-- | sbin/pdisk/dump.c | 36 | ||||
-rw-r--r-- | sbin/pdisk/dump.h | 1 | ||||
-rw-r--r-- | sbin/pdisk/hfs_misc.c | 12 | ||||
-rw-r--r-- | sbin/pdisk/media.c | 49 | ||||
-rw-r--r-- | sbin/pdisk/media.h | 6 | ||||
-rw-r--r-- | sbin/pdisk/util.c | 13 | ||||
-rw-r--r-- | sbin/pdisk/util.h | 1 | ||||
-rw-r--r-- | sbin/pdisk/validate.c | 15 |
8 files changed, 0 insertions, 133 deletions
diff --git a/sbin/pdisk/dump.c b/sbin/pdisk/dump.c index 96add658455..9fbc8b3c8c4 100644 --- a/sbin/pdisk/dump.c +++ b/sbin/pdisk/dump.c @@ -376,42 +376,6 @@ dump_partition_entry(partition_map *entry, int type_length, int name_length, int void -list_all_disks() -{ - MEDIA_ITERATOR iter; - MEDIA m; - DPME * data; - char *name; - long mark; - - data = (DPME *) malloc(PBLOCK_SIZE); - if (data == NULL) { - error(errno, "can't allocate memory for try buffer"); - return; - } - - for (iter = first_media_kind(&mark); iter != 0; iter = next_media_kind(&mark)) { - - while ((name = step_media_iterator(iter)) != 0) { - - if ((m = open_pathname_as_media(name, O_RDONLY)) == 0) { - error(errno, "can't open file '%s'", name); - } else { - close_media(m); - - dump(name); - } - free(name); - } - - delete_media_iterator(iter); - } - - free(data); -} - - -void show_data_structures(partition_map_header *map) { Block0 *zp; diff --git a/sbin/pdisk/dump.h b/sbin/pdisk/dump.h index 210ac32510a..ce528f36fda 100644 --- a/sbin/pdisk/dump.h +++ b/sbin/pdisk/dump.h @@ -66,7 +66,6 @@ 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 list_all_disks(void); void show_data_structures(partition_map_header *map); #endif /* __dump__ */ diff --git a/sbin/pdisk/hfs_misc.c b/sbin/pdisk/hfs_misc.c index d71b8272848..894b829dfb9 100644 --- a/sbin/pdisk/hfs_misc.c +++ b/sbin/pdisk/hfs_misc.c @@ -154,24 +154,12 @@ struct HFSPlusVolumeHeader { // // Forward declarations // -u32 embeded_offset(struct mdb_record *mdb, u32 sector); int read_partition_block(partition_map *entry, unsigned long num, char *buf); // // Routines // -u32 -embedded_offset(struct mdb_record *mdb, u32 sector) -{ - u32 e_offset; - - e_offset = mdb->drAlBlSt + mdb->drEmbedExtent.xdrStABN * (mdb->drAlBlkSiz / 512); - - return e_offset + sector; -} - - char * get_HFS_name(partition_map *entry, int *kind) { diff --git a/sbin/pdisk/media.c b/sbin/pdisk/media.c index 183d991df71..e363590d52b 100644 --- a/sbin/pdisk/media.c +++ b/sbin/pdisk/media.c @@ -171,52 +171,3 @@ new_media_iterator(long size) { return (MEDIA_ITERATOR) malloc(size); } - - -void -private_delete_media_iterator(MEDIA_ITERATOR m) -{ - if (m == 0) { - return; - } - free(m); -} - - -void -reset_media_iterator(MEDIA_ITERATOR m) -{ - if (m != 0 && m->do_reset != 0) { - (*m->do_reset)(m); - } -} - - -char * -step_media_iterator(MEDIA_ITERATOR m) -{ - char *result; - - if (m != 0 && m->do_step != 0) { - result = (*m->do_step)(m); - } else { - result = 0; - } - return result; -} - - -void -delete_media_iterator(MEDIA_ITERATOR m) -{ - if (m == 0) { - return; - } - if (m->kind != 0) { - if (m->do_delete != 0) { - (*m->do_delete)(m); - } - m->kind = 0; - private_delete_media_iterator(m); - } -} diff --git a/sbin/pdisk/media.h b/sbin/pdisk/media.h index 6933e491d0e..1f5a7bcb28b 100644 --- a/sbin/pdisk/media.h +++ b/sbin/pdisk/media.h @@ -127,13 +127,7 @@ long allocate_media_kind(void); MEDIA new_media(long size); void delete_media(MEDIA m); -/* those whose use media object iterators need these routines */ -void reset_media_iterator(MEDIA_ITERATOR m); -char *step_media_iterator(MEDIA_ITERATOR m); -void delete_media_iterator(MEDIA_ITERATOR m); - /* those who define media object iterators need these routines also */ MEDIA_ITERATOR new_media_iterator(long size); -void private_delete_media_iterator(MEDIA_ITERATOR m); #endif /* __media__ */ diff --git a/sbin/pdisk/util.c b/sbin/pdisk/util.c index fc43c750c89..09b8f1de533 100644 --- a/sbin/pdisk/util.c +++ b/sbin/pdisk/util.c @@ -65,19 +65,6 @@ /* * Routines */ -void -clear_memory(void *dataPtr, unsigned long size) -{ - char *ptr; - - ptr = (char *) dataPtr; - while (size > 0) { - *ptr++ = 0; - --size; - } -} - - /* Ascii case-insensitive string comparison */ int istrncmp(const char *x, const char *y, long len) diff --git a/sbin/pdisk/util.h b/sbin/pdisk/util.h index 93c2234bd3b..2d95a38cb4d 100644 --- a/sbin/pdisk/util.h +++ b/sbin/pdisk/util.h @@ -52,7 +52,6 @@ /* * Forward declarations */ -void clear_memory(void *dataPtr, unsigned long size); int istrncmp(const char *x, const char *y, long len); const char *get_version_string(void); diff --git a/sbin/pdisk/validate.c b/sbin/pdisk/validate.c index 1bf05672ca9..00140e585f6 100644 --- a/sbin/pdisk/validate.c +++ b/sbin/pdisk/validate.c @@ -93,7 +93,6 @@ range_list *new_range_list_item(enum range_state state, int valid, u32 low, u32 void initialize_list(range_list **list); void add_range(range_list **list, u32 base, u32 len, int allocate); void print_range_list(range_list *list); -void delete_list(range_list *list); void coalesce_list(range_list *list); @@ -175,20 +174,6 @@ initialize_list(range_list **list) void -delete_list(range_list *list) -{ - range_list *item; - range_list *cur; - - for (cur = list; cur != 0; ) { - item = cur; - cur = cur->next; - free(item); - } -} - - -void add_range(range_list **list, u32 base, u32 len, int allocate) { range_list *item; |