Changeset 1645 in MondoRescue for branches/2.2.5/mondo/src/mondorestore/mondo-rstr-tools.c
- Timestamp:
- Sep 24, 2007, 3:04:43 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mondo/src/mondorestore/mondo-rstr-tools.c
r1640 r1645 162 162 extern char *MONDO_LOGFILE; 163 163 164 /* Reference to global bkpinfo */ 165 extern struct s_bkpinfo *bkpinfo; 166 164 167 /* Should we use or not extended attributes and acl when restoring */ 165 168 char *g_getfattr = NULL; … … 285 288 */ 286 289 int 287 extract_config_file_from_ramdisk(struct s_bkpinfo *bkpinfo, 288 char *ramdisk_fname, 290 extract_config_file_from_ramdisk(char *ramdisk_fname, 289 291 char *output_cfg_file, 290 292 char *output_mountlist_file) … … 354 356 /** 355 357 * Keep trying to get mondo-restore.cfg from the archive, until the user gives up. 356 * @param bkpinfo The backup information structure.357 358 */ 358 void get_cfg_file_from_archive_or_bust( struct s_bkpinfo *bkpinfo)359 { 360 while (get_cfg_file_from_archive( bkpinfo)) {359 void get_cfg_file_from_archive_or_bust() 360 { 361 while (get_cfg_file_from_archive()) { 361 362 if (!ask_me_yes_or_no 362 363 ("Failed to find config file/archives. Choose another source?")) … … 364 365 fatal_error("Could not find config file/archives. Aborting."); 365 366 } 366 interactively_obtain_media_parameters_from_user( bkpinfo,FALSE);367 interactively_obtain_media_parameters_from_user(FALSE); 367 368 } 368 369 } … … 432 433 * @return 0 for success, nonzero for failure. 433 434 */ 434 int iso_fiddly_bits( struct s_bkpinfo *bkpinfo,bool nuke_me_please)435 int iso_fiddly_bits(bool nuke_me_please) 435 436 { 436 437 char *mount_isodir_command, *tmp, *command; … … 488 489 } 489 490 if (!IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 490 mount_cdrom( bkpinfo);491 } 492 i = what_number_cd_is_this( bkpinfo); /* has the side-effect of calling mount_cdrom() */491 mount_cdrom(); 492 } 493 i = what_number_cd_is_this(); /* has the side-effect of calling mount_cdrom() */ 493 494 sprintf(tmp, "%s #%d has been mounted via loopback mount", 494 495 media_descriptor_string(bkpinfo->backup_media_type), i); … … 637 638 * @return 0 for success, nonzero for failure. 638 639 */ 639 int mount_cdrom( struct s_bkpinfo *bkpinfo)640 int mount_cdrom() 640 641 { 641 642 char *mount_cmd; … … 906 907 * @return 0 for success, nonzero for failure. 907 908 */ 908 int read_cfg_file_into_bkpinfo(char *cfgf , struct s_bkpinfo *bkpinfo)909 int read_cfg_file_into_bkpinfo(char *cfgf) 909 910 { 910 911 /** add mallocs **/ … … 1188 1189 strcpy(bkpinfo->media_device, "/dev/cdrom"); /* superfluous */ 1189 1190 bkpinfo->isodir[0] = iso_mnt[0] = iso_path[0] = '\0'; 1190 if (mount_cdrom( bkpinfo)) {1191 if (mount_cdrom()) { 1191 1192 fatal_error 1192 1193 ("Unable to mount isodir. Failed to mount CD-ROM as well."); … … 1209 1210 log_msg(2, 1210 1211 "bkpinfo->backup_media_type != media_specified_by_user, so I'd better ask :)"); 1211 interactively_obtain_media_parameters_from_user(bkpinfo, 1212 FALSE); 1212 interactively_obtain_media_parameters_from_user(FALSE); 1213 1213 media_specified_by_user = bkpinfo->backup_media_type; 1214 get_cfg_file_from_archive( bkpinfo);1214 get_cfg_file_from_archive(); 1215 1215 /* 1216 1216 if (media_specified_by_user != cdr && media_specified_by_user == cdrw) … … 1250 1250 */ 1251 1251 struct 1252 s_node *process_filelist_and_biggielist( struct s_bkpinfo *bkpinfo)1252 s_node *process_filelist_and_biggielist() 1253 1253 { 1254 1254 struct s_node *filelist; … … 1293 1293 "Calling insist_on_this_cd_number; bkpinfo->isodir=%s", 1294 1294 bkpinfo->isodir); 1295 insist_on_this_cd_number( bkpinfo,1);1295 insist_on_this_cd_number(1); 1296 1296 log_msg(2, "Back from iotcn"); 1297 1297 run_program_and_log_output("mount", 1); … … 1989 1989 * - @c bkpinfo->disaster_recovery 1990 1990 */ 1991 void setup_MR_global_filenames( struct s_bkpinfo *bkpinfo)1991 void setup_MR_global_filenames() 1992 1992 { 1993 1993 char *temppath; … … 2292 2292 * @return 0 for success, nonzero for failure. 2293 2293 */ 2294 int get_cfg_file_from_archive( struct s_bkpinfo *bkpinfo)2294 int get_cfg_file_from_archive() 2295 2295 { 2296 2296 int retval = 0; … … 2379 2379 "Cannot find ramdisk file on mountpoint. Are you sure that's a boot disk in the drive?"); 2380 2380 } 2381 if (extract_config_file_from_ramdisk 2382 (bkpinfo, ramdisk_fname, cfg_file, mountlist_file)) { 2381 if (extract_config_file_from_ramdisk(ramdisk_fname, cfg_file, mountlist_file)) { 2383 2382 log_msg(2, 2384 2383 "Warning - failed to extract config file from ramdisk. I think this boot disk is mangled."); … … 2394 2393 } else { 2395 2394 log_msg(2, "gcffa --- calling mount_cdrom now :)"); 2396 if (!mount_cdrom( bkpinfo)) {2395 if (!mount_cdrom()) { 2397 2396 log_msg(2, 2398 2397 "gcffa --- managed to mount CD; so, no need for Plan B"); … … 2401 2400 try_plan_B = TRUE; 2402 2401 } 2403 if (what_number_cd_is_this(bkpinfo) > 1) { 2404 insist_on_this_cd_number(bkpinfo, 2405 (g_current_media_number = 1)); 2402 if (what_number_cd_is_this() > 1) { 2403 insist_on_this_cd_number((g_current_media_number = 1)); 2406 2404 } 2407 2405 }
Note:
See TracChangeset
for help on using the changeset viewer.