public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 liblvm/.exported_symbols liblvm/lvm.h lib ...
@ 2009-07-28 9:16 wysochanski
0 siblings, 0 replies; 5+ messages in thread
From: wysochanski @ 2009-07-28 9:16 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-07-28 09:16:18
Modified files:
liblvm : .exported_symbols lvm.h lvm_base.c
test/api : test.c vgtest.c
Log message:
Rename lvm_create to lvm_init and lvm_destroy to lvm_quit.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/.exported_symbols.diff?cvsroot=lvm2&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm.h.diff?cvsroot=lvm2&r1=1.34&r2=1.35
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_base.c.diff?cvsroot=lvm2&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/test.c.diff?cvsroot=lvm2&r1=1.18&r2=1.19
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/vgtest.c.diff?cvsroot=lvm2&r1=1.6&r2=1.7
--- LVM2/liblvm/.exported_symbols 2009/07/27 21:02:17 1.19
+++ LVM2/liblvm/.exported_symbols 2009/07/28 09:16:18 1.20
@@ -1,5 +1,5 @@
-lvm_create
-lvm_destroy
+lvm_init
+lvm_quit
lvm_config_reload
lvm_config_override
lvm_pv_get_name
--- LVM2/liblvm/lvm.h 2009/07/28 00:36:58 1.34
+++ LVM2/liblvm/lvm.h 2009/07/28 09:16:18 1.35
@@ -119,7 +119,7 @@
/**
* Create a LVM handle.
*
- * Once all LVM operations have been completed, use lvm_destroy to release
+ * Once all LVM operations have been completed, use lvm_quit to release
* the handle and any associated resources.
*
* \param system_dir
@@ -132,11 +132,11 @@
*/
// FIXME: Sort out this alignment. "Set an" directly below "system_dir"
// looks awful. Indent differently? More blank lines?
-lvm_t lvm_create(const char *system_dir);
+lvm_t lvm_init(const char *system_dir);
// FIXME Find a better name. lvm_init.
/**
- * Destroy a LVM handle allocated with lvm_create.
+ * Destroy a LVM handle allocated with lvm_init.
*
* This function should be used after all LVM operations are complete or after
* an unrecoverable error. Destroying the LVM handle frees the memory and
@@ -144,9 +144,9 @@
* cannot be used subsequently.
*
* \param libh
- * Handle obtained from lvm_create.
+ * Handle obtained from lvm_init.
*/
-void lvm_destroy(lvm_t libh);
+void lvm_quit(lvm_t libh);
/**
* Reload the original configuration from the system directory.
@@ -156,7 +156,7 @@
* the application.
*
* \param libh
- * Handle obtained from lvm_create.
+ * Handle obtained from lvm_init.
* \return 0 (success) or -1 (failure).
*/
int lvm_config_reload(lvm_t libh);
@@ -170,7 +170,7 @@
* you should use lvm_config_reload to apply the new settings.
*
* \param libh
- * Handle obtained from lvm_create.
+ * Handle obtained from lvm_init.
* \param config_string
* LVM configuration string to apply. See the lvm.conf file man page
* for the format of the config string.
@@ -190,7 +190,7 @@
* returns a value.
*
* \param libh
- * Handle obtained from lvm_create.
+ * Handle obtained from lvm_init.
*
* \return An errno value describing the last LVM error.
*/
@@ -203,7 +203,7 @@
* specific error information for a function that is known to have failed.
*
* \param libh
- * Handle obtained from lvm_create.
+ * Handle obtained from lvm_init.
*
* \return An error string describing the last LVM error.
*/
@@ -223,7 +223,7 @@
* Return the list of volume group names.
*
* The memory allocated for the list is tied to the lvm_t handle and will be
- * released when lvm_destroy is called.
+ * released when lvm_quit is called.
*
* NOTE: This function normally does not scan devices in the system for LVM
* metadata. To scan the system, use lvm_scan.
@@ -256,7 +256,7 @@
* Return the list of volume group uuids.
*
* The memory allocated for the list is tied to the lvm_t handle and will be
- * released when lvm_destroy is called.
+ * released when lvm_quit is called.
*
* NOTE: This function normally does not scan devices in the system for LVM
* metadata. To scan the system, use lvm_scan.
@@ -264,7 +264,7 @@
* begin with a "#" and should be filtered out and not used.
*
* \param libh
- * Handle obtained from lvm_create.
+ * Handle obtained from lvm_init.
*
* \return A list with entries of type struct lvm_str_list, containing the
* VG UUID strings of the Volume Groups known to the system.
@@ -280,7 +280,7 @@
* Open a VG for reading or writing.
*
* \param libh
- * Handle obtained from lvm_create.
+ * Handle obtained from lvm_init.
* \param vgname
* Name of the VG to open.
* \param mode
@@ -306,7 +306,7 @@
* release the VG handle.
*
* \param libh
- * Handle obtained from lvm_create.
+ * Handle obtained from lvm_init.
* \param vg_name
* Name of the VG to open.
* \return non-NULL vg handle (success) or NULL (failure)
--- LVM2/liblvm/lvm_base.c 2009/07/27 21:02:35 1.8
+++ LVM2/liblvm/lvm_base.c 2009/07/28 09:16:18 1.9
@@ -17,7 +17,7 @@
#include "toolcontext.h"
#include "locking.h"
-lvm_t lvm_create(const char *system_dir)
+lvm_t lvm_init(const char *system_dir)
{
struct cmd_context *cmd;
@@ -46,7 +46,7 @@
if (!init_locking(-1, cmd)) {
/* FIXME: use EAGAIN as error code here */
log_error("Locking initialisation failed.");
- lvm_destroy((lvm_t) cmd);
+ lvm_quit((lvm_t) cmd);
return NULL;
}
/*
@@ -59,7 +59,7 @@
return (lvm_t) cmd;
}
-void lvm_destroy(lvm_t libh)
+void lvm_quit(lvm_t libh)
{
destroy_toolcontext((struct cmd_context *)libh);
}
--- LVM2/test/api/test.c 2009/07/27 21:02:51 1.18
+++ LVM2/test/api/test.c 2009/07/28 09:16:18 1.19
@@ -601,7 +601,7 @@
{
lvm_t libh;
- libh = lvm_create(NULL);
+ libh = lvm_init(NULL);
if (!libh) {
printf("Unable to open lvm library instance\n");
return 1;
@@ -609,7 +609,7 @@
lvmapi_test_shell(libh);
- lvm_destroy(libh);
+ lvm_quit(libh);
return 0;
}
--- LVM2/test/api/vgtest.c 2009/07/27 17:44:58 1.6
+++ LVM2/test/api/vgtest.c 2009/07/28 09:16:18 1.7
@@ -90,9 +90,9 @@
/* FIXME: input vgname, etc from cmdline */
/* FIXME: make the below messages verbose-only and print PASS/FAIL*/
printf("Opening LVM\n");
- handle = lvm_create(NULL);
+ handle = lvm_init(NULL);
if (!handle) {
- fprintf(stderr, "Unable to lvm_create\n");
+ fprintf(stderr, "Unable to lvm_init\n");
goto bad;
}
@@ -129,7 +129,7 @@
vg_remove(vg);
vg_close(vg);
- lvm_destroy(handle);
+ lvm_quit(handle);
printf("liblvm vgcreate unit test PASS\n");
_exit(0);
bad:
@@ -139,6 +139,6 @@
if (vg)
lvm_vg_close(vg);
if (handle)
- lvm_destroy(handle);
+ lvm_quit(handle);
_exit(-1);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2 liblvm/.exported_symbols liblvm/lvm.h lib ...
@ 2009-07-28 11:03 wysochanski
0 siblings, 0 replies; 5+ messages in thread
From: wysochanski @ 2009-07-28 11:03 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
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);
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2 liblvm/.exported_symbols liblvm/lvm.h lib ...
@ 2009-07-26 16:44 wysochanski
0 siblings, 0 replies; 5+ messages in thread
From: wysochanski @ 2009-07-26 16:44 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-07-26 16:44:05
Modified files:
liblvm : .exported_symbols lvm.h lvm_vg.c
test/api : test.c
Log message:
Rename lvm_scan_vgs to lvm_scan.
Author: Dave Wysochanski <dwysocha@redhat.com>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/.exported_symbols.diff?cvsroot=lvm2&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm.h.diff?cvsroot=lvm2&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_vg.c.diff?cvsroot=lvm2&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/test.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13
--- LVM2/liblvm/.exported_symbols 2009/07/26 16:06:46 1.14
+++ LVM2/liblvm/.exported_symbols 2009/07/26 16:44:05 1.15
@@ -22,7 +22,7 @@
lvm_vg_open
lvm_vg_close
lvm_vg_remove
-lvm_scan_vgs
+lvm_scan
lvm_errno
lvm_errmsg
lvm_vg_list_pvs
--- LVM2/liblvm/lvm.h 2009/07/26 16:35:57 1.21
+++ LVM2/liblvm/lvm.h 2009/07/26 16:44:05 1.22
@@ -176,7 +176,7 @@
*
* \return Status code of 1 (success) or 0 (failure).
*/
-int lvm_scan_vgs(lvm_t libh);
+int lvm_scan(lvm_t libh);
/*************************** volume group handling **************************/
@@ -184,7 +184,7 @@
* Return the list of volume group names.
*
* NOTE: This function will _NOT_ scan devices in the system for LVM metadata.
- * To scan the system, use lvm_scan_vgs.
+ * To scan the system, use lvm_scan.
*
* To process the list, use the dm_list iterator functions. For example:
* vg_t *vg;
@@ -211,7 +211,7 @@
* Return the list of volume group uuids.
*
* NOTE: This function will _NOT_ scan devices in the system for LVM metadata.
- * To scan the system, use lvm_scan_vgs.
+ * To scan the system, use lvm_scan.
*
* \param libh
* Handle obtained from lvm_create.
--- LVM2/liblvm/lvm_vg.c 2009/07/26 16:06:46 1.14
+++ LVM2/liblvm/lvm_vg.c 2009/07/26 16:44:05 1.15
@@ -252,7 +252,7 @@
return get_vgids((struct cmd_context *)libh, 0);
}
-int lvm_scan_vgs(lvm_t libh)
+int lvm_scan(lvm_t libh)
{
return lvmcache_label_scan((struct cmd_context *)libh, 2);
}
--- LVM2/test/api/test.c 2009/07/26 16:06:46 1.12
+++ LVM2/test/api/test.c 2009/07/26 16:44:05 1.13
@@ -264,7 +264,7 @@
static void _scan_vgs(lvm_t libh)
{
- lvm_scan_vgs(libh);
+ lvm_scan(libh);
}
static void _list_vg_names(lvm_t libh)
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2 liblvm/.exported_symbols liblvm/lvm.h lib ...
@ 2009-07-26 16:06 wysochanski
0 siblings, 0 replies; 5+ messages in thread
From: wysochanski @ 2009-07-26 16:06 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-07-26 16:06:21
Modified files:
liblvm : .exported_symbols lvm.h lvm_vg.c
test/api : test.c
Log message:
Rename lvm_list_vg_ids to lvm_list_vg_uuids.
Author: Dave Wysochanski <dwysocha@redhat.com>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/.exported_symbols.diff?cvsroot=lvm2&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm.h.diff?cvsroot=lvm2&r1=1.17&r2=1.18
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_vg.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/test.c.diff?cvsroot=lvm2&r1=1.10&r2=1.11
--- LVM2/liblvm/.exported_symbols 2009/07/26 16:05:49 1.12
+++ LVM2/liblvm/.exported_symbols 2009/07/26 16:06:21 1.13
@@ -28,6 +28,6 @@
lvm_vg_list_pvs
lvm_vg_list_lvs
lvm_list_vg_names
-lvm_list_vg_ids
+lvm_list_vg_uuids
lvm_vg_create_lv_linear
lvm_vg_remove_lv
--- LVM2/liblvm/lvm.h 2009/07/26 16:05:49 1.17
+++ LVM2/liblvm/lvm.h 2009/07/26 16:06:21 1.18
@@ -336,7 +336,7 @@
* FIXME: handle list memory cleanup
*/
struct dm_list *lvm_list_vg_names(lvm_t libh);
-struct dm_list *lvm_list_vg_ids(lvm_t libh);
+struct dm_list *lvm_list_vg_uuids(lvm_t libh);
/**
* Scan all devices on the system for VGs and LVM metadata.
--- LVM2/liblvm/lvm_vg.c 2009/07/26 16:05:49 1.12
+++ LVM2/liblvm/lvm_vg.c 2009/07/26 16:06:21 1.13
@@ -247,7 +247,7 @@
return get_vgnames((struct cmd_context *)libh, 0);
}
-struct dm_list *lvm_list_vg_ids(lvm_t libh)
+struct dm_list *lvm_list_vg_uuids(lvm_t libh)
{
return get_vgids((struct cmd_context *)libh, 0);
}
--- LVM2/test/api/test.c 2009/07/26 14:37:15 1.10
+++ LVM2/test/api/test.c 2009/07/26 16:06:21 1.11
@@ -287,7 +287,7 @@
struct lvm_str_list *strl;
const char *tmp;
- list = lvm_list_vg_ids(libh);
+ list = lvm_list_vg_uuids(libh);
printf("VG uuids:\n");
dm_list_iterate_items(strl, list) {
tmp = strl->str;
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2 liblvm/.exported_symbols liblvm/lvm.h lib ...
@ 2009-07-26 16:06 wysochanski
0 siblings, 0 replies; 5+ messages in thread
From: wysochanski @ 2009-07-26 16:06 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-07-26 16:06:46
Modified files:
liblvm : .exported_symbols lvm.h lvm_vg.c
test/api : test.c
Log message:
Rename lvm_vg_get_free to lvm_vg_get_free_size.
Author: Dave Wysochanski <dwysocha@redhat.com>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/.exported_symbols.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm.h.diff?cvsroot=lvm2&r1=1.18&r2=1.19
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_vg.c.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/test.c.diff?cvsroot=lvm2&r1=1.11&r2=1.12
--- LVM2/liblvm/.exported_symbols 2009/07/26 16:06:21 1.13
+++ LVM2/liblvm/.exported_symbols 2009/07/26 16:06:46 1.14
@@ -7,7 +7,7 @@
lvm_vg_get_name
lvm_vg_get_uuid
lvm_vg_get_size
-lvm_vg_get_free
+lvm_vg_get_free_size
lvm_vg_get_extent_size
lvm_vg_get_extent_count
lvm_vg_get_free_extent_count
--- LVM2/liblvm/lvm.h 2009/07/26 16:06:21 1.18
+++ LVM2/liblvm/lvm.h 2009/07/26 16:06:46 1.19
@@ -261,7 +261,7 @@
*/
uint64_t lvm_pv_get_mda_count(const pv_t *pv);
uint64_t lvm_vg_get_size(const vg_t *vg);
-uint64_t lvm_vg_get_free(const vg_t *vg);
+uint64_t lvm_vg_get_free_size(const vg_t *vg);
uint64_t lvm_vg_get_extent_size(const vg_t *vg);
uint64_t lvm_vg_get_extent_count(const vg_t *vg);
uint64_t lvm_vg_get_free_extent_count(const vg_t *vg);
--- LVM2/liblvm/lvm_vg.c 2009/07/26 16:06:21 1.13
+++ LVM2/liblvm/lvm_vg.c 2009/07/26 16:06:46 1.14
@@ -196,7 +196,7 @@
return vg_size(vg);
}
-uint64_t lvm_vg_get_free(const vg_t *vg)
+uint64_t lvm_vg_get_free_size(const vg_t *vg)
{
return vg_free(vg);
}
--- LVM2/test/api/test.c 2009/07/26 16:06:21 1.11
+++ LVM2/test/api/test.c 2009/07/26 16:06:46 1.12
@@ -232,7 +232,7 @@
{
printf("%s (%s): size=%"PRIu64", free=%"PRIu64", #pv=%"PRIu64"\n",
lvm_vg_get_name(vg), lvm_vg_get_uuid(vg),
- lvm_vg_get_size(vg), lvm_vg_get_free(vg),
+ lvm_vg_get_size(vg), lvm_vg_get_free_size(vg),
lvm_vg_get_pv_count(vg));
}
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-28 11:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-28 9:16 LVM2 liblvm/.exported_symbols liblvm/lvm.h lib wysochanski
-- strict thread matches above, loose matches on Subject: below --
2009-07-28 11:03 wysochanski
2009-07-26 16:44 wysochanski
2009-07-26 16:06 wysochanski
2009-07-26 16:06 wysochanski
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).