From 61ce5f283e5ff09d4e6622614f1e44eafeaccc40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Wed, 5 Aug 2026 12:15:47 +0200 Subject: [PATCH] fix warning message for YANG module revision ordering The [standard](https://datatracker.ietf.org/doc/html/rfc7950#section-7.1.9) says that: > [...] a new [revision] SHOULD be added in front of the revisions > sequence so that all revisions are in reverse chronological order The actual error message was misleading, saying that an older revision was found after a new revision. That is actually a correct order. The check was correct, but the error message should have said that the older revision was found *before* a newer one. We actually "fixed" our YANG models based on this diagnostic message, only to revert that later on. --- src/tree_schema_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tree_schema_common.c b/src/tree_schema_common.c index b98bfa6fd..2f5207c8c 100644 --- a/src/tree_schema_common.c +++ b/src/tree_schema_common.c @@ -91,7 +91,7 @@ lysp_last_revision(const struct lysp_module *pmod, const struct lysp_revision *r cmp = strcmp(revs[u].date, revs[u + 1].date); if (cmp < 0) { if (ctx) { - LOGWRN(ctx, "Older revision %s found after a newer revision %s in %s \"%s\".", revs[u].date, + LOGWRN(ctx, "Older revision %s found before a newer revision %s in %s \"%s\".", revs[u].date, revs[u + 1].date, mod_str, name); }