diff options
author | Dave Wysochanski <dwysocha@redhat.com> | 2009-07-14 03:01:18 +0000 |
---|---|---|
committer | Dave Wysochanski <dwysocha@redhat.com> | 2009-07-14 03:01:18 +0000 |
commit | 9c5a7b048166a8fc2e2350ac728d32bae387a157 (patch) | |
tree | 96a9f6cf85ceda91cade7999c8cca84b1e676cf8 /liblvm/lvm_base.c | |
parent | 39d6ccdfc7af8e599edfe64a3af1cd33a4227700 (diff) | |
download | lvm2-9c5a7b048166a8fc2e2350ac728d32bae387a157.tar.gz lvm2-9c5a7b048166a8fc2e2350ac728d32bae387a157.tar.xz lvm2-9c5a7b048166a8fc2e2350ac728d32bae387a157.zip |
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>
Diffstat (limited to 'liblvm/lvm_base.c')
-rw-r--r-- | liblvm/lvm_base.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/liblvm/lvm_base.c b/liblvm/lvm_base.c index 213246ac..4fa85419 100644 --- a/liblvm/lvm_base.c +++ b/liblvm/lvm_base.c @@ -45,6 +45,12 @@ lvm_t lvm_create(const char *system_dir) 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; } |