public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: wysochanski@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 liblvm/.exported_symbols liblvm/lvm.h lib ...
Date: Tue, 28 Jul 2009 11:03:00 -0000	[thread overview]
Message-ID: <20090728110330.10010.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2009-07-28 11:03:29

Modified files:
	liblvm         : .exported_symbols lvm.h lvm_base.c 
	test/api       : test.c vgtest.c 

Log message:
	Add lvm_library_get_version() and update unit tests to display version.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/.exported_symbols.diff?cvsroot=lvm2&r1=1.20&r2=1.21
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm.h.diff?cvsroot=lvm2&r1=1.36&r2=1.37
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_base.c.diff?cvsroot=lvm2&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/test.c.diff?cvsroot=lvm2&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/vgtest.c.diff?cvsroot=lvm2&r1=1.7&r2=1.8

--- LVM2/liblvm/.exported_symbols	2009/07/28 09:16:18	1.20
+++ LVM2/liblvm/.exported_symbols	2009/07/28 11:03:28	1.21
@@ -1,3 +1,4 @@
+lvm_library_get_version
 lvm_init
 lvm_quit
 lvm_config_reload
--- LVM2/liblvm/lvm.h	2009/07/28 09:56:48	1.36
+++ LVM2/liblvm/lvm.h	2009/07/28 11:03:28	1.37
@@ -28,6 +28,20 @@
  */
 /******************************** WARNING ********************************/
 
+/**
+ * Retrieve the library version.
+ *
+ * The library version is the same format as the full LVM version.
+ * The format is as follows:
+ *    LVM_MAJOR.LVM_MINOR.LVM_PATCHLEVEL(LVM_LIBAPI)[-LVM_RELEASE]
+ * An application wishing to determine compatibility with a particular version
+ * of the library should check at least the LVM_MAJOR, LVM_MINOR, and
+ * LVM_LIBAPI numbers.  For example, assume the full LVM version is
+ * 2.02.50(1)-1.  The application should verify the "2.02" and the "(1)".
+ *
+ * \return  A string describing the library version.
+ */
+const char *lvm_library_get_version(void);
 
 /******************************** structures ********************************/
 
--- LVM2/liblvm/lvm_base.c	2009/07/28 09:16:18	1.9
+++ LVM2/liblvm/lvm_base.c	2009/07/28 11:03:28	1.10
@@ -17,6 +17,11 @@
 #include "toolcontext.h"
 #include "locking.h"
 
+const char *lvm_library_get_version(void)
+{
+	return LVM_VERSION;
+}
+
 lvm_t lvm_init(const char *system_dir)
 {
 	struct cmd_context *cmd;
--- LVM2/test/api/test.c	2009/07/28 09:16:18	1.19
+++ LVM2/test/api/test.c	2009/07/28 11:03:29	1.20
@@ -607,6 +607,7 @@
 		return 1;
 	}
 
+	printf("Library version: %s\n", lvm_library_get_version());
 	lvmapi_test_shell(libh);
 
 	lvm_quit(libh);
--- LVM2/test/api/vgtest.c	2009/07/28 09:16:18	1.7
+++ LVM2/test/api/vgtest.c	2009/07/28 11:03:29	1.8
@@ -96,6 +96,7 @@
 		goto bad;
 	}
 
+	printf("Library version: %s\n", lvm_library_get_version());
 	vg_create(vg_name);
 	vg_extend(vg, device);
 


             reply	other threads:[~2009-07-28 11:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 11:03 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-28  9:16 wysochanski
2009-07-26 16:44 wysochanski
2009-07-26 16:06 wysochanski
2009-07-26 16:06 wysochanski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090728110330.10010.qmail@sourceware.org \
    --to=wysochanski@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).