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:
@ -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);
|
||||
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user