Changeset 2053 in MondoRescue
- Timestamp:
- Oct 23, 2008, 3:16:34 PM (16 years ago)
- Location:
- branches/2.2.8/mondo/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mondo/src/common/libmondo-cli.c
r2036 r2053 414 414 { 415 415 int i = 0; 416 int lastpos = 0;417 416 int mount_cnt = 0; 418 417 char *mounted_file_system = NULL; … … 559 558 i = 0; 560 559 lastpos = 0; 561 while ( token = mr_strtok(partition_list, token_chars, &lastpos)) {560 while ((token = mr_strtok(partition_list, token_chars, &lastpos)) != NULL) { 562 561 log_msg (5, "Found partition: %s", token); 563 562 strcpy(partitions[i++], token); … … 654 653 log_msg(4, " VG %s mount_list: %s", VG, mount_list); 655 654 lastpos = 0; 656 while ( token = mr_strtok(mount_list, token_chars, &lastpos)) {655 while ((token = mr_strtok(mount_list, token_chars, &lastpos)) != NULL) { 657 656 log_msg (5, "mount point token: %s", token); 658 657 if ((DSFptr = find_mount_point_in_list(token)) == NULL) { … … 675 674 log_msg(4, " Software raid device list: %s", mount_list); 676 675 lastpos = 0; 677 while ( token = mr_strtok(mount_list, token_chars, &lastpos)) {676 while ((token = mr_strtok(mount_list, token_chars, &lastpos)) != NULL) { 678 677 asprintf(&command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, VG); 679 678 log_msg (5, "Running: %s", command); … … 728 727 /* Loop through the software raid device list to see if we can find the partition */ 729 728 lastpos = 0; 730 while ( token = mr_strtok(mount_list, token_chars, &lastpos)) {729 while ((token = mr_strtok(mount_list, token_chars, &lastpos)) != NULL) { 731 730 asprintf(&command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, tmp); 732 731 log_msg(4, " Running: %s", command); … … 931 930 } 932 931 paranoid_free(tmp1); 933 while ( token = mr_strtok(flag_val['I'], token_chars, &lastpos)) {932 while ((token = mr_strtok(flag_val['I'], token_chars, &lastpos)) != NULL) { 934 933 switch (get_dsf_mount_list(token, &mounted_on_dsf, ¬_mounted_on_dsf)) { 935 934 /* It's a dsf but not a whole disk dsf */ … … 1238 1237 paranoid_free(tmp1); 1239 1238 lastpos = 0; 1240 while ( token = mr_strtok(flag_val['E'], token_chars, &lastpos)) {1239 while ((token = mr_strtok(flag_val['E'], token_chars, &lastpos)) != NULL) { 1241 1240 switch (get_dsf_mount_list(token, &mounted_on_dsf, ¬_mounted_on_dsf)) { 1242 1241 case 1: -
branches/2.2.8/mondo/src/common/libmondo-files-EXT.h
r1647 r2053 25 25 extern long noof_lines_that_match_wildcard(char *filelist_fname, 26 26 char *wildcard); 27 extern void register_pid(pid_t pid, char *name_str);28 27 extern long long space_occupied_by_cd(char *mountpt); 29 28 extern int whine_if_not_found(char *fname); -
branches/2.2.8/mondo/src/common/libmondo-files.c
r2048 r2053 1 /* libmondo-files.cfile manipulation1 /* file manipulation 2 2 $Id$ 3 .4 5 6 04/16/047 - find_home_of_exe() really does return NULL now if file not found8 9 03/22/0410 - added mode_of_file()11 12 10/02/0313 - cleaned up grab_percentage_from_last_line_of_file()14 15 09/1816 - added int make_grub_install_scriptlet()17 18 09/1619 - cleaned up mkisofs feedback window20 21 09/1222 - fixed Teuton-hostile bug in size_of_all_biggiefiles_K()23 24 09/0525 - added size_of_partition_in_mountlist_K()26 - size_of_all_biggiefiles_K() now calls get_phys_size_of_drive(fname)27 28 07/0229 - fixed calls to popup_and_get_string()30 31 05/1932 - added CP_BIN33 34 05/0535 - added Joshua Oreman's FreeBSD patches36 37 05/0438 - find_home_of_exe() now returns NULL if file not found39 40 04/2641 - if >4 media est'd, say one meeeellion42 43 04/2544 - fixed minor bug in find_home_of_exe()45 46 04/2447 - added lots of assert()'s and log_OS_error()'s48 49 04/0750 - fix find_home_of_exe()51 - cleaned up code a bit52 53 03/2754 - copy_mondo_and_mindi_stuff --- if _homedir_/payload.tgz exists then untar it to CD55 56 01/14/200357 - if backup media type == nfs then don't estimate no. of media reqd58 59 11/25/200260 - don't log/echo estimated # of media required if >=5061 62 10/01 - 11/0963 - chmod uses 0x, not decimal :)64 - added is_this_file_compressed()65 - replace convoluted grep with wc (KP)66 67 09/01 - 09/3068 - only show "number of media" estimate if no -x69 - run_program_and_log_output() now takes boolean operator to specify70 whether it will log its activities in the event of _success_71 72 08/01 - 08/3173 - handle unknown media sizes74 - cleaned up some log_it() calls75 76 07/2477 - created78 3 */ 79 4 -
branches/2.2.8/mondo/src/common/libmondo-files.h
r1647 r2053 27 27 char *cklist_fname); 28 28 long noof_lines_that_match_wildcard(char *filelist_fname, char *wildcard); 29 void register_pid(pid_t pid, char *name_str);30 29 long size_of_all_biggiefiles_K(); 31 30 long long space_occupied_by_cd(char *mountpt); -
branches/2.2.8/mondo/src/common/newt-specific.c
r2030 r2053 363 363 } 364 364 printf("Mondo has aborted.\n"); 365 register_pid(0, "mondo"); // finish() does this too, FYI366 365 if (!g_main_pid) { 367 366 log_msg(3, "FYI - g_main_pid is blank"); … … 388 387 /* newtPopHelpLine(); */ 389 388 390 register_pid(0, "mondo");391 389 chdir("/"); 392 390 run_program_and_log_output("umount " MNT_CDROM, FALSE); -
branches/2.2.8/mondo/src/mondoarchive/mondoarchive.c
r2030 r2053 39 39 extern void set_signals(int); 40 40 extern int g_current_media_number; 41 extern void register_pid(pid_t, char *);42 41 extern int g_currentY; 43 42 extern bool g_text_mode; … … 241 240 log_msg(9, "This"); 242 241 243 register_pid(g_main_pid, "mondo");244 242 set_signals(TRUE); // catch SIGTERM, etc. 245 243 run_program_and_log_output("dmesg -n1", TRUE); … … 448 446 } 449 447 distro_specific_kludges_at_end_of_mondoarchive(); 450 register_pid(0, "mondo");451 448 set_signals(FALSE); 452 449 -
branches/2.2.8/mondo/src/mondorestore/mondorestore.c
r2048 r2053 2853 2853 g_main_pid = getpid(); 2854 2854 srandom((int) (time(NULL))); 2855 register_pid(getpid(), "mondo");2856 2855 set_signals(TRUE); 2857 2856 g_kernel_version = get_kernel_version();
Note:
See TracChangeset
for help on using the changeset viewer.