Lines Matching defs:header
30 // BlobCache::Header::mMagicNumber value
33 // BlobCache::Header::mBlobCacheVersion value
36 // BlobCache::Header::mDeviceVersion value
168 size_t size = align4(sizeof(Header) + PROPERTY_VALUE_MAX);
178 // Write the cache header
179 if (size < sizeof(Header)) {
180 ALOGE("flatten: not enough room for cache header");
183 Header* header = reinterpret_cast<Header*>(buffer);
184 header->mMagicNumber = blobCacheMagic;
185 header->mBlobCacheVersion = blobCacheVersion;
186 header->mDeviceVersion = blobCacheDeviceVersion;
187 header->mNumEntries = mCacheEntries.size();
189 header->mBuildIdLength = property_get("ro.build.id", buildId, "");
190 memcpy(header->mBuildId, buildId, header->mBuildIdLength);
194 off_t byteOffset = align4(sizeof(Header) + header->mBuildIdLength);
231 // Read the cache header
232 if (size < sizeof(Header)) {
233 ALOGE("unflatten: not enough room for cache header");
236 const Header* header = reinterpret_cast<const Header*>(buffer);
237 if (header->mMagicNumber != blobCacheMagic) {
238 ALOGE("unflatten: bad magic number: %" PRIu32, header->mMagicNumber);
243 if (header->mBlobCacheVersion != blobCacheVersion ||
244 header->mDeviceVersion != blobCacheDeviceVersion ||
245 len != header->mBuildIdLength ||
246 strncmp(buildId, header->mBuildId, len)) {
253 off_t byteOffset = align4(sizeof(Header) + header->mBuildIdLength);
254 size_t numEntries = header->mNumEntries;