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

cleanup: tiny speedup of lib_dir checking

Instead of repeated lookup of global/library_dir - remember first
search in command context - saves couple lines in debug output...
This commit is contained in:
Zdenek Kabelac
2013-12-06 16:35:54 +01:00
parent 0fcdc8a020
commit 9f0e27a18c
4 changed files with 8 additions and 3 deletions

View File

@ -1654,6 +1654,8 @@ int refresh_toolcontext(struct cmd_context *cmd)
cmd->hosttags = 0;
cmd->lib_dir = NULL;
if (!_init_lvm_conf(cmd))
return 0;

View File

@ -121,6 +121,7 @@ struct cmd_context {
struct dm_list tags;
int hosttags;
const char *lib_dir; /* Cache value global/library_dir */
char system_dir[PATH_MAX];
char dev_dir[PATH_MAX];
char proc_dir[PATH_MAX];