Home | History | Annotate | Download | only in rawbu

Lines Matching refs:FILE

110                     // directory itself, since the restore file won't
156 // Don't delete the backup file
174 static int write_int32(FILE* fh, int32_t val)
185 static int write_int64(FILE* fh, int64_t val)
196 static int copy_file(FILE* dest, FILE* src, off_t size, const char* destName,
208 fprintf(stderr, "unable to read source (%d of %ld bytes) file '%s': %s\n",
219 fprintf(stderr, "unable to write file (%d of %d bytes) '%s': '%s'\n",
236 static int write_header(FILE* fh, int type, const char* path, const struct stat* st)
256 static int backup_dir(FILE* fh, const char* srcPath)
328 // Skip the backup file
330 printf("Skipping backup file %s...\n", backupFilePath);
333 printf("Saving file %s...\n", fullPath);
346 FILE* src = fopen(fullPath, "r");
348 fprintf(stderr, "unable to open source file '%s': %s\n",
377 FILE* fh = fopen(destPath, "w");
416 static int32_t read_int32(FILE* fh, int32_t defVal)
427 static int64_t read_int64(FILE* fh, int64_t defVal)
438 static int read_header(FILE* fh, int* type, char** path, struct stat* st)
446 fprintf(stderr, "bad token %d in restore file\n", *type);
452 fprintf(stderr, "bad path length %d in restore file\n", pathLen);
457 fprintf(stderr, "truncated path in restore file\n");
466 fprintf(stderr, "bad uid in restore file at '%s'\n", readPath);
471 fprintf(stderr, "bad gid in restore file at '%s'\n", readPath);
476 fprintf(stderr, "bad mode in restore file at '%s'\n", readPath);
481 fprintf(stderr, "bad atime in restore file at '%s'\n", readPath);
487 fprintf(stderr, "bad mtime in restore file at '%s'\n", readPath);
493 fprintf(stderr, "bad ctime in restore file at '%s'\n", readPath);
507 FILE* fh = fopen(srcPath, "r");
516 fprintf(stderr, "Restore file has bad version: 0x%x\n", inputFileVersion);
563 typeName = "file";
566 fprintf(stderr, "bad file size %ld in restore file\n", size);
571 printf("Restoring file %s...\n", path);
573 FILE* dest = fopen(path, "w");
575 fprintf(stderr, "unable to open destination file '%s': %s\n",
633 fprintf(stderr,"Usage: %s COMMAND [options] [backup-file-path]\n", cmd);