From b361cc1ce3ef431d6aa53003b465ef323db7e3fc Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Wed, 15 Feb 2017 16:20:49 +0530 Subject: cli: cart off unwanted output from create command The response of below sub-operations as part of create are undesired $ targetcli set global auto_add_default_portal=false $ targetcli / saveconfig $ targetcli set attributes generate_node_acls=1 demo_mode_write_protect=0 Hence redirecting them to '/dev/null' This patch also fix a bug in the previous patch i.e. missed inverting [!] function return in if() Signed-off-by: Prasanna Kumar Kalever --- rpc/block_svc_routines.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rpc/block_svc_routines.c') diff --git a/rpc/block_svc_routines.c b/rpc/block_svc_routines.c index f77fbb3..fdcc8c0 100644 --- a/rpc/block_svc_routines.c +++ b/rpc/block_svc_routines.c @@ -25,9 +25,9 @@ # define GLFS_PATH "/backstores/user:glfs" # define TARGETCLI_GLFS "targetcli "GLFS_PATH # define TARGETCLI_ISCSI "targetcli /iscsi" -# define TARGETCLI_GLOBALS "targetcli set global auto_add_default_portal=false" -# define TARGETCLI_SAVE "targetcli / saveconfig" -# define ATTRIBUTES "generate_node_acls=1 demo_mode_write_protect=0" +# define TARGETCLI_GLOBALS "targetcli set global auto_add_default_portal=false > " DEVNULLPATH +# define TARGETCLI_SAVE "targetcli / saveconfig > " DEVNULLPATH +# define ATTRIBUTES "generate_node_acls=1 demo_mode_write_protect=0 > " DEVNULLPATH # define IQN_PREFIX "iqn.2016-12.org.gluster-block:" # define MSERVER_DELIMITER "," -- cgit