]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools: ynl: default to --process-unknown in installed mode
authorJakub Kicinski <kuba@kernel.org>
Thu, 10 Jul 2025 17:51:15 +0000 (10:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Jul 2025 22:00:37 +0000 (23:00 +0100)
We default to raising an exception when unknown attrs are found
to make sure those are noticed during development.
When YNL CLI is "installed" and used by sysadmins erroring out
is not going to be helpful. It's far more likely the user space
is older than the kernel in that case, than that some attr is
misdefined or missing.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/net/ynl/pyynl/cli.py

index 33ccc5c1843b402ec6e24e3fbdfc0c80fff62c99..8c192e900bd3e2e5fd4a0fbe2b2e995c10a4409b 100755 (executable)
@@ -113,6 +113,8 @@ def main():
         spec = f"{spec_dir()}/{args.family}.yaml"
         if args.schema is None and spec.startswith(sys_schema_dir):
             args.schema = '' # disable schema validation when installed
+        if args.process_unknown is None:
+            args.process_unknown = True
     else:
         spec = args.spec
     if not os.path.isfile(spec):