Changeset 1103 in MondoRescue for branches/stable/mondo/src/common
- Timestamp:
- Feb 6, 2007, 11:10:01 AM (18 years ago)
- Location:
- branches/stable/mondo/src/common
- Files:
-
- 6 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
Note:
See TracChangeset
for help on using the changeset viewer.