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:
@ -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;
|
||||
|
||||
|
@ -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];
|
||||
|
Reference in New Issue
Block a user