Changeset 1106 in MondoRescue for trunk/mondo/src/mondorestore
- Timestamp:
- Feb 7, 2007, 11:55:11 PM (17 years ago)
- Location:
- trunk/mondo/src/mondorestore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/mondorestore/mondo-prep.c
r1086 r1106 2010 2010 system("clear"); 2011 2011 newtResume(); 2012 mr_free( drivelist);2012 mr_free((void*) drivelist); 2013 2013 return (retval); 2014 2014 } … … 2604 2604 } 2605 2605 log_to_screen(_("Mountlist adjusted to suit current hard drive(s)")); 2606 mr_free( drivelist);2606 mr_free((void*) drivelist); 2607 2607 } 2608 2608 -
trunk/mondo/src/mondorestore/mondo-rstr-newt.c
r1086 r1106 67 67 /** int ****************************************************************/ 68 68 int i = 0; 69 int i ndex = 0;69 int idx = 0; 70 70 int currline = 0; 71 71 int items = 0; … … 103 103 log_it("I don't know what this button does"); 104 104 } else { 105 i ndex = find_next_free_index_in_disklist(disklist);105 idx = find_next_free_index_in_disklist(disklist); 106 106 107 107 items = disklist->entries; 108 108 strcpy(disklist->el[items].device, 109 109 unallocated_raid_partitions->el[currline].device); 110 disklist->el[items].index = i ndex;110 disklist->el[items].index = idx; 111 111 disklist->entries = ++items; 112 112 … … 1733 1733 calculate_raid_device_size(mountlist, raidlist, 1734 1734 raidrec->raid_device); 1735 mr_free( bkp_raidrec);1735 mr_free((void*) bkp_raidrec); 1736 1736 #endif 1737 1737 } … … 2259 2259 2260 2260 /** int ***************************************************************/ 2261 int i ndex = -1;2261 int idx = -1; 2262 2262 int pos = 0; 2263 2263 … … 2269 2269 for (done = FALSE; !done;) { 2270 2270 for (pos = 0; 2271 pos < disklist->entries && disklist->el[pos].index <= i ndex;2271 pos < disklist->entries && disklist->el[pos].index <= idx; 2272 2272 pos++); 2273 2273 if (pos >= disklist->entries) { 2274 2274 done = TRUE; 2275 2275 } else { 2276 i ndex = disklist->el[pos].index;2277 } 2278 } 2279 return (i ndex + 1);2276 idx = disklist->el[pos].index; 2277 } 2278 } 2279 return (idx + 1); 2280 2280 } 2281 2281 … … 2335 2335 char *isodir_path, bool nuke_me_please) 2336 2336 { 2337 char *value = NULL; 2337 2338 2338 2339 /** initialize ********************************************************/ 2339 2340 // %d no var ??? 2341 // log_it("%d - AAA - isodir_path = %s", isodir_path); 2340 malloc_string(value); 2341 2342 2342 if (isodir_device == NULL) { 2343 2343 mr_asprintf(&isodir_device, "/dev/"); … … 2346 2346 mr_asprintf(&isodir_path, "/"); 2347 2347 } 2348 if ( does_file_exist("/tmp/NFS-SERVER-PATH")) {2349 mr_free(isodir_device);2350 isodir_device = last_line_of_file("/tmp/NFS-SERVER-MOUNT");2348 if (read_cfg_var(g_mondo_cfg_file, "nfs-server-path", value) == 0) { 2349 read_cfg_var(g_mondo_cfg_file, "nfs-server-mount", isodir_device); 2350 mr_free(isodir_format); 2351 2351 mr_asprintf(&isodir_format, "nfs"); 2352 2352 mr_free(isodir_path); 2353 isodir_path = last_line_of_file("/tmp/NFS-SERVER-PATH"); 2354 } 2353 mr_asprintf(isodir_path, value); 2354 } 2355 mr_free(value); 2356 2355 2357 if (nuke_me_please) { 2356 2358 return (TRUE); … … 2451 2453 * Dummy function that proves that we can get to the point where Mondo is run. 2452 2454 */ 2453 void nuke_mode_dummy( )2455 void nuke_mode_dummy(void) 2454 2456 { 2455 2457 … … 2912 2914 sizeof(struct list_of_disks)); 2913 2915 } 2914 mr_free( bkp_raidrec);2915 mr_free( bkp_disklist);2916 mr_free( bkp_raidlist);2917 mr_free( unallocated_raid_partitions);2916 mr_free((void*) bkp_raidrec); 2917 mr_free((void*) bkp_disklist); 2918 mr_free((void*) bkp_raidlist); 2919 mr_free((void*) unallocated_raid_partitions); 2918 2920 } 2919 2921 #endif -
trunk/mondo/src/mondorestore/mondo-rstr-newt.h
r783 r1106 120 120 char *mountlist_entry_to_string(struct mountlist_itself *, int); 121 121 void mvaddstr_and_log_it(int, int, char *); 122 void nuke_mode_dummy( );122 void nuke_mode_dummy(void); 123 123 char *number_of_disks_as_string(int, char *); 124 124 void open_evalcall_form(char *); -
trunk/mondo/src/mondorestore/mondo-rstr-tools-EXT.h
r914 r1106 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 */ -
trunk/mondo/src/mondorestore/mondo-rstr-tools.c
r1086 r1106 55 55 * Free the malloc()s for the filename variables. 56 56 */ 57 void free_MR_global_filenames( )57 void free_MR_global_filenames(void) 58 58 { 59 59 mr_free(g_biggielist_txt); … … 537 537 538 538 assert(p_external_copy_of_mountlist != NULL); 539 mountlist = mr_malloc(sizeof(struct mountlist_itself));539 mountlist = (struct mountlist_itself *)mr_malloc(sizeof(struct mountlist_itself)); 540 540 memcpy((void *) mountlist, (void *) p_external_copy_of_mountlist, 541 541 sizeof(struct mountlist_itself)); … … 620 620 } 621 621 run_program_and_log_output("df -m", 3); 622 mr_free( mountlist);622 mr_free((void*) mountlist); 623 623 return (retval); 624 624 } … … 918 918 919 919 read_cfg_var(cfg_file, "acl", value); 920 if (strstr(value, " TRUE")) {920 if (strstr(value, "yes")) { 921 921 mr_asprintf(&g_getfacl,"setfacl"); 922 922 mr_msg(1, "We will restore ACLs"); … … 926 926 } 927 927 read_cfg_var(cfg_file, "xattr", value); 928 if (strstr(value, " TRUE")) {928 if (strstr(value, "yes")) { 929 929 mr_asprintf(&g_getfattr,"setfattr"); 930 930 mr_msg(1, "We will restore XATTRs"); … … 2027 2027 assert(p_external_copy_of_mountlist != NULL); 2028 2028 2029 mountlist = mr_malloc(sizeof(struct mountlist_itself));2029 mountlist = (struct mountlist_itself *)mr_malloc(sizeof(struct mountlist_itself)); 2030 2030 memcpy((void *) mountlist, (void *) p_external_copy_of_mountlist, 2031 2031 sizeof(struct mountlist_itself)); … … 2120 2120 log_to_screen(_("All partitions were unmounted OK.")); 2121 2121 } 2122 mr_free( mountlist);2122 mr_free((void*) mountlist); 2123 2123 return (retval); 2124 2124 } … … 2441 2441 char *screen_message = NULL; 2442 2442 2443 raidlist = mr_malloc(sizeof(struct raidlist_itself));2443 raidlist = (struct raidlist_itself *)mr_malloc(sizeof(struct raidlist_itself)); 2444 2444 2445 2445 assert(wait_for_percentage <= 100); … … 2479 2479 } 2480 2480 } 2481 mr_free( raidlist);2482 } 2481 mr_free((void*) raidlist); 2482 } -
trunk/mondo/src/mondorestore/mondo-rstr-tools.h
r1079 r1106 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.