Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2024 18:35:14 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 31ac8806885f - main - iscsictl: Add version information to libxo output
Message-ID:  <202409061835.486IZEEB010842@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=31ac8806885f22d6b3a3948a8f660ba0cf24e9cf

commit 31ac8806885f22d6b3a3948a8f660ba0cf24e9cf
Author:     Bram <bram@cbbg.nl>
AuthorDate: 2024-07-26 19:35:06 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-09-06 18:34:30 +0000

    iscsictl: Add version information to libxo output
    
    Add version information to libxo output so that
    libxo content consumers can track changes.
    
    Reviewed by: imp, markj
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1350
---
 usr.bin/iscsictl/iscsictl.c | 1 +
 usr.bin/iscsictl/iscsictl.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/usr.bin/iscsictl/iscsictl.c b/usr.bin/iscsictl/iscsictl.c
index d95cb9a1c096..b75ff889a9a6 100644
--- a/usr.bin/iscsictl/iscsictl.c
+++ b/usr.bin/iscsictl/iscsictl.c
@@ -746,6 +746,7 @@ main(int argc, char **argv)
         if (argc < 0)
                 exit(1);
 
+	xo_set_version(ISCSICTL_XO_VERSION);
 	xo_open_container("iscsictl");
 
 	while ((ch = getopt(argc, argv, "AMRLac:d:e:i:n:p:rt:u:s:vw:")) != -1) {
diff --git a/usr.bin/iscsictl/iscsictl.h b/usr.bin/iscsictl/iscsictl.h
index 2ac17890bb57..3bc69e4877a9 100644
--- a/usr.bin/iscsictl/iscsictl.h
+++ b/usr.bin/iscsictl/iscsictl.h
@@ -38,6 +38,8 @@
 #define	DEFAULT_CONFIG_PATH		"/etc/iscsi.conf"
 #define	DEFAULT_IQN			"iqn.1994-09.org.freebsd:"
 
+#define	ISCSICTL_XO_VERSION		"1"
+
 #define	MAX_NAME_LEN			223
 
 #define	AUTH_METHOD_UNSPECIFIED		0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409061835.486IZEEB010842>