1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-02 04:22:02 +03:00

tools: add 'lvm lastlog' command for interactive query and display of last command's log

If we're running in lvm shell, we can keep last command's log report
for further query with possible different selection criteria for easy
log lookup.
This commit is contained in:
Peter Rajnoha
2016-05-20 15:30:58 +02:00
parent c33c0545af
commit 89e2aef63a
8 changed files with 70 additions and 3 deletions

View File

@ -2247,6 +2247,9 @@ void destroy_toolcontext(struct cmd_context *cmd)
if (cmd->cft_def_hash)
dm_hash_destroy(cmd->cft_def_hash);
if (cmd->log_rh)
dm_report_free(cmd->log_rh);
if (cmd->libmem)
dm_pool_destroy(cmd->libmem);

View File

@ -185,6 +185,11 @@ struct cmd_context {
char dev_dir[PATH_MAX];
char proc_dir[PATH_MAX];
/*
* Command log reporting.
*/
struct dm_report *log_rh; /* keep log report of last cmd for further queries if cmd line is interactive (e.g. lvm shell) */
/*
* Buffers.
*/