Changeset 3147 in MondoRescue for branches/3.1/mondo/src/common/libmondo-filelist.c
- Timestamp:
- Jun 19, 2013, 8:34:46 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mondo/src/common/libmondo-filelist.c
r2937 r3147 30 30 31 31 extern char *MONDO_LOGFILE; 32 33 extern long g_max_biggie_size; 32 34 33 35 /* Reference to global bkpinfo */ … … 195 197 /*@ long ****************************************/ 196 198 long lino = 0; 197 long max_sane_size_for_a_file;199 // A big file has more than 64 MB of real content 198 200 long curr_set_size; 199 201 long noof_lines; … … 221 223 assert_string_is_neither_NULL_nor_zerolength(filelist); 222 224 assert(maxsetsizeK > 0); 223 224 max_sane_size_for_a_file = 64L * 1024L;225 // max_sane_size_for_a_file = maxsetsizeK*2;226 // if (max_sane_size_for_a_file > 32*1024)227 // { max_sane_size_for_a_file = 32*1024; }228 225 229 226 log_it("filelist=%s;", filelist); … … 269 266 siz = 0; 270 267 } else { 271 siz = (long) (buf.st_size >> 10); 272 } 273 if (siz > max_sane_size_for_a_file) { 274 log_msg(10, "Adding %s to big files\n", incoming); 268 // blocks are 512 bytes long - cf man 2 stat - Pass to the previous unit (MB => kB e.g.) 269 // use blocks instead of size to allow sparse file correct handling as much as possible 270 siz = (long) ((buf.st_blocks*512) >> 10); 271 } 272 if (siz > g_max_biggie_size) { 273 log_msg(10, "Adding %s to big files (size = %ld)\n", incoming, siz); 275 274 fprintf(fbig, "%s\n", incoming); 276 275 } else { 277 276 curr_set_size += siz; 278 log_msg(10, "Adding %s to filelist %d \n", incoming, curr_set_no);277 log_msg(10, "Adding %s to filelist %d (size = %ld)\n", incoming, curr_set_no, siz); 279 278 fprintf(fout, "%s\n", incoming); 280 279 if (curr_set_size > maxsetsizeK) { … … 400 399 char *tmp = NULL; 401 400 401 char *p; 402 402 403 pattr = popen(syscall, "r"); 403 404 if (!pattr) { … … 431 432 char *strtmp = NULL; 432 433 char *tmp = NULL; 434 char *p = NULL; 433 435 int i; 434 436 … … 517 519 int retval = 0; 518 520 int i; 519 char *p, *q ;521 char *p, *q, *r; 520 522 char *tmp = NULL; 521 523 FILE *pin, *pout, *faclin; … … 1323 1325 char *skip_these = NULL; 1324 1326 char *new_with_pipe; 1325 char *strtmp ;1326 char *token ;1327 char *strtmp = NULL; 1328 char *token = NULL; 1327 1329 char *find_excludes = NULL; 1328 1330 char *name_of_evalcall_form = NULL; … … 1374 1376 1375 1377 log_msg(5, "find command = %s", strtmp); 1376 (void)system(strtmp);1378 paranoid_system(strtmp); 1377 1379 mr_free(strtmp); 1378 1380 … … 1510 1512 char *sz_filelist; 1511 1513 char *exclude_paths = NULL; 1512 int i;1513 1514 FILE *fout; 1514 1515 char *command = NULL; … … 1597 1598 fatal_error("Cannot openout to sz_filelist"); 1598 1599 } 1599 i = 0;1600 1600 if ((!include_paths) || (strlen(include_paths) == 0)) { 1601 1601 log_msg(1, "Including only '/' in %s", sz_filelist); … … 1697 1697 { 1698 1698 /*@ int ******************************************************** */ 1699 int noof_chars;1700 1699 static int depth = 0; 1701 1700 static char original_string[MAX_STR_LEN]; … … 1715 1714 assert(startnode != NULL); 1716 1715 assert(string_to_find != NULL); 1717 1718 noof_chars = strlen(string_to_find) + 1; /* we include the '\0' */1719 1716 1720 1717 log_msg(7, "starting --- str=%s", string_to_find);
Note:
See TracChangeset
for help on using the changeset viewer.