1 | /***************************************************************************
|
---|
2 | mondoprep.h - description
|
---|
3 | -------------------
|
---|
4 | begin : Sat Apr 20 2002
|
---|
5 | copyright : (C) 2002 by Stan Benoit
|
---|
6 | email : troff@nakedsoul.org
|
---|
7 | cvsid : $Id: mondoprep.h 128 2005-11-19 01:27:41Z bcornec $
|
---|
8 | ***************************************************************************/
|
---|
9 |
|
---|
10 | /***************************************************************************
|
---|
11 | * *
|
---|
12 | * This program is free software; you can redistribute it and/or modify *
|
---|
13 | * it under the terms of the GNU General Public License as published by *
|
---|
14 | * the Free Software Foundation; either version 2 of the License, or *
|
---|
15 | * (at your option) any later version. *
|
---|
16 | * *
|
---|
17 | ***************************************************************************/
|
---|
18 |
|
---|
19 |
|
---|
20 | /** Externals **************************************************************/
|
---|
21 |
|
---|
22 | extern long g_maximum_progress, g_current_progress, g_start_time;
|
---|
23 | extern int g_currentY, g_current_cd_number;
|
---|
24 | extern char *g_tape_device;
|
---|
25 | extern void finish(int);
|
---|
26 | extern void setup_newt_stuff(void);
|
---|
27 | extern char which_restore_mode(void);
|
---|
28 | extern bool ask_me_yes_or_no(char *);
|
---|
29 | extern long get_phys_size_of_drive(char *);
|
---|
30 | //extern void log_to_screen (char *);
|
---|
31 | extern void update_progress_form(char *);
|
---|
32 | extern void open_progress_form(char *, char *, char *, char *, long);
|
---|
33 | extern void close_progress_form(void);
|
---|
34 | extern void popup_and_OK(char *);
|
---|
35 | extern bool popup_and_get_string(char *, char *, char *, int);
|
---|
36 | extern long get_time(void);
|
---|
37 | extern bool is_this_device_mounted(char *);
|
---|
38 | extern int does_partition_exist(const char *device, int partno);
|
---|
39 | extern int strcmp_inc_numbers(char *, char *);
|
---|
40 | extern long count_lines_in_file(char *);
|
---|
41 | extern long long length_of_file(char *);
|
---|
42 | extern long noof_lines_that_match_wildcard(char *, char *);
|
---|
43 | //extern char *slice_fname (long, long, bool, char *);
|
---|
44 | extern char *last_line_of_file(char *);
|
---|
45 | extern void log_file_end_to_screen(char *, char *);
|
---|
46 | extern int zero_out_a_device(char *);
|
---|
47 | extern void mvaddstr_and_log_it(int, int, char *);
|
---|
48 | extern bool does_file_exist(char *);
|
---|
49 |
|
---|
50 |
|
---|
51 | /** locals **********************************************************/
|
---|
52 | int extrapolate_mountlist_to_include_raid_partitions(struct mountlist_itself
|
---|
53 | *, struct mountlist_itself
|
---|
54 | *);
|
---|
55 | bool mountlist_contains_raid_devices(struct mountlist_itself *);
|
---|
56 | int start_raid_device(char *);
|
---|
57 | int stop_raid_device(char *);
|
---|
58 | int start_all_raid_devices(struct mountlist_itself *);
|
---|
59 | int stop_all_raid_devices(struct mountlist_itself *);
|
---|
60 | int format_everything(struct mountlist_itself *, bool);
|
---|
61 | int partition_device(FILE *, const char *, int, int, const char *,
|
---|
62 | long long);
|
---|
63 | int partition_device_with_parted(FILE *, const char *, int, int,
|
---|
64 | const char *, long long);
|
---|
65 | int partition_device_with_fdisk(FILE *, const char *, int, int,
|
---|
66 | const char *, long long);
|
---|
67 | int format_device(char *, char *);
|
---|
68 | int partition_drive(struct mountlist_itself *, char *);
|
---|
69 | int partition_everything(struct mountlist_itself *);
|
---|
70 | int do_my_funky_lvm_stuff(bool, bool);
|
---|
71 | int which_format_command_do_i_need(char *, char *);
|
---|
72 | int make_dummy_partitions(FILE *, char *, int);
|
---|
73 | int make_list_of_drives(struct mountlist_itself *,
|
---|
74 | char drivelist[ARBITRARY_MAXIMUM][MAX_STR_LEN]);
|
---|
75 | int set_partition_type(FILE *, const char *, int, const char *, long long);
|
---|
76 | void resize_drive_proportionately_to_suit_new_drives(struct mountlist_itself
|
---|
77 | *mountlist,
|
---|
78 | char *drive_name);
|
---|
79 | void resize_mountlist_proportionately_to_suit_new_drives(struct
|
---|
80 | mountlist_itself
|
---|
81 | *mountlist);
|
---|
82 |
|
---|
83 |
|
---|
84 | char *truncate_to_drive_name(char *partition);
|
---|
85 | void create_mountlist_for_drive(struct mountlist_itself *mountlist,
|
---|
86 | char *drive_name,
|
---|
87 | struct mountlist_reference *drivemntlist);
|
---|