Lines Matching refs:filename
120 char* filename = nameBufSize <= (int)sizeof(filenameBuf) in read_snapshot_file() local
123 amt = read(fd, filename, nameBufSize); in read_snapshot_file()
125 snapshot->add(String8(filename, file.nameLen), file); in read_snapshot_file()
128 if (filename != filenameBuf) { in read_snapshot_file()
129 free(filename); in read_snapshot_file()
747 RestoreHelperBase::WriteFile(const String8& filename, BackupDataReader* in) in WriteFile() argument
770 ALOGW("Could not read metadata for %s -- %ld / %s", filename.c_str(), in WriteFile()
787 fd = open(filename.c_str(), O_CREAT|O_RDWR|O_TRUNC, mode); in WriteFile()
789 ALOGW("Could not open file %s -- %s", filename.c_str(), strerror(errno)); in WriteFile()
797 ALOGW("Error '%s' writing '%s'", strerror(errno), filename.c_str()); in WriteFile()
806 err = stat(filename.c_str(), &st); in WriteFile()
808 ALOGW("Error stating file that we just created %s", filename.c_str()); in WriteFile()
812 r.file = filename; in WriteFile()
914 const char* filename = SCRATCH_DIR "backup_helper_test_empty.snap"; in backup_helper_test_empty() local
920 fd = creat(filename, 0666); in backup_helper_test_empty()
922 fprintf(stderr, "error creating %s\n", filename); in backup_helper_test_empty()
940 err = compare_file(filename, correct_data, sizeof(correct_data)); in backup_helper_test_empty()
946 fd = open(filename, O_RDONLY); in backup_helper_test_empty()
948 fprintf(stderr, "error opening for read %s\n", filename); in backup_helper_test_empty()
973 const char* filename = SCRATCH_DIR "backup_helper_test_four.snap"; in backup_helper_test_four() local
979 fd = creat(filename, 0666); in backup_helper_test_four()
981 fprintf(stderr, "error opening %s\n", filename); in backup_helper_test_four()
1076 err = compare_file(filename, correct_data, sizeof(correct_data)); in backup_helper_test_four()
1082 fd = open(filename, O_RDONLY); in backup_helper_test_four()
1084 fprintf(stderr, "error opening for read %s\n", filename); in backup_helper_test_four()
1174 const char* filename = SCRATCH_DIR "data_writer.data"; in backup_helper_test_data_writer() local
1180 fd = creat(filename, 0666); in backup_helper_test_data_writer()
1196 err = compare_file(filename, DATA_GOLDEN_FILE, DATA_GOLDEN_FILE_SIZE); in backup_helper_test_data_writer()
1279 const char* filename = SCRATCH_DIR "data_reader.data"; in backup_helper_test_data_reader() local
1285 fd = creat(filename, 0666); in backup_helper_test_data_reader()
1293 fprintf(stderr, "Error \"%s\" writing golden file %s\n", strerror(errno), filename); in backup_helper_test_data_reader()
1299 fd = open(filename, O_RDONLY); in backup_helper_test_data_reader()
1302 filename); in backup_helper_test_data_reader()
1334 get_mod_time(const char* filename, struct timeval times[2]) in get_mod_time() argument
1338 err = stat64(filename, &st); in get_mod_time()
1340 fprintf(stderr, "stat '%s' failed: %s\n", filename, strerror(errno)); in get_mod_time()