[RFC,01/13] external/ffspart: Allow # comments in input file

Message ID 20170829062506.8317-2-cyril.bur@au1.ibm.com
State New
Headers show
Series
  • Rework flash TOC generation
Related show

Commit Message

Cyril Bur Aug. 29, 2017, 6:24 a.m.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
---
 external/ffspart/ffspart.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/external/ffspart/ffspart.c b/external/ffspart/ffspart.c
index 77034775..73c02c40 100644
--- a/external/ffspart/ffspart.c
+++ b/external/ffspart/ffspart.c
@@ -224,6 +224,10 @@  int main(int argc, char *argv[])
 		int side = -1;
 		uint32_t pbase, psize, pactual = 0;
 
+		/* Inline comments in input file */
+		if (line[0] == '#')
+			continue;
+
 		if (line[strlen(line) - 1] == '\n')
 			line[strlen(line) - 1] = '\0';