Patchwork [U-Boot,PATCHv2,7/8] mkenvimage: Don't try to detect comments in the input file

login
register
mail settings
Submitter David Wagner
Date Jan. 5, 2012, 6:44 p.m.
Message ID <1325789099-9260-7-git-send-email-david.wagner@free-electrons.com>
Download mbox | patch
Permalink /patch/134531/
State Superseded
Headers show

Comments

David Wagner - Jan. 5, 2012, 6:44 p.m.
Remove this feature since it seems impossible to reliably detect them.

Signed-off-by: David Wagner <david.wagner@free-electrons.com>
---
 tools/mkenvimage.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

Patch

diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index 58f1d0b..a3d4e27 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -249,14 +249,6 @@  int main(int argc, char **argv)
 				/* End of a variable */
 				envptr[ep++] = '\0';
 			}
-		} else if (filebuf[fp] == '#') {
-			if (fp != 0 && filebuf[fp-1] == '\n') {
-				/* This line is a comment, let's skip it */
-				while (fp < txt_file_stat.st_size && fp++ &&
-				       filebuf[fp] != '\n');
-			} else {
-				envptr[ep++] = filebuf[fp];
-			}
 		} else {
 			envptr[ep++] = filebuf[fp];
 		}