@@ -294,7 +294,7 @@ static bool check_match_and_wto_message(const char* sys_message_id, const char*
294294 print_wto_directly (input_string + sys_message_pos );
295295 } else {
296296 // The match is in the last WTO_MESSAGE_LENGTH chars
297- // WTO last WTO_MESSAGE_LENGTH chars - egde case: if the match is last word
297+ // WTO last WTO_MESSAGE_LENGTH chars - edge case: if the match is last word
298298 // user will see the text before match too
299299 print_wto_directly (input_string + (input_string_len - WTO_MESSAGE_LENGTH ));
300300 }
@@ -2145,14 +2145,17 @@ static bool validateConfiguration(ConfigManager *cmgr, FILE *out){
21452145 switch (validateStatus ){
21462146 case JSON_VALIDATOR_NO_EXCEPTIONS :
21472147 INFO (MSG_CFG_VALID );
2148+ printf_wto (MSG_CFG_VALID ); // Manual sys log print (messages not set here yet)
21482149 ok = true;
21492150 break ;
21502151 case JSON_VALIDATOR_HAS_EXCEPTIONS :
21512152 ERROR (MSG_CFG_INVALID );
2153+ printf_wto (MSG_CFG_INVALID ); // Manual sys log print (messages not set here yet)
21522154 displayValidityException (out ,0 ,validator -> topValidityException );
21532155 break ;
21542156 case JSON_VALIDATOR_INTERNAL_FAILURE :
21552157 ERROR (MSG_CFG_INTERNAL_FAIL );
2158+ printf_wto (MSG_CFG_INTERNAL_FAIL ); // Manual sys log print (messages not set here yet)
21562159 break ;
21572160 }
21582161 freeJsonValidator (validator );
@@ -2165,7 +2168,7 @@ int main(int argc, char **argv) {
21652168 }
21662169
21672170 setenv ("_BPXK_AUTOCVT" , "ON" , 1 );
2168- sprintf (launcherVersion , "%d.%d.%d+%d" , LAUNCHER_VERSION_MAJOR , LAUNCHER_VERSION_MINOR , LAUNCHER_VERSION_PATCH , LAUNCHER_VERSION_DATE_STAMP );
2171+ snprintf (launcherVersion , sizeof ( launcherVersion ) , "%d.%d.%d+%d" , LAUNCHER_VERSION_MAJOR , LAUNCHER_VERSION_MINOR , LAUNCHER_VERSION_PATCH , LAUNCHER_VERSION_DATE_STAMP );
21692172 INFO (MSG_LAUNCHER_START , launcherVersion );
21702173 INFO (MSG_LINE_LENGTH );
21712174 printf_wto (MSG_LAUNCHER_START , launcherVersion ); // Manual sys log print (messages not set here yet)
@@ -2209,22 +2212,24 @@ int main(int argc, char **argv) {
22092212 exit (EXIT_FAILURE );
22102213 }
22112214
2212- set_sys_messages (configmgr );
2213-
22142215 //got root dir, can now load up the schemas from it
22152216 char schemaList [PATH_MAX * 2 + 4 ] = {0 };
2216- snprintf (schemaList , PATH_MAX * 2 + 1 , "%s/schemas/zowe-yaml-schema.json:%s/schemas/server-common.json" , zl_context .root_dir , zl_context . root_dir );
2217+ snprintf (schemaList , PATH_MAX * 2 + 1 , "%1$ s/schemas/zowe-yaml-schema.json:%1$ s/schemas/server-common.json" , zl_context .root_dir );
22172218 int schemaLoadStatus = cfgLoadSchemas (configmgr , ZOWE_CONFIG_NAME , schemaList );
22182219 if (schemaLoadStatus ){
22192220 ERROR (MSG_CFG_SCHEMA_FAIL , schemaLoadStatus );
2221+ printf_wto (MSG_CFG_SCHEMA_FAIL , schemaLoadStatus ); // Manual sys log print (messages not set here yet)
22202222 exit (EXIT_FAILURE );
22212223 }
22222224
22232225 if (!validateConfiguration (configmgr , stdout )){
22242226 exit (EXIT_FAILURE );
22252227 }
22262228
2227-
2229+ // At this point, if the zowe.sysMessages is defined,
2230+ // then it is validated => always string with length > 0
2231+ set_sys_messages (configmgr );
2232+
22282233 set_shared_uss_env (configmgr );
22292234
22302235 if (process_workspace_dir (configmgr )) {
0 commit comments