Home | History | Annotate | Download | only in androidfw

Lines Matching defs:file

5  * you may not use this file except in compliance with the License.
42 #define MAGIC1 0x656c6946 // File
45 * File entity data format (v1):
49 * - the file data itself
51 * i.e. a 16-byte metadata header followed by the raw file data. If the
53 * interpret the file data itself correctly.
108 FileState file;
111 amt = read(fd, &file, sizeof(FileState));
119 int nameBufSize = round_up(file.nameLen);
125 snapshot->add(String8(filename, file.nameLen), file);
245 // store the file metadata first
256 // now store the file content
350 char const* file = files[i];
351 r.file = file;
354 err = stat(file, &st);
364 // we compute the crc32 later down below, when we already have the file open.
384 // file removed
385 LOGP("file removed: %s", p.string());
386 g.deleted = true; // They didn't mention the file, but we noticed that it's gone.
391 // file added
392 LOGP("file added: %s", g.file.string());
393 write_update_file(dataStream, q, g.file.string());
400 int fd = open(g.file.string(), O_RDONLY);
402 // We can't open the file. Don't report it as a delete either. Let the
405 LOGP("Unable to open file %s - skipping", g.file.string());
416 write_update_file(dataStream, fd, g.s.mode, p, g.file.string());
436 write_update_file(dataStream, q, g.file.string());
559 // Magic fields for the ustar file format
566 // [ 100 : 8 ] file mode
574 // [ 124 : 12 ] file size in bytes
584 // [ 156 : 1 ] link/file type
589 type = '0'; // tar magic: '0' == normal file
591 ALOGW("Error: unknown file mode 0%o [%s]", s.st_mode, filepath.string());
596 // [ 157 : 100 ] name of linked file [not implemented]
615 // [ 0 : 100 ]; file name/path
675 // Checksum and write the 512-byte ustar file header block to the output
679 // Now write the file data itself, for real files. We honor tar's convention that
688 ALOGE("Unable to read file [%s], err=%d (%s)", filepath.string(),
754 // Get the metadata block off the head of the file entity and use that to
755 // set up the output file
768 ALOGW("Restoring file with unsupported metadata version %d (currently %d)",
774 // Write the file and compute the crc
778 ALOGW("Could not open file %s -- %s", filename.string(), strerror(errno));
797 ALOGW("Error stating file that we just created %s", filename.string());
801 r.file = filename;
841 fprintf(stderr, "error (%s) writing to file %s\n", strerror(errno), path);
871 fprintf(stderr, "compare_file file length should be %d, was %d\n", len, amt);
1283 fprintf(stderr, "Error \"%s\" writing golden file %s\n", strerror(errno), filename);
1291 fprintf(stderr, "Error \"%s\" opening golden file %s for read\n", strerror(errno),