Changeset 1135 in MondoRescue
- Timestamp:
- Feb 11, 2007, 12:37:42 PM (18 years ago)
- Location:
- branches/stable/mondo/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-archive.c
r1123 r1135 1115 1115 mr_msg(4, "%s[%d:%d] - archiving %d...", FORTY_SPACES, getpid(), 1116 1116 this_thread_no, archiving_set_no); 1117 res = 1118 archive_this_fileset(bkpinfo, archiving_filelist_fname, 1117 res = archive_this_fileset(bkpinfo, archiving_filelist_fname, 1119 1118 archiving_afioball_fname, 1120 1119 archiving_set_no); … … 1486 1485 char *storing_filelist_fname; 1487 1486 char *storing_afioball_fname; 1488 char *tmp ;1487 char *tmp = NULL; 1489 1488 char *media_usage_comment; 1490 1489 pthread_t archival_thread[ARCH_THREADS]; … … 1501 1500 mr_msg(8, "here"); 1502 1501 assert(bkpinfo != NULL); 1503 tmp = mr_malloc(MAX_STR_LEN * 2);1502 /* BERLIOS: To be removed */ 1504 1503 malloc_string(result_str); 1505 1504 malloc_string(curr_xattr_list_fname); … … 1523 1522 *p_last_set_archived = -1; 1524 1523 *p_next_set_to_archive = 0; 1525 sprintf(tmp, "%s/archives/filelist.full", bkpinfo->scratchdir);1526 1524 log_to_screen("Archiving regular files"); 1527 1525 mr_msg(5, "Go, Shorty. It's your birthday."); … … 1641 1639 update_progress_form(media_usage_comment); 1642 1640 if (res) { 1643 sprintf(tmp,1644 "Failed to add archive %ld's files to CD dir\n",1645 storing_set_no);1641 mr_asprintf(&tmp, 1642 "Failed to add archive %ld's files to CD dir\n", 1643 storing_set_no); 1646 1644 log_to_screen(tmp); 1645 mr_free(tmp); 1647 1646 fatal_error 1648 1647 ("Is your hard disk full? If not, please send the author the logfile."); … … 1654 1653 close_progress_form(); 1655 1654 1656 sprintf(tmp, "Your regular files have been archived ");1657 1655 mr_msg(2, "Joining background threads to foreground thread"); 1658 1656 for (i = 0; i < noof_threads; i++) { … … 1663 1661 mr_msg(2, "Done."); 1664 1662 if (retval) { 1665 strcat(tmp, "(with errors)."); 1666 } else { 1667 strcat(tmp, "successfully."); 1663 mr_asprintf(&tmp, 1664 "Your regular files have been archived (with errors)."); 1665 } else { 1666 mr_asprintf(&tmp, 1667 "Your regular files have been archived successfully"); 1668 1668 } 1669 1669 log_to_screen(tmp); 1670 mr_free(tmp); 1670 1671 mr_free(transfer_block); 1671 1672 mr_free(result_str); -
branches/stable/mondo/src/lib/mr_file.c
r1133 r1135 23 23 24 24 if ((fd = fopen(path, mode)) == NULL) { 25 mr_msg (1,line,file,"Unable to open %s",path);25 mr_msg_int(1,line,file,"Unable to open %s",path); 26 26 mr_exit(-1,"Exiting"); 27 27 } … … 34 34 35 35 if (fd == NULL) { 36 mr_msg (1,line,file,"fd is NULL.\nShould NOT happen.");36 mr_msg_int(1,line,file,"fd is NULL.\nShould NOT happen."); 37 37 mr_exit(-1,"Exiting"); 38 38 } 39 39 va_start(args,fmt); 40 40 if (vfprintf(fd, fmt, args) < 0) { 41 mr_msg (1,line,file,"Unable to print to fd");41 mr_msg_int(1,line,file,"Unable to print to fd"); 42 42 mr_exit(-1,"Exiting"); 43 43 } … … 48 48 49 49 if (**fd == NULL) { 50 mr_msg (1,line,file,"fd is NULL.\nShould NOT happen.");50 mr_msg_int(1,line,file,"fd is NULL.\nShould NOT happen."); 51 51 mr_exit(-1,"Exiting"); 52 52 } 53 53 if (*fd == NULL) { 54 mr_msg (1,line,file,"File descriptor is NULL.\nShould NOT happen.");54 mr_msg_int(1,line,file,"File descriptor is NULL.\nShould NOT happen."); 55 55 mr_exit(-1,"Exiting"); 56 56 } 57 57 if (fclose(*fd) < 0) { 58 mr_msg (1,line,file,"Unable to close File Descriptor");58 mr_msg_int(1,line,file,"Unable to close File Descriptor"); 59 59 } 60 60 *fd = NULL; … … 64 64 65 65 if (mkdir(pathname,mode) != 0) { 66 mr_msg (1,line,file,"Unable to create directory %s",pathname);66 mr_msg_int(1,line,file,"Unable to create directory %s",pathname); 67 67 mr_exit(-1,"Exiting"); 68 68 }
Note:
See TracChangeset
for help on using the changeset viewer.