1 // 2 // dump.h - dumping partition maps 3 // 4 // Written by Eryk Vershen (eryk@apple.com) 5 // 6 7 /* 8 * Copyright 1996,1997 by Apple Computer, Inc. 9 * All Rights Reserved 10 * 11 * Permission to use, copy, modify, and distribute this software and 12 * its documentation for any purpose and without fee is hereby granted, 13 * provided that the above copyright notice appears in all copies and 14 * that both the copyright notice and this permission notice appear in 15 * supporting documentation. 16 * 17 * APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 18 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 19 * FOR A PARTICULAR PURPOSE. 20 * 21 * IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 22 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 23 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 24 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 25 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 26 */ 27 28 #ifndef __dump__ 29 #define __dump__ 30 31 #include "partition_map.h" 32 33 34 // 35 // Defines 36 // 37 #define AFLAG_DEFAULT 0 38 #define PFLAG_DEFAULT 1 39 40 41 // 42 // Types 43 // 44 45 46 // 47 // Global Constants 48 // 49 50 51 // 52 // Global Variables 53 // 54 extern int aflag; 55 extern int pflag; 56 57 58 // 59 // Forward declarations 60 // 61 void display_patches(partition_map *entry); 62 int dump(char *name); 63 void dump_block(unsigned char *addr, int len); 64 void dump_partition_map(partition_map_header *map, int disk_order); 65 void full_dump_partition_entry(partition_map_header *map, int index); 66 void full_dump_block_zero(partition_map_header *map); 67 void list_all_disks(); 68 void show_data_structures(partition_map_header *map); 69 70 #endif /* __dump__ */ 71