[PATCH 1/6] Emit /plugin/ when compiling to .dts with DTSF_PLUGIN set

Uwe Kleine-König <[email protected]>
Newsgroups org.kernel.vger.devicetree-compiler
Message-ID <3dff5b0db7c17aa388010222d36946fe9177f69b.1755692822.git.u.kleine-koenig@baylibre.com>
This fixes `dtc -I dts -O dts` to make the file a plugin if the source
file is one.

Signed-off-by: Uwe Kleine-König <[email protected]>
---
 treesource.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/treesource.c b/treesource.c
index d25f01fc6937..72d1cb5508b5 100644
--- a/treesource.c
+++ b/treesource.c
@@ -369,7 +369,10 @@ void dt_to_source(FILE *f, struct dt_info *dti)
 {
 	struct reserve_info *re;
 
-	fprintf(f, "/dts-v1/;\n\n");
+	fprintf(f, "/dts-v1/;\n");
+	if (dti->dtsflags & DTSF_PLUGIN)
+		fprintf(f, "/plugin/;\n");
+	fprintf(f, "\n");
 
 	for (re = dti->reservelist; re; re = re->next) {
 		struct label *l;
-- 
2.50.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.