Mark that we are loading in the global state and setup the fields * needed to provide loading stats. * 'filename' is optional and used for rdb-check on error */
| 2627 | * needed to provide loading stats. |
| 2628 | * 'filename' is optional and used for rdb-check on error */ |
| 2629 | void startLoadingFile(FILE *fp, const char* filename, int rdbflags) { |
| 2630 | struct stat sb; |
| 2631 | if (fstat(fileno(fp), &sb) == -1) |
| 2632 | sb.st_size = 0; |
| 2633 | rdbFileBeingLoaded = filename; |
| 2634 | startLoading(sb.st_size, rdbflags); |
| 2635 | } |
| 2636 | |
| 2637 | /* Refresh the loading progress info */ |
| 2638 | void loadingProgress(off_t pos) { |
no test coverage detected