public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/liblvm lvm_base.c
@ 2009-07-27 21:02 wysochanski
0 siblings, 0 replies; 4+ messages in thread
From: wysochanski @ 2009-07-27 21:02 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-07-27 21:02:35
Modified files:
liblvm : lvm_base.c
Log message:
Update return code for lvm_config_reload.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_base.c.diff?cvsroot=lvm2&r1=1.7&r2=1.8
--- LVM2/liblvm/lvm_base.c 2009/07/27 21:02:17 1.7
+++ LVM2/liblvm/lvm_base.c 2009/07/27 21:02:35 1.8
@@ -67,7 +67,7 @@
int lvm_config_reload(lvm_t libh)
{
/* FIXME: re-init locking needed here? */
- if (refresh_toolcontext((struct cmd_context *)libh))
+ if (!refresh_toolcontext((struct cmd_context *)libh))
return -1;
return 0;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2/liblvm lvm_base.c
@ 2010-05-19 12:12 wysochanski
0 siblings, 0 replies; 4+ messages in thread
From: wysochanski @ 2010-05-19 12:12 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2010-05-19 12:12:48
Modified files:
liblvm : lvm_base.c
Log message:
Fix warnings with conversion of uuid.
More cleanup of uuid casting / structures is needed but for now just
cast like the rest of the code.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_base.c.diff?cvsroot=lvm2&r1=1.17&r2=1.18
--- LVM2/liblvm/lvm_base.c 2010/05/19 11:53:12 1.17
+++ LVM2/liblvm/lvm_base.c 2010/05/19 12:12:47 1.18
@@ -103,13 +103,13 @@
const char *lvm_vgname_from_pvid(lvm_t libh, const char *pvid)
{
struct cmd_context *cmd = (struct cmd_context *)libh;
- char uuid[64] __attribute((aligned(8)));
+ struct id id;
- if (!id_read_format(uuid, pvid)) {
+ if (!id_read_format(&id, pvid)) {
log_error(INTERNAL_ERROR "Unable to convert uuid");
return NULL;
}
- return find_vgname_from_pvid(cmd, uuid);
+ return find_vgname_from_pvid(cmd, (char *)id.uuid);
}
const char *lvm_vgname_from_device(lvm_t libh, const char *device)
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2/liblvm lvm_base.c
@ 2009-07-14 3:01 wysochanski
0 siblings, 0 replies; 4+ messages in thread
From: wysochanski @ 2009-07-14 3:01 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-07-14 03:01:18
Modified files:
liblvm : lvm_base.c
Log message:
Add default cmd->cmd_line initialization for liblvm lvm_create().
This needs initialized to non-NULL before using the archive() call.
Normally this is set to the cmdline string when lvm is called from a tool.
We could think about using it in another way, as a potential audit trail
of liblvm calls, or just leave it set to the default "liblvm", similar to
what clvmd does. For now, just set it to "liblvm".
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_base.c.diff?cvsroot=lvm2&r1=1.2&r2=1.3
--- LVM2/liblvm/lvm_base.c 2009/03/10 15:38:46 1.2
+++ LVM2/liblvm/lvm_base.c 2009/07/14 03:01:18 1.3
@@ -45,6 +45,12 @@
lvm_destroy((lvm_t) cmd);
return NULL;
}
+ /*
+ * FIXME: Use cmd->cmd_line as audit trail for liblvm calls. Used in
+ * archive() call. Possible example:
+ * cmd_line = "lvm_vg_create: vg1\nlvm_vg_extend vg1 /dev/sda1\n"
+ */
+ cmd->cmd_line = (char *)"liblvm";
return (lvm_t) cmd;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2/liblvm lvm_base.c
@ 2009-03-10 15:38 wysochanski
0 siblings, 0 replies; 4+ messages in thread
From: wysochanski @ 2009-03-10 15:38 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-03-10 15:38:47
Modified files:
liblvm : lvm_base.c
Log message:
Remove unnecessary includes in lvm_base.c.
We would like to declare our handles pv_t, vg_t, and lv_t in
the external library header lvm.h. However, these are already
defined in metadata-exported.h for the use of some of the
in-progress liblvm APIs. Thus, we cannot both define
them in lvm.h and include metadata-exported.h in the external
library C files. We could use preprocessor tricks (#ifndef)
but for now we just avoid the include.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_base.c.diff?cvsroot=lvm2&r1=1.1&r2=1.2
--- LVM2/liblvm/lvm_base.c 2009/03/06 16:19:53 1.1
+++ LVM2/liblvm/lvm_base.c 2009/03/10 15:38:46 1.2
@@ -16,8 +16,6 @@
#include "lvm.h"
#include "toolcontext.h"
#include "locking.h"
-#include "metadata-exported.h"
-#include "report.h"
lvm_t lvm_create(const char *system_dir)
{
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-19 12:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-27 21:02 LVM2/liblvm lvm_base.c wysochanski
-- strict thread matches above, loose matches on Subject: below --
2010-05-19 12:12 wysochanski
2009-07-14 3:01 wysochanski
2009-03-10 15:38 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).