Lines Matching refs:bufUsed
403 static int handleApp(uint8_t **pbuf, uint32_t bufUsed, FILE *out, uint32_t layoutFlags, uint64_t ap… in handleApp() argument
410 uint32_t bufSz = bufUsed * 3 /2; in handleApp()
419 if (bufUsed < sizeof(*bin)) { in handleApp()
420 ERR("File size too small: %" PRIu32, bufUsed); in handleApp()
447 app.symtabSize = (struct SymtabEntry*)(buf + bufUsed) - app.symtab; in handleApp()
450 app.dataSizeUsed = bufUsed; in handleApp()
462 if (app.symtabSize * sizeof(struct SymtabEntry) + sect->rel_end != bufUsed + FLASH_BASE) { in handleApp()
573 static int handleKey(uint8_t **pbuf, uint32_t bufUsed, FILE *out, uint32_t layoutFlags, uint64_t ap… in handleKey() argument
595 good = good && fwrite(buf, bufUsed, 1, out) == 1; in handleKey()
600 static int handleOs(uint8_t **pbuf, uint32_t bufUsed, FILE *out, uint32_t layoutFlags, bool bare) in handleOs() argument
608 .size = bufUsed in handleOs()
628 good = good && fwrite(buf, bufUsed, 1, out) == 1; in handleOs()
635 uint32_t bufUsed = 0; in main() local
734 buf = loadFile(posArg[0], &bufUsed); in main()
735 DBG("Read %" PRIu32 " bytes from %s", bufUsed, posArg[0]); in main()
739 ret = handleApp(&buf, bufUsed, out, layoutFlags, appId, appVer, verbose); in main()
742 ret = handleKey(&buf, bufUsed, out, layoutFlags, appId, keyId); in main()
745 ret = handleOs(&buf, bufUsed, out, layoutFlags, bareData); in main()