Changeset 687 in MondoRescue for trunk/mondo/mondo/common/libmondo-files.c
- Timestamp:
- Jul 17, 2006, 3:39:42 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-files.c
r672 r687 435 435 if (i < 0) { 436 436 asprintf(&command, 437 "tail -n3 %s | fgrep -i \"%c\" | tail -n1 | awk '{print $0;}'",437 "tail -n3 %s | grep -Fi \"%c\" | tail -n1 | awk '{print $0;}'", 438 438 filename, '%'); 439 439 asprintf(&lastline, … … 513 513 * @return The length of the file, or -1 for error. 514 514 */ 515 long longlength_of_file(char *filename)515 off_t length_of_file(char *filename) 516 516 { 517 517 /*@ pointers *************************************************** */ … … 519 519 520 520 /*@ long long ************************************************* */ 521 long longlength;521 off_t length; 522 522 523 523 fin = fopen(filename, "r"); … … 528 528 } 529 529 fseeko(fin, 0, SEEK_END); 530 length = ftell (fin);530 length = ftello(fin); 531 531 paranoid_fclose(fin); 532 532 return (length); … … 763 763 } 764 764 } else { 765 /* BERLIOS: more than long here ??? */ 765 766 file_len_K = (long) (length_of_file(fname) / 1024); 766 767 }
Note:
See TracChangeset
for help on using the changeset viewer.