source: MondoRescue/branches/2.2.10/mondo/src/mondorestore/mondo-rstr-newt.h@ 2816

Last change on this file since 2816 was 2816, checked in by Bruno Cornec, 13 years ago

svn merge (in svk) -r 2714:2773 2.2.9 in 2.2.10

r4207@localhost (orig r2716): bruno | 2011-02-03 01:29:51 +0100

  • Increase boot size again to support better fedora 13/14


r4208@localhost (orig r2717): bruno | 2011-02-12 15:43:36 +0100

  • Excluding vmhgfs FS for VMWare guests mounting areas of the host.


r4209@localhost (orig r2718): bruno | 2011-02-18 00:30:35 +0100
-Extend EXTRA-SIZE for Debian 6.0 (at least)


r4210@localhost (orig r2719): bruno | 2011-02-18 00:45:40 +0100

  • Fix #462 (removes temp dir if analyze-my-lvm launched in stand alonae mode)


r4213@localhost (orig r2722): bruno | 2011-02-25 18:44:47 +0100

  • Fixes for RHEL6 support at least around dm extensions, bnx2x and cp210x dependencies


r4214@localhost (orig r2723): bruno | 2011-02-25 19:00:17 +0100

  • Adds a restore quiet option


r4215@localhost (orig r2724): bruno | 2011-02-25 19:43:50 +0100

  • Adds support for dm-log used on RHEL6 as well.


r4216@localhost (orig r2725): bruno | 2011-02-25 21:26:54 +0100

  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3


r4217@localhost (orig r2726): bruno | 2011-02-26 11:38:29 +0100

  • Fix error introduced in previous patch in the if/then/else case without member in the then


r4218@localhost (orig r2727): bruno | 2011-02-26 12:05:33 +0100

  • With mindi-busybox 1.18.3 the syntax of openvt changed. This patch keeps a compatible init script for both previous and current version.


r4219@localhost (orig r2728): bruno | 2011-02-26 15:27:40 +0100

  • Latest lvdisplay print MiB instead of MB. Impact on analyze-my-lvm fixed.


r4220@localhost (orig r2729): bruno | 2011-02-26 16:39:32 +0100

  • Adds feature rpc to mindi-busybox in case of need



r4221@localhost (orig r2730): bruno | 2011-02-26 16:42:43 +0100

  • Adds the rebot command to the list of mandatory ones at restore time


r4222@localhost (orig r2731): bruno | 2011-02-26 17:37:13 +0100

  • Adds functions and /bin/loadkeys (new location) to minimal set of commands to have
  • provides a makemessage option to mindi and this function now works with pbdistrocheck
  • Do not create an error when a phys device has 0 size and is a /dev/dm-* device


r4223@localhost (orig r2732): bruno | 2011-02-26 19:07:43 +0100

  • Syntax fix


r4224@localhost (orig r2733): bruno | 2011-02-26 19:51:16 +0100

  • Fix test on dm which was made in wrong sense
  • Adds a driver to allow raid456 to work


r4225@localhost (orig r2734): bruno | 2011-02-26 20:55:00 +0100

  • Fix 2 redirections issues


r4317@localhost (orig r2737): bruno | 2011-03-13 13:12:57 +0100

  • Add support for libahci driver, mandatory for debian 6.


r4318@localhost (orig r2738): bruno | 2011-03-13 14:46:37 +0100

  • Update from Lester Wade (lester.wade_at_hp.com) incorporating latest ML feedbacks


r4319@localhost (orig r2739): bruno | 2011-03-13 17:49:15 +0100

  • Updated Lab for TES 2011


r4323@localhost (orig r2743): bruno | 2011-03-20 01:37:40 +0100

  • Fix a seg fault bug when using the GUI in case exclude_paths was NULL (mc_at_carreira.com.pt)


r4324@localhost (orig r2744): bruno | 2011-03-20 19:38:14 +0100

  • Adds Arch Linux Keyboard support (mc_at_carreira.com.pt)


r4325@localhost (orig r2745): bruno | 2011-03-20 19:48:01 +0100

  • Avoids coredump again when exclude_path is NULL with mr_make_devlist_from_pathlist (feedback from mc_at_carreira.com.pt)


r4326@localhost (orig r2746): bruno | 2011-03-20 19:39:47 +0100

  • Remove blkid from busybox to solve #435


r4327@localhost (orig r2747): bruno | 2011-03-20 19:43:22 +0100

  • Adds reboot to fix #435


r4328@localhost (orig r2748): bruno | 2011-03-22 00:58:07 +0100

  • Fix Arch Linux kbd printed in log file now instead of screen.


r4329@localhost (orig r2749): bruno | 2011-03-22 00:59:58 +0100

  • Again increase size for boot env to support better fedora 14 and other latest distros


r4356@localhost (orig r2750): bruno | 2011-03-25 19:30:01 +0100

  • Improve Arch Linux support for mindi tools (mc_at_carreira.com.pt)


r4357@localhost (orig r2751): bruno | 2011-03-25 19:48:33 +0100

  • Accept to work with either wodim or cdreord and genisoimage or mkisofs


r4358@localhost (orig r2752): bruno | 2011-03-25 20:20:49 +0100

  • Documents option -v of mondoarchive


r4359@localhost (orig r2753): bruno | 2011-03-29 01:34:30 +0200

  • Use modprobe instead of insmod to load loop, cd, ... modules (in order to force them at rstore time). Also drop very old aes support for mdk 9.2


r4360@localhost (orig r2754): bruno | 2011-03-29 01:38:49 +0200

  • Arch Linux support for boot message of mindi (mc_at_carreira.com.pt) using /etc/arch-release and pacman.log


r4383@localhost (orig r2755): bruno | 2011-04-07 09:49:38 +0200

  • Adds a UdevadmTrigger function at restore time to deal with the various syntax formats changes ddepending on version (mc_at_carreira.com.pt)


r4384@localhost (orig r2756): bruno | 2011-04-07 10:05:24 +0200

  • Increase again sizes for Debian 6 support (victor.gattegno_at_hp.com)


r4385@localhost (orig r2757): bruno | 2011-04-07 10:13:00 +0200
Conform to the report of size really !


r4386@localhost (orig r2758): bruno | 2011-04-07 11:31:12 +0200

  • Improved message for Arch Linux for rebuilding the initrd (mc_at_carreira.com.pt)


r4390@localhost (orig r2759): bruno | 2011-04-12 01:15:00 +0200

  • Typo in Web site


r4392@localhost (orig r2761): bruno | 2011-04-14 00:23:38 +0200

  • Adds download references for latest versions.


r4394@localhost (orig r2763): bruno | 2011-04-16 00:35:08 +0200

  • Adds support for MT back mandatory for OBDR.


r4395@localhost (orig r2764): bruno | 2011-04-20 12:18:46 +0200
Function resize_drive_proportionately_to_suit_new_drives

  • Integrate some mr_asprintf
  • Use systematically long long data types in all computation to match the struct mountlist_reference size member and have correct precision
  • Apply JB general_at_itpsg.com patch to make the partition resizing work properly according to the drive size (keeping all calculation in KB and converting only for display)


r4396@localhost (orig r2765): bruno | 2011-04-21 11:20:58 +0200

  • Remove very old code creating confusing symlinks pico to nano in init (patch from MC). Fix #477


r4397@localhost (orig r2766): bruno | 2011-04-21 11:57:44 +0200

  • text's are properly centered in open_and_list_dir (Patch from Chucky). Fix #404.


r4398@localhost (orig r2767): bruno | 2011-04-21 12:49:40 +0200

  • Attempt to fix #432 with a better message at a start.


r4399@localhost (orig r2768): bruno | 2011-04-21 13:00:37 +0200

Log content of mondo-restore.cfg


r4400@localhost (orig r2769): bruno | 2011-04-21 13:48:52 +0200

  • Introduce a new bkpinfo member (subdir) to support storing the subdir under which ISO images are stored on an external HDD. Should fix mostly #433.


r4401@localhost (orig r2770): bruno | 2011-04-21 14:14:52 +0200

  • Fix compilation issues due to level of visibility of functions


r4402@localhost (orig r2771): bruno | 2011-04-22 01:49:03 +0200

  • Adds GUI support for compresion type. Fix half of #468.


r4403@localhost (orig r2772): bruno | 2011-04-22 02:00:07 +0200

  • Adds support of ext attr through the GUI. Fix second part of #468


r4404@localhost (orig r2773): bruno | 2011-04-22 02:22:24 +0200

  • Propose more variables in the mindi.conf example
  • More explicit messages when size unsufficient in mindi for kernel + initrd as per #471
  • Better loging of labeling in mondo when in nuke mode


  • Property svn:keywords set to Id
File size: 7.9 KB
Line 
1/***************************************************************************
2 mondo-rstr-newt.h - description
3 -------------------
4 begin : Sat Apr 20 2002
5 copyright : (C) 2002 by Stan Benoit
6 email : troff@nakedsoul.org
7 cvsid : $Id: mondo-rstr-newt.h 2816 2011-04-29 13:42:55Z bruno $
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#include "my-stuff.h"
21#include "../common/mondostructures.h"
22#include "../common/libmondo.h"
23#ifdef __FreeBSD__
24#define raid_device_record vinum_volume
25#endif /*__FreeBSD__*/
26
27#define NO_FLAWS_DETECTED "No flaws detected in mountlist at this time. Hit 'OK' to proceed."
28
29
30/** I found this in the code :) *******************************************/
31char g_strings_of_flist_window[ARBITRARY_MAXIMUM][MAX_STR_LEN];
32bool g_is_path_selected[ARBITRARY_MAXIMUM];
33bool g_is_path_expanded[ARBITRARY_MAXIMUM];
34char tmpnopath[MAX_STR_LEN + 2];
35char tmpprevpath[MAX_STR_LEN + 2];
36
37/* external subroutines and global vars */
38
39extern long get_time(void);
40extern char *last_line_of_file(char *);
41extern void center_string(char *, int);
42extern bool does_file_exist(char *);
43extern void finish(int);
44extern long get_phys_size_of_drive(char *);
45extern bool is_this_device_mounted(char *);
46extern void strip_spaces(char *);
47extern void initialize_raidrec(struct raid_device_record *);
48extern int make_list_of_drives(struct mountlist_itself *,
49 char[ARBITRARY_MAXIMUM][MAX_STR_LEN]);
50char *number_to_text(int);
51extern void reload_filelist(struct s_node *);
52extern void toggle_all_root_dirs_on(struct s_node *);
53extern void toggle_path_expandability(struct s_node *, char *, bool);
54extern void toggle_path_selection(struct s_node *, char *, bool);
55extern void toggle_node_selection(struct s_node *, bool);
56extern struct s_node *find_node_in_filelist(struct s_node *,
57 char *filename);
58extern int what_number_cd_is_this();
59//extern void fatal_error (char *);
60extern void sort_mountlist_by_device(struct mountlist_itself *);
61extern int load_mountlist(struct mountlist_itself *a, char *b);
62extern bool g_text_mode;
63
64
65/* hacks */
66extern int load_raidtab_into_raidlist(struct raidlist_itself *a, char *b);
67
68
69
70extern long g_start_time, g_minimum_progress, g_maximum_progress,
71 g_current_progress, g_currentY;
72extern bool g_ISO_restore_mode;
73
74
75/* my global variables */
76
77//extern newtComponent g_progressForm, g_blurb1, g_blurb2, g_blurb3, g_label,
78// g_timeline, g_percentline, g_scale;
79//extern char err_log_lines[NOOF_ERR_LINES][MAX_STR_LEN], g_blurb_str_1[MAX_STR_LEN] =
80// "", g_blurb_str_2[MAX_STR_LEN] = "", g_blurb_str_3[MAX_STR_LEN] = "";
81//newtComponent g_isoform_main =
82// NULL, g_isoform_header, g_isoform_scale, g_isoform_timeline,
83// g_isoform_pcline;
84//long g_isoform_starttime;
85//int g_isoform_old_progress = -1;
86//char g_isoform_header_str[MAX_STR_LEN];
87//int g_mysterious_dot_counter;
88
89
90
91
92
93/* my subroutines */
94
95void add_disklist_entry(struct list_of_disks *, char *,
96 struct mountlist_itself *);
97void add_mountlist_entry(struct mountlist_itself *,
98 struct raidlist_itself *, newtComponent, int,
99 void *keylist[]);
100void add_varslist_entry(struct raid_device_record *);
101bool ask_me_yes_or_no(char *);
102bool ask_me_OK_or_cancel(char *);
103long calculate_raid_device_size(struct mountlist_itself *,
104 struct raidlist_itself *, char *);
105void choose_raid_level(struct
106#ifdef __FreeBSD__
107 vinum_plex
108#else
109 raid_device_record
110#endif
111 *);
112void close_evalcall_form(void);
113void close_progress_form(void);
114void del_partns_listed_in_disklist(struct mountlist_itself *,
115 struct raidlist_itself *,
116 struct list_of_disks *);
117void delete_disklist_entry(struct list_of_disks *, char *, int);
118void delete_mountlist_entry(struct mountlist_itself *,
119 struct raidlist_itself *, newtComponent, int,
120 void *keylist[]);
121void delete_raidlist_entry(struct mountlist_itself *,
122 struct raidlist_itself *, char *);
123void delete_varslist_entry(struct raid_device_record *, int);
124char *disklist_entry_to_string(struct list_of_disks *, int);
125int edit_filelist(struct s_node *);
126void edit_mountlist_entry(struct mountlist_itself *,
127 struct raidlist_itself *, newtComponent, int,
128 void *keylist[]);
129void edit_raidlist_entry(struct mountlist_itself *,
130 struct raidlist_itself *,
131 struct raid_device_record *, int);
132void edit_varslist_entry(struct raid_device_record *, int);
133int edit_mountlist_in_newt(char *mountlist_fname,
134 struct mountlist_itself *,
135 struct raidlist_itself *);
136int edit_mountlist(char *mountlist_fname, struct mountlist_itself *,
137 struct raidlist_itself *);
138void edit_raidrec_additional_vars(struct raid_device_record *);
139char *evaluate_mountlist(struct mountlist_itself *);
140int find_device_in_mountlist(struct mountlist_itself *, char *);
141int find_next_free_index_in_disklist(struct list_of_disks *);
142int find_raid_device_in_raidlist(struct raidlist_itself *, char *);
143bool get_isodir_info(char *, char *, char *, char *, bool);
144void initiate_new_raidlist_entry(struct raidlist_itself *,
145 struct mountlist_itself *, int, char *);
146void insert_essential_additionalvars(struct raid_device_record *);
147bool is_this_raid_personality_registered(int);
148void log_file_end_to_screen(char *, char *);
149void log_to_screen(const char *fmt, ...);
150void make_list_of_unallocated_raid_partitions(struct mountlist_itself *,
151 struct mountlist_itself *,
152 struct raidlist_itself *);
153char *mountlist_entry_to_string(struct mountlist_itself *, int);
154void mvaddstr_and_log_it(int, int, char *);
155void nuke_mode_dummy();
156char *number_of_disks_as_string(int, char *);
157void open_evalcall_form(char *);
158void open_progress_form(char *, char *, char *, char *, long);
159void popup_and_OK(char *);
160char *popup_and_get_string(char *, char *, char *);
161bool popup_with_buttons(char *, char *, char *);
162void redraw_disklist(struct list_of_disks *, void *keylist[],
163 newtComponent);
164void redraw_mountlist(struct mountlist_itself *, void *keylist[],
165 newtComponent);
166void redraw_unallocpartnslist(struct mountlist_itself *, void *keylist[],
167 newtComponent);
168void redraw_varslist(struct additional_raid_variables *, void *keylist[],
169 newtComponent);
170int read_variableINT_and_remove_from_raidvars(struct raid_device_record *,
171 char *);
172void refresh_log_screen(void);
173void rejig_partition_name_in_raidlist_if_necessary(struct raidlist_itself
174 *, char *, char *);
175void remove_essential_additionalvars(struct raid_device_record *);
176void select_raid_disks(struct mountlist_itself *, struct raidlist_itself *,
177 struct raid_device_record *, char *,
178 struct list_of_disks *);
179void setup_newt_stuff(void);
180long size_of_specific_device(struct mountlist_itself *, char *);
181char *turn_raid_level_number_to_string(int);
182void update_evalcall_form(int);
183void update_progress_form(char *);
184void update_progress_form_full(char *, char *, char *);
185char which_restore_mode(void);
186void write_variableINT_to_raid_var_line(struct raid_device_record *, int,
187 char *, int);
188int where_in_drivelist_is_drive(struct list_of_disks *, char *);
189char *strip_path(char *);
190
191
192
193
194/* -------------------------------------------------------------------- */
195
196
197
198
199char tmpnopath[MAX_STR_LEN + 2];
200char tmpprevpath[MAX_STR_LEN + 2];
201
202#ifdef __FreeBSD__
203#undef raid_device_record
204#endif
Note: See TracBrowser for help on using the repository browser.