summaryrefslogtreecommitdiff
path: root/tools/verification/dot2/dot2c.py
diff options
context:
space:
mode:
authorGabriele Monaco <gmonaco@redhat.com>2024-12-27 17:47:48 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2024-12-27 22:19:34 +0300
commit64b3e5f0d45329bc593e13b64dcdcf836da006cd (patch)
tree3de09f0e514d67d5c4967538d7ea38b7eba58456 /tools/verification/dot2/dot2c.py
parent91f3407e13b89b7391ebc5b6143fd22edd901041 (diff)
downloadlinux-64b3e5f0d45329bc593e13b64dcdcf836da006cd.tar.xz
verification/dot2k: Add support for name and description options
The dot2k command includes options to set a model name with -n and a description with -D, however those are not used in practice. This patch allows to specify a custom model name (by default the name of the dot file without extension) and a description which overrides the one in the C file. Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20241227144752.362911-5-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/verification/dot2/dot2c.py')
-rw-r--r--tools/verification/dot2/dot2c.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/verification/dot2/dot2c.py b/tools/verification/dot2/dot2c.py
index 87d8a1e1470c..fa2816ac7b61 100644
--- a/tools/verification/dot2/dot2c.py
+++ b/tools/verification/dot2/dot2c.py
@@ -22,8 +22,8 @@ class Dot2c(Automata):
struct_automaton_def = "automaton"
var_automaton_def = "aut"
- def __init__(self, file_path):
- super().__init__(file_path)
+ def __init__(self, file_path, model_name=None):
+ super().__init__(file_path, model_name)
self.line_length = 100
def __buff_to_string(self, buff):