diff mbox series

parser: allow to skip partitioning

Message ID 20240625094755.191834-1-stefano.babic@swupdate.org
State Accepted
Headers show
Series parser: allow to skip partitioning | expand

Commit Message

Stefano Babic June 25, 2024, 9:47 a.m. UTC
Add the same feature off images, files and script. It can be decided
with an embedded script if partitioning must occur.

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
---
 parser/parser.c | 4 ++++
 1 file changed, 4 insertions(+)

--
2.34.1
diff mbox series

Patch

diff --git a/parser/parser.c b/parser/parser.c
index c18fe52a..3f96ee3f 100644
--- a/parser/parser.c
+++ b/parser/parser.c
@@ -531,6 +531,10 @@  static int _parse_partitions(parsertype p, void *cfg, void *setting, const char
 			free_image(partition);
 			return -1;
 		}
+		if (skip || partition->skip != SKIP_NONE) {
+			free_image(partition);
+			continue;
+		}
 		TRACE("Partition: %s new size %lld bytes",
 			!strcmp(partition->type, "ubipartition") ? partition->volname : partition->device,
 			partition->partsize);