Changeset 2338 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-files.c
- Timestamp:
- Aug 21, 2009, 1:47:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-files.c
r2334 r2338 422 422 char *command = NULL; 423 423 /*@ pointers **************************************************** */ 424 char *p ;424 char *p = NULL; 425 425 426 426 /*@ int's ******************************************************* */ 427 int i; 428 429 for (i = NOOF_ERR_LINES - 1; 430 i >= 0 && !strstr(err_log_lines[i], "% Done") 431 && !strstr(err_log_lines[i], "% done"); i--); 427 int i = 0; 428 429 for (i = NOOF_ERR_LINES - 1; i >= 0 && !strstr(err_log_lines[i], "% Done") && !strstr(err_log_lines[i], "% done"); i--); 432 430 if (i < 0) { 433 431 mr_asprintf(command, "tail -n3 %s | grep -Fi \"%c\" | tail -n1 | awk '{print $0;}'", filename, '%'); … … 445 443 if (p) { 446 444 *p = '\0'; 447 } 448 if (!p) { 445 } else { 449 446 mr_free(lastline); 450 447 return (0); 451 448 } 452 *p = '\0'; 453 for (p--; *p != ' '&& p != lastline; p--);449 450 for (p--; isdigit(p) && p != lastline; p--); 454 451 if (p != lastline) { 455 452 p++; 456 453 } 454 i = atoi(p); 457 455 mr_free(lastline); 458 459 i = atoi(p);460 456 return (i); 461 457 } … … 1214 1210 * @param bkpinfo The backup information structure. Fields used: 1215 1211 * - @c bkpinfo->backup_media_type 1216 * - @c bkpinfo->image_devs1217 1212 * - @c bkpinfo->media_size 1218 1213 * - @c bkpinfo->optimal_set_size … … 1245 1240 scratchLL = (scratchLL * 2) / 3; 1246 1241 } else if (bkpinfo->use_gzip) { 1242 scratchLL = (scratchLL * 2) / 3; 1243 } else if (bkpinfo->use_lzma) { 1247 1244 scratchLL = (scratchLL * 2) / 3; 1248 1245 } else {
Note:
See TracChangeset
for help on using the changeset viewer.