Whamcloud - gitweb
LU-5170 utils: Add utility and command name to llapi messages 71/28571/8
authorSteve Guminski <stephenx.guminski@intel.com>
Thu, 3 Aug 2017 13:33:39 +0000 (09:33 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 9 Jan 2018 05:35:48 +0000 (05:35 +0000)
commit7a16f18ae1ef5d21812c916470022280617c4e91
tree2dfc936d950fabe88e7821d6f46d7c634518db64
parent10cf4dabc82f54cb7cf9dfc915d477bd6a9e42a7
LU-5170 utils: Add utility and command name to llapi messages

Allow error and info messages printed by llapi functions to
include the name of the utility and the command that caused
the error.  The command name is provided by the caller before
invoking any llapi functions through the use of the new function
llapi_set_command_name().  After the command has completed, the
utility should reset the name using llapi_clear_command_name().
If no command name is provided, only the utility name is printed.

The lfs and lctl utilities have been updated with the new functions.
They will print both the utility name and the command name while
in non-interactive mode.  In interactive mode, only the utility
name is printed.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Ifaa1549f9bac6fdb25120f5721f69a8e1a7a52e1
Reviewed-on: https://review.whamcloud.com/28571
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre/lustreapi.h
lustre/utils/lctl.c
lustre/utils/lfs.c
lustre/utils/liblustreapi.c