@@ -44,10 +44,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
44
44
#define MEDIUM 1
45
45
46
46
47
- static gchar * sock_path ;
47
+ static gchar * sock_path = NULL ;
48
48
static gchar line [65536 ];
49
49
static gboolean flag_color = FALSE;
50
- static gchar * format ;
50
+ static gchar * format = NULL ;
51
51
static gboolean flag_version = FALSE;
52
52
#define BOOL (i ) (i?1:0)
53
53
@@ -118,11 +118,11 @@ static struct keyword_set_s KEYWORDS_COLOR = {
118
118
119
119
static GOptionEntry entries [] = {
120
120
{"color" , 'c' , 0 , G_OPTION_ARG_NONE , & flag_color ,
121
- "coloured display \n " , NULL },
121
+ "coloured display " , NULL },
122
122
{"sock-path" , 'S' , 0 , G_OPTION_ARG_FILENAME , & sock_path ,
123
- "explicit unix socket path\n " , "SOCKET" },
123
+ "explicit unix socket path" , "SOCKET" },
124
124
{"format" , 'f' , 0 , G_OPTION_ARG_STRING , & format ,
125
- "output result by given FORMAT" ,"FORMAT" },
125
+ "output result by given FORMAT. Available FORMAT value are yaml, csv or json " ,"FORMAT" },
126
126
{"version" , 'v' , 0 , G_OPTION_ARG_NONE , & flag_version ,
127
127
"Display the version of gridinit_cmd" , NULL },
128
128
{NULL }
@@ -679,6 +679,8 @@ main_options(int argc, char **args)
679
679
GError * error = NULL ;
680
680
GOptionContext * context ;
681
681
682
+ sock_path = g_strdup (GRIDINIT_SOCK_PATH );
683
+
682
684
context = g_option_context_new ("(status{,2,3}|start|stop|reload|repair) [ID...]\n" );
683
685
g_option_context_add_main_entries (context , entries , NULL );
684
686
if (!g_option_context_parse (context , & argc , & args , & error )) {
0 commit comments