Changeset 2414 in MondoRescue
- Timestamp:
- Sep 20, 2009, 2:53:32 AM (15 years ago)
- Location:
- branches/2.2.10/mondo/src/common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-string-EXT.h
r2413 r2414 29 29 30 30 extern int compare_two_filelist_entries(void *va, void *vb); 31 extern int severity_of_difference(char *filename, char * out_reason);31 extern int severity_of_difference(char *filename, char **out_reason); 32 32 33 33 extern char *percent_media_full_comment(); -
branches/2.2.10/mondo/src/common/libmondo-string.c
r2413 r2414 851 851 * @return The severity (1-3). 852 852 */ 853 int severity_of_difference(char *fn, char * out_reason) {854 855 int sev ;853 int severity_of_difference(char *fn, char **out_reason) { 854 855 int sev = 3; 856 856 char *reason = NULL; 857 857 char *filename = NULL; … … 867 867 } 868 868 869 sev = 3;870 869 mr_asprintf(reason, "Changed since backup. Consider running a differential backup in a day or two."); 871 870 … … 956 955 mr_asprintf(reason, "Temporary file (a lockfile, perhaps) used by software such as X or KDE to register its presence."); 957 956 } 958 if (out_reason) { 959 strcpy(out_reason, reason); 957 958 if (reason != NULL) { 959 *out_reason = reason; 960 960 } 961 961 mr_free(filename); 962 mr_free(reason);963 962 return (sev); 964 963 } -
branches/2.2.10/mondo/src/common/libmondo-string.h
r2413 r2414 26 26 27 27 int compare_two_filelist_entries(void *va, void *vb); 28 int severity_of_difference(char *filename, char * out_reason);28 int severity_of_difference(char *filename, char **out_reason); 29 29 30 30 char *percent_media_full_comment(); -
branches/2.2.10/mondo/src/common/newt-specific.c
r2382 r2414 1401 1401 void popup_changelist_from_file(char *source_file) { 1402 1402 1403 char *reason ;1403 char *reason = NULL; 1404 1404 newtComponent myForm; 1405 1405 newtComponent bClose; … … 1472 1472 newtFormAddComponents(myForm, headerMsg, fileListbox, bClose, bSelect, NULL); 1473 1473 1474 malloc_string(reason);1475 1474 while (!finished) { 1476 1475 b_res = newtRunForm(myForm); … … 1487 1486 currline = i; 1488 1487 if (filelist->entries > 0) { 1489 severity_of_difference(filelist->el[currline]. filename, reason);1488 severity_of_difference(filelist->el[currline]. filename, &reason); 1490 1489 mr_asprintf(tmp, "%s --- %s", filelist->el[currline].filename, reason); 1491 1490 1492 1491 popup_and_OK(tmp); 1493 1492 mr_free(tmp); 1493 mr_free(reason); 1494 1494 } 1495 1495 } 1496 1496 } 1497 1497 } 1498 paranoid_free(reason);1499 1498 1500 1499 newtFormDestroy(myForm);
Note:
See TracChangeset
for help on using the changeset viewer.