summaryrefslogtreecommitdiff
path: root/sbin/pdisk/partition_map.h
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2006-04-27 19:52:22 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2006-04-27 19:52:22 +0000
commited27cd970afc6b5a1f13bcbcfa6e6f2c17383ea3 (patch)
tree1705907342ecd5f075b44fae6b75b82b0a5d413d /sbin/pdisk/partition_map.h
parente317d0527a2e9963eb4d77f7416c9714f02efcfd (diff)
update for pdisk 0.8a2, from NetBSD, retaining our local changes;
summing it up: - Clean up sources - fix naming, delete old email addresses - Added support for display of Mac volume names - Fix block 0 display to show logical offset of drivers - Require confirmation of quit without write - Fix iteration to not complain about missing devices - Warn when creating/writing a map with more than 15 entries and, most important, add do_update_dpme() which allows us to partition OpenBSD slices without previous MacOS setup. Tested with shared MacOS install on macppc, procedure there remains the same. grammer and spelling help and ok jmc@ ok miod@
Diffstat (limited to 'sbin/pdisk/partition_map.h')
-rw-r--r--sbin/pdisk/partition_map.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/sbin/pdisk/partition_map.h b/sbin/pdisk/partition_map.h
index d53032bcfde..963584cc6fc 100644
--- a/sbin/pdisk/partition_map.h
+++ b/sbin/pdisk/partition_map.h
@@ -1,7 +1,7 @@
//
// partition_map.h - partition map routines
//
-// Written by Eryk Vershen (eryk@apple.com)
+// Written by Eryk Vershen
//
/*
@@ -36,6 +36,7 @@
// Defines
//
#define PBLOCK_SIZE 512
+#define MAX_LINUX_MAP 15
//
@@ -47,8 +48,9 @@ struct partition_map_header {
struct partition_map * disk_order;
struct partition_map * base_order;
Block0 *misc;
- int writeable;
+ int writable;
int changed;
+ int written;
int physical_block; // must be == sbBlockSize
int logical_block; // must be <= physical_block
int blocks_in_map;
@@ -66,9 +68,19 @@ struct partition_map {
struct partition_map_header * the_map;
int contains_driver;
DPME *data;
+ int HFS_kind;
+ char *HFS_name;
};
typedef struct partition_map partition_map;
+/* Identifies the HFS kind. */
+enum {
+ kHFS_not = 0, // ' '
+ kHFS_std = 1, // 'h'
+ kHFS_embed = 2, // 'e'
+ kHFS_plus = 3 // '+'
+};
+
//
// Global Constants
@@ -96,12 +108,15 @@ int add_partition_to_map(const char *name, const char *dptype, u32 base, u32 len
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 index, partition_map_header *map);
+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 old_index, long index, partition_map_header *map);
+void move_entry_in_map(long, long, partition_map_header *);
partition_map_header* open_partition_map(char *name, int *valid_file, int ask_logical_size);
void resize_map(long new_size, partition_map_header *map);
void write_partition_map(partition_map_header *map);
+void bzb_init_slice(BZB *bp, int slice);
+void dpme_init_flags(DPME *data);
#endif /* __partition_map__ */