Changeset 1663 in MondoRescue for branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
- Timestamp:
- Sep 27, 2007, 12:21:18 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
r1639 r1663 49 49 extern char *MONDO_LOGFILE; 50 50 51 /* Reference to global bkpinfo */ 52 extern struct s_bkpinfo *bkpinfo; 53 51 54 /* Should we use or not extended attributes and acl when restoring */ 52 55 char *g_getfattr = NULL; … … 141 144 */ 142 145 int 143 extract_config_file_from_ramdisk(struct s_bkpinfo *bkpinfo, 144 char *ramdisk_fname, 145 char *output_cfg_file, 146 char *output_mountlist_file) 146 extract_config_file_from_ramdisk(char *ramdisk_fname, 147 char *output_cfg_file, 148 char *output_mountlist_file) 147 149 { 148 150 char *mountpt = NULL; … … 211 213 /** 212 214 * Keep trying to get mondo-restore.cfg from the archive, until the user gives up. 213 * @param bkpinfo The backup information structure. 214 */ 215 void get_cfg_file_from_archive_or_bust(struct s_bkpinfo *bkpinfo) 216 { 217 while (get_cfg_file_from_archive(bkpinfo)) { 215 */ 216 void get_cfg_file_from_archive_or_bust() 217 { 218 while (get_cfg_file_from_archive()) { 218 219 if (!ask_me_yes_or_no 219 220 (_ … … 222 223 fatal_error("Could not find config file/archives. Aborting."); 223 224 } 224 interactively_obtain_media_parameters_from_user( bkpinfo,FALSE);225 interactively_obtain_media_parameters_from_user(FALSE); 225 226 } 226 227 } … … 285 286 * @return 0 for success, nonzero for failure. 286 287 */ 287 int iso_fiddly_bits( struct s_bkpinfo *bkpinfo,bool nuke_me_please)288 int iso_fiddly_bits(bool nuke_me_please) 288 289 { 289 290 char *mount_isodir_command = NULL; … … 341 342 } 342 343 if (!IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 343 mount_cdrom( bkpinfo);344 } 345 i = what_number_cd_is_this( bkpinfo); /* has the side-effect of calling mount_cdrom() */344 mount_cdrom(); 345 } 346 i = what_number_cd_is_this(); /* has the side-effect of calling mount_cdrom() */ 346 347 mr_msg(1, "%s #%d has been mounted via loopback mount", 347 348 bkpinfo->backup_media_string, i); … … 601 602 * @return 0 for success, nonzero for failure. 602 603 */ 603 int mount_cdrom( struct s_bkpinfo *bkpinfo)604 int mount_cdrom() 604 605 { 605 606 char *mount_cmd = NULL; … … 750 751 * @return 0 for success, nonzero for failure. 751 752 */ 752 int read_cfg_file_into_bkpinfo(char *cfgf , struct s_bkpinfo *bkpinfo)753 int read_cfg_file_into_bkpinfo(char *cfgf) 753 754 { 754 755 char *value = NULL; … … 1019 1020 mr_asprintf(&iso_mnt, ""); 1020 1021 mr_asprintf(&iso_path, ""); 1021 if (mount_cdrom( bkpinfo)) {1022 if (mount_cdrom()) { 1022 1023 fatal_error 1023 1024 ("Unable to mount isodir. Failed to mount CD-ROM as well."); … … 1043 1044 mr_msg(2, 1044 1045 "bkpinfo->backup_media_type != media_specified_by_user, so I'd better ask :)"); 1045 interactively_obtain_media_parameters_from_user( bkpinfo,FALSE);1046 interactively_obtain_media_parameters_from_user(FALSE); 1046 1047 media_specified_by_user = bkpinfo->backup_media_type; 1047 get_cfg_file_from_archive( bkpinfo);1048 get_cfg_file_from_archive(); 1048 1049 } 1049 1050 } … … 1072 1073 */ 1073 1074 struct 1074 s_node *process_filelist_and_biggielist( struct s_bkpinfo *bkpinfo)1075 s_node *process_filelist_and_biggielist() 1075 1076 { 1076 1077 struct s_node *filelist = NULL; … … 1115 1116 "Calling insist_on_this_cd_number; bkpinfo->isodir=%s", 1116 1117 bkpinfo->isodir); 1117 insist_on_this_cd_number( bkpinfo,1);1118 insist_on_this_cd_number(1); 1118 1119 mr_msg(2, "Back from iotcn"); 1119 1120 run_program_and_log_output("mount", 1); … … 1125 1126 FILELIST_FULL_STUB, 1126 1127 "tmp/i-want-my-lvm", MONDO_CFG_FILE_STUB); 1127 1128 1128 mr_msg(1, "tarcommand = %s", command); 1129 1129 run_program_and_log_output(command, 1); … … 1790 1790 * - @c bkpinfo->disaster_recovery 1791 1791 */ 1792 void setup_MR_global_filenames( struct s_bkpinfo *bkpinfo)1792 void setup_MR_global_filenames() 1793 1793 { 1794 1794 char *temppath; … … 2081 2081 * @return 0 for success, nonzero for failure. 2082 2082 */ 2083 int get_cfg_file_from_archive( struct s_bkpinfo *bkpinfo)2083 int get_cfg_file_from_archive() 2084 2084 { 2085 2085 int retval = 0; … … 2125 2125 } else { 2126 2126 mr_msg(2, "gcffa --- calling mount_cdrom now :)"); 2127 if (!mount_cdrom( bkpinfo)) {2127 if (!mount_cdrom()) { 2128 2128 mr_msg(2, 2129 2129 "gcffa --- managed to mount CD; so, no need for Plan B"); … … 2132 2132 try_plan_B = TRUE; 2133 2133 } 2134 if (what_number_cd_is_this(bkpinfo) > 1) { 2135 insist_on_this_cd_number(bkpinfo, 2136 (g_current_media_number = 1)); 2134 if (what_number_cd_is_this() > 1) { 2135 insist_on_this_cd_number((g_current_media_number = 1)); 2137 2136 } 2138 2137 }
Note:
See TracChangeset
for help on using the changeset viewer.