source: MondoRescue/branches/stable/mondo/src/mondorestore/mondo-rstr-newt.h@ 1770

Last change on this file since 1770 was 1663, checked in by Bruno Cornec, 17 years ago
  • Fix bug #197 (based on an initial patch of Scott Cummings)
  • Fix a bug where df was using locale to print messages and wasn't filtered correctly
  • mkdtemp checked in configure
  • reset_bkpinfo called as early as possible by both main program.
  • It creates a tmpdir cleanly with mkdtemp in setup_tmpdir subfunction, which takes in account TMPIR and TMP env var. Remains to see what tmpfs does and tests
  • configure.in should also be filtered.
  • Remove g_bkpinfo_DONTUSETHIS
  • remove bkpinfo also from header files
  • Render bkpinfo global (potential issue on thread, but should not be a problem as that structure is indeed static during archive)
  • Apply patch from Andree Leidenfrost, modified a bit to use bkpinfo->tmpdir instead of /tmp or MINDI_CACHE when appropriate. Fix security issues in mondo. Thanks al ot Andree for catching all those issues.
  • /tmp => /var/log for mondorestore.log in mindi
  • Update linux terminfo to fix a color issue (Andree Leidenfrost)
  • Removes useless log file (Andree Leidenfrost)
  • replace vi with find_my_editor during restore (Andree Leidenfrost)
  • sync in bg in mindi (VMWare issue to look at)
  • mindi/mindi-busybox have a different version than mondo for pb
  • PB-SUF also added to spec file
  • Fix a bug for pb build (omission of PB-SUF declaration)

(merge -r1631:1662 $SVN_M/branches/2.2.5)

  • Property svn:keywords set to Id
File size: 6.6 KB
Line 
1/*
2 * $Id: mondo-rstr-newt.h 1663 2007-09-27 10:21:18Z bruno $
3**/
4
5#include "my-stuff.h"
6#include "mr_str.h"
7
8#include "mondostructures.h"
9#include "libmondo.h"
10#ifdef __FreeBSD__
11#define raid_device_record vinum_volume
12#endif /*__FreeBSD__*/
13
14#define NO_FLAWS_DETECTED _("No flaws detected in mountlist at this time. Hit 'OK' to proceed.")
15
16
17/** I found this in the code :) *******************************************/
18char g_strings_of_flist_window[ARBITRARY_MAXIMUM][MAX_STR_LEN];
19bool g_is_path_selected[ARBITRARY_MAXIMUM];
20bool g_is_path_expanded[ARBITRARY_MAXIMUM];
21char tmpnopath[MAX_STR_LEN + 2];
22char tmpprevpath[MAX_STR_LEN + 2];
23
24/* external subroutines and global vars */
25
26extern long get_time(void);
27extern char *last_line_of_file(char *);
28extern void center_string(char *, int);
29extern bool does_file_exist(char *);
30extern void finish(int);
31extern long get_phys_size_of_drive(char *);
32extern bool is_this_device_mounted(char *);
33extern void mr_strip_spaces(char *);
34extern void initialize_raidrec(struct raid_device_record *);
35extern int make_list_of_drives(struct mountlist_itself *,
36 char[ARBITRARY_MAXIMUM][MAX_STR_LEN]);
37char *number_to_text(int);
38extern void reload_filelist(struct s_node *);
39extern void toggle_all_root_dirs_on(struct s_node *);
40extern void toggle_path_expandability(struct s_node *, char *, bool);
41extern void toggle_path_selection(struct s_node *, char *, bool);
42extern void toggle_node_selection(struct s_node *, bool);
43extern struct s_node *find_node_in_filelist(struct s_node *,
44 char *filename);
45extern int what_number_cd_is_this();
46//extern void fatal_error (char *);
47extern void sort_mountlist_by_device(struct mountlist_itself *);
48extern int load_mountlist(struct mountlist_itself *a, char *b);
49extern bool g_text_mode;
50
51
52/* hacks */
53extern int load_raidtab_into_raidlist(struct raidlist_itself *a, char *b);
54
55
56
57extern long g_start_time, g_minimum_progress, g_maximum_progress,
58 g_current_progress, g_currentY;
59extern bool g_ISO_restore_mode;
60
61/* my subroutines */
62
63void add_disklist_entry(struct list_of_disks *, char *,
64 struct mountlist_itself *);
65void add_mountlist_entry(struct mountlist_itself *,
66 struct raidlist_itself *, newtComponent, int,
67 void *keylist[]);
68void add_varslist_entry(struct raid_device_record *);
69bool ask_me_yes_or_no(char *);
70bool ask_me_OK_or_cancel(char *);
71long calculate_raid_device_size(struct mountlist_itself *,
72 struct raidlist_itself *, char *);
73void choose_raid_level(struct
74#ifdef __FreeBSD__
75 vinum_plex
76#else
77 raid_device_record
78#endif
79 *);
80void close_evalcall_form(void);
81void close_progress_form(void);
82void del_partns_listed_in_disklist(struct mountlist_itself *,
83 struct raidlist_itself *,
84 struct list_of_disks *);
85void delete_disklist_entry(struct list_of_disks *, char *, int);
86void delete_mountlist_entry(struct mountlist_itself *,
87 struct raidlist_itself *, newtComponent, int,
88 void *keylist[]);
89void delete_raidlist_entry(struct mountlist_itself *,
90 struct raidlist_itself *, char *);
91void delete_varslist_entry(struct raid_device_record *, int);
92char *disklist_entry_to_string(struct list_of_disks *, int);
93int edit_filelist(struct s_node *);
94void edit_mountlist_entry(struct mountlist_itself *,
95 struct raidlist_itself *, newtComponent, int,
96 void *keylist[]);
97void edit_raidlist_entry(struct mountlist_itself *,
98 struct raidlist_itself *,
99 struct raid_device_record *, int);
100void edit_varslist_entry(struct raid_device_record *, int);
101int edit_mountlist_in_newt(char *mountlist_fname,
102 struct mountlist_itself *,
103 struct raidlist_itself *);
104int edit_mountlist(char *mountlist_fname, struct mountlist_itself *,
105 struct raidlist_itself *);
106void edit_raidrec_additional_vars(struct raid_device_record *);
107int evaluate_mountlist(struct mountlist_itself *, char *, char *, char *);
108int find_device_in_mountlist(struct mountlist_itself *, char *);
109int find_next_free_index_in_disklist(struct list_of_disks *);
110int find_raid_device_in_raidlist(struct raidlist_itself *, char *);
111bool get_isodir_info(char *, char *, char *, bool);
112void initiate_new_raidlist_entry(struct raidlist_itself *,
113 struct mountlist_itself *, int, char *);
114void insert_essential_additionalvars(struct raid_device_record *);
115bool is_this_raid_personality_registered(int);
116void log_file_end_to_screen(char *, char *);
117void log_to_screen(const char *fmt, ...);
118int look_for_duplicate_mountpoints(struct mountlist_itself *, char *);
119int look_for_weird_formats(struct mountlist_itself *, char *);
120void make_list_of_unallocated_raid_partitions(struct mountlist_itself *,
121 struct mountlist_itself *,
122 struct raidlist_itself *);
123char *mountlist_entry_to_string(struct mountlist_itself *, int);
124void mvaddstr_and_log_it(int, int, char *);
125void nuke_mode_dummy(void);
126char *number_of_disks_as_string(int, char *);
127void open_evalcall_form(char *);
128void open_progress_form(char *, char *, char *, char *, long);
129void popup_and_OK(char *);
130bool popup_and_get_string(char *, char *, char *, int);
131bool popup_with_buttons(char *, char *, char *);
132void redraw_disklist(struct list_of_disks *, void *keylist[],
133 newtComponent);
134void redraw_mountlist(struct mountlist_itself *, void *keylist[],
135 newtComponent);
136void redraw_unallocpartnslist(struct mountlist_itself *, void *keylist[],
137 newtComponent);
138void redraw_varslist(struct additional_raid_variables *, void *keylist[],
139 newtComponent);
140int read_variableINT_and_remove_from_raidvars(struct raid_device_record *,
141 char *);
142void refresh_log_screen(void);
143void rejig_partition_name_in_raidlist_if_necessary(struct raidlist_itself
144 *, char *, char *);
145void remove_essential_additionalvars(struct raid_device_record *);
146void select_raid_disks(struct mountlist_itself *, struct raidlist_itself *,
147 struct raid_device_record *, char *,
148 struct list_of_disks *);
149void setup_newt_stuff(void);
150long size_of_specific_device(struct mountlist_itself *, char *);
151bool spread_flaws_across_three_lines(char *, char *, char *, char *, int);
152char *turn_raid_level_number_to_string(int);
153void update_evalcall_form(int);
154void update_progress_form(char *);
155void update_progress_form_full(char *, char *, char *);
156char which_restore_mode(void);
157void write_variableINT_to_raid_var_line(struct raid_device_record *, int,
158 char *, int);
159int where_in_drivelist_is_drive(struct list_of_disks *, char *);
160char *strip_path(char *);
161
162/* -------------------------------------------------------------------- */
163
164
165
166
167char tmpnopath[MAX_STR_LEN + 2];
168char tmpprevpath[MAX_STR_LEN + 2];
169
170#ifdef __FreeBSD__
171#undef raid_device_record
172#endif
Note: See TracBrowser for help on using the repository browser.