Home | History | Annotate | Download | only in updater

Lines Matching full:fmap

29 #include "fmap.h"
125 struct fmap h;
130 * Try to find the FMAP signature at 64-byte boundaries
145 struct fmap *fmap_load(struct flash_device *dev, off_t offset)
147 struct fmap hdr;
148 struct fmap *fmap;
152 ALOGD("Searching FMAP @0x%08lx\n", offset);
155 ALOGD("Cannot read FMAP header\n");
160 ALOGD("Cannot find FMAP\n");
164 size = sizeof(struct fmap) + hdr.nareas * sizeof(struct fmap_area);
165 fmap = malloc(size);
167 res = flash_read(dev, offset, fmap, size);
169 ALOGD("Cannot read FMAP\n");
170 free(fmap);
174 return fmap;
181 struct fmap *fmap = flash_get_fmap(dev);
182 if (!fmap)
186 for (i = 0; i < fmap->nareas; i++)
187 if (!strcmp(name, (const char*)fmap->areas[i].name))
190 if (i == fmap->nareas) {
195 *offset = fmap->areas[i].offset;
207 struct fmap *fmap = flash_get_fmap(dev);
211 if (!fmap)
215 for (i = 0; i < fmap->nareas; i++)
216 if (!strcmp(name, (const char*)fmap->areas[i].name))
218 if (i == fmap->nareas) {
222 *size = fmap->areas[i].size;
223 start_offset = fmap->areas[i].offset;