1 | /* |
---|
2 | * $Id: mr-externs.h 3273 2014-04-29 19:27:05Z bruno $ |
---|
3 | * |
---|
4 | * mondorestore.c's externs |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #define SIZE 730000 * 1024 /* Size for ISO's stops -1 */ |
---|
9 | #define BIGGIELIST MNT_CDROM"/archives/biggielist.txt" |
---|
10 | #define ARCHIVES_PATH MNT_CDROM"/archives" |
---|
11 | /* |
---|
12 | #define BIGGIELIST ARCHIVES_PATH"/biggielist.txt" |
---|
13 | */ |
---|
14 | |
---|
15 | #ifdef __FreeBSD__ |
---|
16 | #define raid_device_record vinum_volume |
---|
17 | #endif |
---|
18 | |
---|
19 | extern bool ask_me_yes_or_no(char *); |
---|
20 | extern char *calc_checksum_of_file(char *); |
---|
21 | extern int closein_tape(); |
---|
22 | extern void close_evalcall_form(void); |
---|
23 | extern char *call_program_and_get_last_line_of_output(char *); |
---|
24 | extern void close_progress_form(void); |
---|
25 | extern long count_lines_in_file(char *); |
---|
26 | extern bool does_file_exist(char *); |
---|
27 | extern int does_partition_exist(const char *device, int partno); |
---|
28 | extern int do_my_funky_lvm_stuff(bool, bool); |
---|
29 | extern int edit_filelist(struct s_node *); |
---|
30 | extern int edit_mountlist(char *mountlist_fname, struct mountlist_itself *, |
---|
31 | struct raidlist_itself *); |
---|
32 | extern int format_everything(struct mountlist_itself *, bool, struct raidlist_itself *); |
---|
33 | extern int format_device(char *, char *, struct raidlist_itself *); |
---|
34 | extern void finish(int); |
---|
35 | extern void free_filelist(struct s_node *); |
---|
36 | extern long get_time(void); |
---|
37 | extern void fatal_error(char *); |
---|
38 | extern void initialize_raid_record(struct raid_device_record *); |
---|
39 | extern bool is_this_device_mounted(char *); |
---|
40 | extern off_t length_of_file(char *); |
---|
41 | extern char *last_line_of_file(char *); |
---|
42 | extern struct s_node *load_filelist(char *); |
---|
43 | extern void log_tape_pos(void); |
---|
44 | extern void initialize_raidrec(struct raid_device_record *); |
---|
45 | extern void log_file_end_to_screen(char *, char *); |
---|
46 | extern void log_to_screen(const char *fmt, ...); |
---|
47 | extern void mvaddstr_and_log_it(int, int, char *); |
---|
48 | extern int make_dummy_partitions(char *, int); |
---|
49 | extern int make_hole_for_file(char *); |
---|
50 | extern int make_list_of_drives(struct mountlist_itself *, |
---|
51 | struct list_of_disks *); |
---|
52 | extern bool mountlist_contains_raid_devices(struct mountlist_itself *); |
---|
53 | extern void open_evalcall_form(char *); |
---|
54 | extern void open_progress_form(char *, char *, char *, char *, long); |
---|
55 | extern int openin_cdstream(); |
---|
56 | extern int openin_tape(); |
---|
57 | extern int partition_device(char *, int, int, char *, long); |
---|
58 | extern int partition_device_with_fdisk(char *, int, int, char *, long); |
---|
59 | extern int partition_device_with_parted(char *, int, int, char *, long); |
---|
60 | extern int partition_drive(struct mountlist_itself *, char *); |
---|
61 | extern int partition_everything(struct mountlist_itself *); |
---|
62 | extern void popup_and_OK(char *); |
---|
63 | extern bool popup_and_get_string(char *, char *, char *, int); |
---|
64 | extern void setup_newt_stuff(void); |
---|
65 | extern void reset_bkpinfo(); |
---|
66 | extern int read_cfg_var(char *, char *, char *); |
---|
67 | extern int read_file_from_stream_to_file(char *, |
---|
68 | long long); |
---|
69 | extern int read_file_from_stream_to_stream(FILE *, |
---|
70 | long long); |
---|
71 | extern int read_file_from_stream_FULL(char *, FILE *, |
---|
72 | long long); |
---|
73 | extern int read_header_block_from_stream(long long *, char *, int *); |
---|
74 | extern void save_filelist(struct s_node *, char *); |
---|
75 | extern void strip_spaces(char *); |
---|
76 | extern int strcmp_inc_numbers(char *, char *); |
---|
77 | extern char *slice_fname(long, long, char *, char *); |
---|
78 | extern int stop_raid_device(char *); |
---|
79 | extern int stop_all_raid_devices(struct mountlist_itself *); |
---|
80 | extern void update_evalcall_form(int); |
---|
81 | extern void update_progress_form(char *); |
---|
82 | extern int verify_tape_backups(); |
---|
83 | extern char which_restore_mode(void); |
---|
84 | extern int write_cfg_var(char *, char *, char *); |
---|
85 | extern void wrong_marker(int, int); |
---|
86 | extern void resize_drive_proportionately_to_suit_new_drives(struct |
---|
87 | mountlist_itself |
---|
88 | *mountlist, |
---|
89 | char |
---|
90 | *drive_name); |
---|
91 | extern void resize_mountlist_proportionately_to_suit_new_drives(struct |
---|
92 | mountlist_itself |
---|
93 | *mountlist); |
---|
94 | extern int get_cfg_file_from_archive(); |
---|
95 | |
---|
96 | |
---|
97 | |
---|
98 | /************************************************************************** |
---|
99 | * Externals yummmy!!! * |
---|
100 | **************************************************************************/ |
---|
101 | extern long g_maximum_progress; |
---|
102 | extern long g_current_progress; |
---|
103 | extern long g_start_time; |
---|
104 | extern int g_currentY; |
---|
105 | extern int g_current_media_number; /* set to 1 in mondo-tools.c (tape) */ |
---|
106 | extern long long g_tape_posK; |
---|
107 | extern FILE *g_tape_stream; |
---|
108 | extern bool g_text_mode; |
---|
109 | extern bool g_restoring_live_from_cd; |
---|
110 | extern bool g_restoring_live_from_netfs; |
---|
111 | extern int fput_string_one_char_at_a_time(FILE *, char *); |
---|
112 | extern char *evaluate_mountlist(struct mountlist_itself *mountlist); |
---|
113 | |
---|
114 | |
---|
115 | #ifdef __FreeBSD__ |
---|
116 | #undef raid_device_record |
---|
117 | #endif |
---|