Home | History | Annotate | Download | only in tools

Lines Matching refs:sctx

323 	struct sb_section_ctx *sctx = ictx->sect_head;
328 while (sctx) {
329 shdr = &sctx->payload;
336 sctx = sctx->sect;
397 struct sb_section_ctx *sctx = ictx->sect_head;
399 while (sctx) {
400 cctx = sctx->cmd_head;
421 sctx = sctx->sect;
712 struct sb_section_ctx *sctx;
719 sctx = calloc(1, sizeof(*sctx));
720 if (!sctx)
745 sctx->boot = bootable;
747 shdr = &sctx->payload;
771 ictx->sect_head = sctx;
772 ictx->sect_tail = sctx;
774 ictx->sect_tail->sect = sctx;
775 ictx->sect_tail = sctx;
781 free(sctx);
787 sctx = ictx->sect_tail;
808 if (!sctx->cmd_head) {
809 sctx->cmd_head = cctx;
810 sctx->cmd_tail = cctx;
812 sctx->cmd_tail->cmd = cctx;
813 sctx->cmd_tail = cctx;
822 struct sb_section_ctx *sctx = ictx->sect_tail;
852 if (!sctx->cmd_head) {
853 sctx->cmd_head = cctx;
854 sctx->cmd_tail = cctx;
856 sctx->cmd_tail->cmd = cctx;
857 sctx->cmd_tail = cctx;
866 struct sb_section_ctx *sctx = ictx->sect_tail;
1021 if (!sctx->cmd_head) {
1022 sctx->cmd_head = cctx;
1023 sctx->cmd_tail = cctx;
1025 sctx->cmd_tail->cmd = cctx;
1026 sctx->cmd_tail = cctx;
1039 struct sb_section_ctx *sctx = ictx->sect_tail;
1118 if (!sctx->cmd_head) {
1119 sctx->cmd_head = cctx;
1120 sctx->cmd_tail = cctx;
1122 sctx->cmd_tail->cmd = cctx;
1123 sctx->cmd_tail = cctx;
1137 struct sb_section_ctx *sctx = ictx->sect_tail;
1209 if (!sctx->cmd_head) {
1210 sctx->cmd_head = cctx;
1211 sctx->cmd_tail = cctx;
1213 sctx->cmd_tail->cmd = cctx;
1214 sctx->cmd_tail = cctx;
1239 struct sb_section_ctx *sctx = ictx->sect_tail;
1299 if (!sctx->cmd_head) {
1300 sctx->cmd_head = cctx;
1301 sctx->cmd_tail = cctx;
1303 sctx->cmd_tail->cmd = cctx;
1304 sctx->cmd_tail = cctx;
1356 struct sb_section_ctx *sctx = ictx->sect_head;
1369 while (sctx) {
1370 hdr->image_blocks += sctx->size / SB_BLOCK_SIZE;
1371 sctx = sctx->sect;
1411 struct sb_section_ctx *sctx = ictx->sect_head;
1417 while (sctx) {
1418 shdr = &sctx->payload;
1428 cctx = sctx->cmd_head;
1443 sctx = sctx->sect;
1903 struct sb_section_ctx *sctx, FILE *fp)
1911 while (tsize < sctx->size) {
1915 if (!sctx->cmd_head) {
1916 sctx->cmd_head = cctx;
1917 sctx->cmd_tail = cctx;
1919 sctx->cmd_tail->cmd = cctx;
1920 sctx->cmd_tail = cctx;
1947 struct sb_section_ctx *sctx;
1954 sctx = calloc(1, sizeof(*sctx));
1955 if (!sctx)
1958 ictx->sect_head = sctx;
1959 ictx->sect_tail = sctx;
1961 ictx->sect_tail->sect = sctx;
1962 ictx->sect_tail = sctx;
1965 size = fread(&sctx->payload, 1, sizeof(sctx->payload), fp);
1966 if (size != sizeof(sctx->payload)) {
1984 sctx = ictx->sect_head;
1985 while (sctx) {
1986 shdr = &sctx->payload;
1989 sctx->boot = 1;
1993 sctx->size = (shdr->section_size * SB_BLOCK_SIZE) +
1996 shdr->section_number, bootable, sctx->size);
2008 ret = sb_verify_commands(ictx, sctx, fp);
2012 sctx = sctx->sect;
2017 * check if the first TAG command is at sctx->section_offset
2137 struct sb_section_ctx *sctx = ictx->sect_head, *s_head;
2141 while (sctx) {
2142 s_head = sctx;
2143 c_head = sctx->cmd_head;
2153 sctx = sctx->sect;
2254 struct sb_section_ctx *sctx;
2266 sctx = ictx->sect_head;
2267 while (sctx) {
2268 size += sctx->size;
2269 sctx = sctx->sect;
2280 sctx = ictx->sect_head;
2281 while (sctx) {
2282 memcpy(iptr, &sctx->payload, sizeof(struct sb_sections_header));
2284 sctx = sctx->sect;
2290 sctx = ictx->sect_head;
2291 while (sctx) {
2292 cctx = sctx->cmd_head;
2307 sctx = sctx->sect;