Changeset 1103 in MondoRescue
- Timestamp:
- Feb 6, 2007, 11:10:01 AM (18 years ago)
- Location:
- branches/stable/mondo/src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-fifo-EXT.h
r128 r1103 4 4 long internal_block_size); 5 5 extern void sigpipe_occurred(int); 6 extern void kill_buffer( );6 extern void kill_buffer(void); -
branches/stable/mondo/src/common/libmondo-filelist.c
r1082 r1103 420 420 } 421 421 filelist->ch = '\0'; 422 mr_free( filelist);422 mr_free((void*) filelist); 423 423 depth--; 424 424 if (depth == 0) { … … 429 429 430 430 431 int call_exe_and_pipe_output_to_fd(char *sys call, FILE * pout)431 int call_exe_and_pipe_output_to_fd(char *sys_call, FILE * pout) 432 432 { 433 433 FILE *pattr; 434 434 char *tmp; 435 pattr = popen(sys call, "r");435 pattr = popen(sys_call, "r"); 436 436 if (!pattr) { 437 log_msg(1, "Failed to open fattr() %s", sys call);437 log_msg(1, "Failed to open fattr() %s", sys_call); 438 438 return (1); 439 439 } 440 440 if (feof(pattr)) { 441 log_msg(1, "Failed to call fattr() %s", sys call);441 log_msg(1, "Failed to call fattr() %s", sys_call); 442 442 paranoid_pclose(pattr); 443 443 return (2); … … 461 461 FILE *pout; 462 462 char *pout_command; 463 char *sys call;463 char *sys_call; 464 464 char *file_to_analyze; 465 465 char *strtmp = NULL; … … 487 487 log_msg(8, "Analyzing %s", file_to_analyze); 488 488 asprintf(&strtmp, syscall_sprintf, mr_stresc(file_to_analyze, "`$\\\"", '\\')); 489 asprintf(&sys call, "%s 2>> /dev/null", strtmp); // " MONDO_LOGFILE);489 asprintf(&sys_call, "%s 2>> /dev/null", strtmp); // " MONDO_LOGFILE); 490 490 mr_free(strtmp); 491 call_exe_and_pipe_output_to_fd(sys call, pout);492 mr_free(sys call);491 call_exe_and_pipe_output_to_fd(sys_call, pout); 492 mr_free(sys_call); 493 493 } 494 494 paranoid_fclose(fin); -
branches/stable/mondo/src/common/libmondo-raid.c
r1080 r1103 232 232 */ 233 233 void add_disk_to_raid_device(struct list_of_disks *disklist, 234 char *device_to_add, int i ndex)234 char *device_to_add, int idx) 235 235 { 236 236 int items; … … 240 240 items = disklist->entries; 241 241 strcpy(disklist->el[items].device, device_to_add); 242 disklist->el[items].index = i ndex;242 disklist->el[items].index = idx; 243 243 items++; 244 244 disklist->entries = items; … … 696 696 697 697 struct list_of_disks *disklist; 698 int index;699 698 int v; 700 699 … … 754 753 log_it(tmp); 755 754 } else { 756 index = atoi(valueB); 757 add_disk_to_raid_device(disklist, value, index); 755 add_disk_to_raid_device(disklist, value, atoi(valueB)); 758 756 } 759 757 } else { -
branches/stable/mondo/src/common/libmondo-tools.h
r128 r1103 3 3 */ 4 4 5 #ifndef LIBMONDO_TOOLS_H 6 # define LIBMONDO_TOOLS_H 7 5 8 void clean_up_KDE_desktop_if_necessary(void); 6 9 7 long get_time( );10 long get_time(void); 8 11 extern void (*log_debug_msg) (int debug_level, const char *szFile, 9 12 const char *szFunction, int nLine, … … 21 24 #endif 22 25 void log_trace(char *o); 23 int some_basic_system_sanity_checks( );26 int some_basic_system_sanity_checks(void); 24 27 25 28 … … 47 50 void free_libmondo_global_strings(void); 48 51 49 double get_kernel_version( );50 char *get_architecture( );52 double get_kernel_version(void); 53 char *get_architecture(void); 51 54 bool does_nonMS_partition_exist(void); 52 55 void stop_magicdev_if_necessary(void); … … 54 57 void stop_autofs_if_necessary(void); 55 58 void restart_autofs_if_necessary(void); 59 60 #endif /* LIBMONDO_TOOLS_H */ 61 -
branches/stable/mondo/src/common/newt-specific.c
r1080 r1103 96 96 g_xmondo_stdout[MAX_NEWT_COMMENT_LEN]; ///< .... @bug Unneeded w/current XMondo. 97 97 bool g_called_by_xmondo = FALSE; ///< @bug Unneeded w/current XMondo. 98 char *g_erase_tmpdir_and_scratchdir ; ///< The command to run to erase the tmpdir and scratchdir at the end of Mondo.99 char *g_selfmounted_isodir ; ///< Holds the NFS mountpoint if mounted via mondoarchive.98 char *g_erase_tmpdir_and_scratchdir = NULL; ///< The command to run to erase the tmpdir and scratchdir at the end of Mondo. 99 char *g_selfmounted_isodir = NULL; ///< Holds the NFS mountpoint if mounted via mondoarchive. 100 100 101 101 /* @} - end of globalGroup */ … … 375 375 */ 376 376 void 377 finish(int signal ) {377 finish(int signal_code) { 378 378 char *command; 379 379 malloc_string(command); 380 380 381 /* if (signal ==0) { popup_and_OK("Please press <enter> to quit."); } */381 /* if (signal_code==0) { popup_and_OK("Please press <enter> to quit."); } */ 382 382 383 383 /* newtPopHelpLine(); */ … … 411 411 // system("clear"); 412 412 // iamhere("Finished calling newtFinished"); 413 printf("Execution run ended; result=%d\n", signal );413 printf("Execution run ended; result=%d\n", signal_code); 414 414 printf("Type 'less %s' to see the output log\n", MONDO_LOGFILE); 415 415 free_libmondo_global_strings(); 416 exit(signal );416 exit(signal_code); 417 417 } 418 418 … … 693 693 void 694 694 popup_and_OK(char *prompt) { 695 charch;695 int ch; 696 696 697 697 assert_string_is_neither_NULL_nor_zerolength(prompt); -
branches/stable/mondo/src/common/newt-specific.h
r128 r1103 3 3 */ 4 4 5 5 #ifndef NEWT_SPECIFIC_H 6 # define NEWT_SPECIFIC_H 6 7 #ifndef H_NEWT 7 8 #include <newt.h> … … 11 12 bool ask_me_OK_or_cancel(char *prompt); 12 13 void close_evalcall_form(void); 13 void close_progress_form( );14 void close_progress_form(void); 14 15 void fatal_error(char *error_string); 15 16 void finish(int signal); … … 23 24 bool popup_and_get_string(char *title, char *b, char *output, int maxsize); 24 25 bool popup_with_buttons(char *p, char *button1, char *button2); 25 void refresh_log_screen( );26 void setup_newt_stuff( );26 void refresh_log_screen(void); 27 void setup_newt_stuff(void); 27 28 void update_evalcall_form_ratio(int num, int denom); 28 29 void update_evalcall_form(int curr); … … 36 37 37 38 t_bkptype which_backup_media_type(bool); 38 int which_compression_level( );39 int which_compression_level(void); 39 40 40 41 41 42 void popup_changelist_from_file(char *source_file); 43 44 #endif /* NEWT_SPECIFIC_H */ 45 -
branches/stable/mondo/src/include/my-stuff.h
r1087 r1103 275 275 * Free variables and call finish(@p x). 276 276 */ 277 #define paranoid_MR_finish(x) {free_MR_global_filenames (); if (g_bkpinfo_DONTUSETHIS) mr_free ( g_bkpinfo_DONTUSETHIS ); finish(x); }277 #define paranoid_MR_finish(x) {free_MR_global_filenames (); if (g_bkpinfo_DONTUSETHIS) mr_free ( (void*) g_bkpinfo_DONTUSETHIS ); finish(x); } 278 278 279 279 /** -
branches/stable/mondo/src/mondorestore/mondo-prep.c
r1080 r1103 2002 2002 system("clear"); 2003 2003 newtResume(); 2004 mr_free( drivelist);2004 mr_free((void*) drivelist); 2005 2005 return (retval); 2006 2006 } … … 2605 2605 } 2606 2606 log_to_screen("Mountlist adjusted to suit current hard drive(s)"); 2607 mr_free( drivelist);2607 mr_free((void*) drivelist); 2608 2608 } 2609 2609 -
branches/stable/mondo/src/mondorestore/mondo-rstr-newt.c
r1087 r1103 76 76 /** int ****************************************************************/ 77 77 int i = 0; 78 int i ndex = 0;78 int idx = 0; 79 79 int currline = 0; 80 80 int items = 0; … … 109 109 log_it("I don't know what this button does"); 110 110 } else { 111 i ndex = find_next_free_index_in_disklist(disklist);111 idx = find_next_free_index_in_disklist(disklist); 112 112 113 113 items = disklist->entries; 114 114 strcpy(disklist->el[items].device, 115 115 unallocated_raid_partitions->el[currline].device); 116 disklist->el[items].index = i ndex;116 disklist->el[items].index = idx; 117 117 disklist->entries = ++items; 118 118 … … 1660 1660 mr_free(sz_parity_disks); 1661 1661 mr_free(sz_failed_disks); 1662 mr_free( bkp_raidrec);1662 mr_free((void*) bkp_raidrec); 1663 1663 #endif 1664 1664 } … … 2188 2188 2189 2189 /** int ***************************************************************/ 2190 int i ndex = -1;2190 int idx = -1; 2191 2191 int pos = 0; 2192 2192 … … 2198 2198 for (done = FALSE; !done;) { 2199 2199 for (pos = 0; 2200 pos < disklist->entries && disklist->el[pos].index <= i ndex;2200 pos < disklist->entries && disklist->el[pos].index <= idx; 2201 2201 pos++); 2202 2202 if (pos >= disklist->entries) { 2203 2203 done = TRUE; 2204 2204 } else { 2205 i ndex = disklist->el[pos].index;2206 } 2207 } 2208 return (i ndex + 1);2205 idx = disklist->el[pos].index; 2206 } 2207 } 2208 return (idx + 1); 2209 2209 } 2210 2210 … … 2389 2389 * Dummy function that proves that we can get to the point where Mondo is run. 2390 2390 */ 2391 void nuke_mode_dummy( )2391 void nuke_mode_dummy(void) 2392 2392 { 2393 2393 … … 2846 2846 mr_free(sz_res); 2847 2847 mr_free(header_text); 2848 mr_free( bkp_raidrec);2849 mr_free( bkp_disklist);2850 mr_free( bkp_raidlist);2851 mr_free( unallocated_raid_partitions);2848 mr_free((void*) bkp_raidrec); 2849 mr_free((void*) bkp_disklist); 2850 mr_free((void*) bkp_raidlist); 2851 mr_free((void*) unallocated_raid_partitions); 2852 2852 } 2853 2853 #endif -
branches/stable/mondo/src/mondorestore/mondo-rstr-newt.h
r1067 r1103 157 157 char *mountlist_entry_to_string(struct mountlist_itself *, int); 158 158 void mvaddstr_and_log_it(int, int, char *); 159 void nuke_mode_dummy( );159 void nuke_mode_dummy(void); 160 160 char *number_of_disks_as_string(int, char *); 161 161 void open_evalcall_form(char *); -
branches/stable/mondo/src/mondorestore/mondo-rstr-tools-EXT.h
r912 r1103 3 3 */ 4 4 5 extern void free_MR_global_filenames( );5 extern void free_MR_global_filenames(void); 6 6 extern void get_cfg_file_from_archive_or_bust(struct s_bkpinfo *); 7 7 extern bool is_file_in_list(char *, char *, char *); /* needle, haystack, preamble */ -
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
r1102 r1103 53 53 * Free the malloc()s for the filename variables. 54 54 */ 55 void free_MR_global_filenames( )55 void free_MR_global_filenames(void) 56 56 { 57 57 mr_free(g_biggielist_txt); … … 556 556 } 557 557 run_program_and_log_output("df -m", 3); 558 mr_free( mountlist);558 mr_free((void*) mountlist); 559 559 mr_free(tmp); 560 560 mr_free(format); … … 2178 2178 log_to_screen("All partitions were unmounted OK."); 2179 2179 } 2180 mr_free( mountlist);2180 mr_free((void*) mountlist); 2181 2181 mr_free(command); 2182 2182 mr_free(tmp); … … 2557 2557 } 2558 2558 mr_free(screen_message); 2559 mr_free( raidlist);2560 } 2559 mr_free((void*) raidlist); 2560 } -
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.h
r1052 r1103 3 3 */ 4 4 5 void free_global_filenames( );5 void free_global_filenames(void); 6 6 void get_cfg_file_from_archive_or_bust(struct s_bkpinfo *); 7 7 bool is_file_in_list(char *, char *, char *); /* needle, haystack, preamble */
Note:
See TracChangeset
for help on using the changeset viewer.