]> git.karo-electronics.de Git - karo-tx-uboot.git/commit
Patch to mkenvimage to handle text files with length that exceed env size
authorBrian McFarland <mcfarlandjb@gmail.com>
Thu, 12 Mar 2015 15:52:49 +0000 (11:52 -0400)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:35:12 +0000 (14:35 +0200)
commit92c1c15d4ccd72e1d42f8890a5dafbc6ad1eadc0
tree24c02363922009b7ea3e5df2476883cd62348c3e
parent65394062f2507c97b08ca5ba7c3e8817ea460024
Patch to mkenvimage to handle text files with length that exceed env size

The current head revision of mkenvimage
(e72be8947e129f5ab274c0a9f235d2cc0014b2ea) will prevent you from creating
an env image from a text file that is larger than the env length specified
by the '-s' option.  That doesn't make sense given that the tool now allows
comments and blank lines.  This patch removes that limitation and allows
longer text files to be used.

I don't have time / desire at the moment to figure out "patman" and could
really care less if this is adopted up stream.  Just figured I would share
in case anybody else finds it useful enough to take time to do a proper
patch.

>From 39ff30190c2bf687861f4b4b33230f1944fb64f9 Mon Sep 17 00:00:00 2001
From: Brian McFarland <bmcfarland@rldrake.com>
Date: Thu, 12 Mar 2015 11:37:19 -0400
Subject: [PATCH] In mkenvimage, removed the check that prevented using a
 source text file larger than the output environment image.  Instead, the main
 parsing loop checks to see if the environment buffer is full, and quits if it
 is.  After the main parse loop, a second loop swallows comments and
 whitespace until either the EOF is reached or more env vars are found, in
 which case an error will be thrown.
tools/mkenvimage.c