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 30 2005-09-28 23:32:28Z 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 | *,
|
---|
54 | struct mountlist_itself
|
---|
55 | *);
|
---|
56 | bool mountlist_contains_raid_devices (struct mountlist_itself *);
|
---|
57 | int start_raid_device (char *);
|
---|
58 | int stop_raid_device (char *);
|
---|
59 | int start_all_raid_devices (struct mountlist_itself *);
|
---|
60 | int stop_all_raid_devices (struct mountlist_itself *);
|
---|
61 | int format_everything (struct mountlist_itself *, bool);
|
---|
62 | int partition_device (FILE*,const char *, int, int, const char *, long long);
|
---|
63 | int partition_device_with_parted (FILE*,const char *, int, int, const char *, long long);
|
---|
64 | int partition_device_with_fdisk (FILE*,const char *, int, int, const char *, long long);
|
---|
65 | int format_device (char *, char *);
|
---|
66 | int partition_drive (struct mountlist_itself *, char *);
|
---|
67 | int partition_everything (struct mountlist_itself *);
|
---|
68 | int do_my_funky_lvm_stuff (bool, bool);
|
---|
69 | int which_format_command_do_i_need (char *, char *);
|
---|
70 | int make_dummy_partitions (FILE*, char *, int);
|
---|
71 | int make_list_of_drives (struct mountlist_itself *,
|
---|
72 | char drivelist[ARBITRARY_MAXIMUM][MAX_STR_LEN]);
|
---|
73 | int set_partition_type (FILE*,const char *, int, const char *, long long);
|
---|
74 | void resize_drive_proportionately_to_suit_new_drives (struct mountlist_itself
|
---|
75 | *mountlist,
|
---|
76 | char *drive_name);
|
---|
77 | void resize_mountlist_proportionately_to_suit_new_drives (struct
|
---|
78 | mountlist_itself
|
---|
79 | *mountlist);
|
---|
80 |
|
---|
81 |
|
---|
82 | char *
|
---|
83 | truncate_to_drive_name (char *partition);
|
---|
84 | void create_mountlist_for_drive(struct mountlist_itself *mountlist, char *drive_name, struct mountlist_reference *drivemntlist);
|
---|
85 |
|
---|