summaryrefslogtreecommitdiffstats
path: root/plugin.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-26 05:11:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-26 05:18:07 +0000
commit2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891 (patch)
tree82f2949088d2502e947b83ba9973de54f9bf4402 /plugin.c
parentReleasing debian version 2.0-1. (diff)
downloadnvme-cli-2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891.tar.xz
nvme-cli-2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891.zip
Merging upstream version 2.1~rc0 (Closes: #1015722).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugin.c')
-rw-r--r--plugin.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/plugin.c b/plugin.c
index fd8f67d..c05bb72 100644
--- a/plugin.c
+++ b/plugin.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -6,14 +7,22 @@
#include "plugin.h"
#include "util/argconfig.h"
+#include <libnvme.h>
+
static int version(struct plugin *plugin)
{
struct program *prog = plugin->parent;
- if (plugin->name)
- printf("%s %s version %s\n", prog->name, plugin->name, plugin->version);
- else
- printf("%s version %s\n", prog->name, prog->version);
+ if (plugin->name) {
+ printf("%s %s version %s (git %s)\n",
+ prog->name, plugin->name, plugin->version, GIT_VERSION);
+ } else {
+ printf("%s version %s (git %s)\n",
+ prog->name, prog->version, GIT_VERSION);
+ }
+ printf("libnvme version %s (git %s)\n",
+ nvme_get_version(NVME_VERSION_PROJECT),
+ nvme_get_version(NVME_VERSION_GIT));
return 0;
}