Lines Matching refs:filename
173 bool image_save(const std::string& filename, image *ctx) in image_save() argument
176 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), in image_save()
180 FATAL("failed to open file '%s: %s'\n", filename.c_str(), in image_save()
192 bool image_ecc_new(const std::string& filename, image *ctx) in image_ecc_new() argument
196 ctx->fec_filename = filename.c_str(); in image_ecc_new()
212 bool image_ecc_load(const std::string& filename, image *ctx) in image_ecc_load() argument
214 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), O_RDONLY)); in image_ecc_load()
217 FATAL("failed to open file '%s': %s\n", filename.c_str(), in image_ecc_load()
222 FATAL("failed to seek to header in '%s': %s\n", filename.c_str(), in image_ecc_load()
233 filename.c_str(), strerror(errno)); in image_ecc_load()
237 FATAL("invalid magic in '%s': %08x\n", filename.c_str(), p->magic); in image_ecc_load()
241 FATAL("unsupported version in '%s': %u\n", filename.c_str(), in image_ecc_load()
246 FATAL("unexpected header size in '%s': %u\n", filename.c_str(), in image_ecc_load()
251 FATAL("invalid roots in '%s': %u\n", filename.c_str(), p->roots); in image_ecc_load()
255 FATAL("invalid length in '%s': %u\n", filename.c_str(), p->fec_size); in image_ecc_load()
263 if (!image_ecc_new(filename, ctx)) { in image_ecc_load()
268 FATAL("inconsistent header in '%s'\n", filename.c_str()); in image_ecc_load()
272 FATAL("failed to rewind '%s': %s", filename.c_str(), strerror(errno)); in image_ecc_load()
277 filename.c_str(), strerror(errno)); in image_ecc_load()