public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Vince Hsu <vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: AMartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
	TWarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [cbootimage PATCH V3 1/3] Rename last_bl_blk to last_blk
Date: Wed, 16 Jul 2014 10:37:15 +0800	[thread overview]
Message-ID: <1405478237-19178-1-git-send-email-vinceh@nvidia.com> (raw)

Also update the next_bct_blk. Then we have the correct pointer
to the next block for the next image write.

Signed-off-by: Vince Hsu <vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Acked-by: Allen Martin <amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

---
Changes from v2:
	- Add ack from Allen
---
---
 src/cbootimage.h  | 2 +-
 src/data_layout.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/cbootimage.h b/src/cbootimage.h
index 6def766f1770..baade00f5e33 100644
--- a/src/cbootimage.h
+++ b/src/cbootimage.h
@@ -95,7 +95,7 @@ typedef struct build_image_context_rec
 	u_int8_t *bct;
 
 	char *bct_filename;
-	u_int32_t last_bl_blk;
+	u_int32_t last_blk;
 	u_int32_t bct_size; /* The BCT file size */
 	u_int32_t boot_data_version; /* The boot data version of BCT */
 	u_int8_t bct_init; /* The flag for the memory allocation of bct */
diff --git a/src/data_layout.c b/src/data_layout.c
index c848a6141b2b..73663beffbe2 100644
--- a/src/data_layout.c
+++ b/src/data_layout.c
@@ -552,8 +552,9 @@ write_bootloaders(build_image_context *context)
 				current_blk++;
 				virtual_blk++;
 			}
-			context->last_bl_blk = current_blk;
+			context->last_blk = current_blk;
 		}
+		context->next_bct_blk = context->last_blk + 1;
 		free(buffer);
 	}
 
-- 
1.8.3.2

             reply	other threads:[~2014-07-16  2:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16  2:37 Vince Hsu [this message]
     [not found] ` <1405478237-19178-1-git-send-email-vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-07-16  2:37   ` [cbootimage PATCH V3 2/3] Add Tegra132 support for the cbootimage utility Vince Hsu
     [not found]     ` <1405478237-19178-2-git-send-email-vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-07-16  4:18       ` Allen Martin
2014-07-16  2:37   ` [cbootimage PATCH V3 3/3] Dump MTS information by bct_dump utility Vince Hsu
2014-07-16  4:58   ` [cbootimage PATCH V3 1/3] Rename last_bl_blk to last_blk Allen Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405478237-19178-1-git-send-email-vinceh@nvidia.com \
    --to=vinceh-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=AMartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=TWarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox