summaryrefslogtreecommitdiff
path: root/lib/command.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-01-22 08:15:42 -0500
committerDonald Sharp <sharpd@nvidia.com>2022-02-04 10:29:38 -0500
commit46b48b330269c82afb19eaa224df701cc5d221f9 (patch)
treed5e0e8748e7ca90196b56d433a9c5277c5e3d9a5 /lib/command.h
parentcd44428d6230880b0f1c1a34886144889ca4ba79 (diff)
lib: Add more information to `show version`
Add to lib/command.c the ability to remember the release/version/system information and to allow `show version` to dump some of it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/command.h b/lib/command.h
index c888356d61..a540bdc5c5 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -55,6 +55,13 @@ struct host {
/* Domainname of this router */
char *domainname;
+ /*
+ * Some extra system data that is useful
+ */
+ char *system;
+ char *release;
+ char *version;
+
/* Password for vty interface. */
char *password;
char *password_encrypt;
@@ -600,6 +607,9 @@ extern int cmd_domainname_set(const char *domainname);
extern int cmd_hostname_set(const char *hostname);
extern const char *cmd_hostname_get(void);
extern const char *cmd_domainname_get(void);
+extern const char *cmd_system_get(void);
+extern const char *cmd_release_get(void);
+extern const char *cmd_version_get(void);
/* NOT safe for general use; call this only if DEV_BUILD! */
extern void grammar_sandbox_init(void);