#include <ndb_global.h>#include <ndb_opts.h>#include "Configuration.hpp"#include <ErrorHandlingMacros.hpp>#include "GlobalData.hpp"#include <ConfigRetriever.hpp>#include <IPCConfig.hpp>#include <ndb_version.h>#include <NdbMem.h>#include <NdbOut.hpp>#include <WatchDog.hpp>#include <mgmapi_configuration.hpp>#include <mgmapi_config_parameters_debug.h>#include <kernel_config_parameters.h>#include <kernel_types.h>#include <ndb_limits.h>#include <ndbapi_limits.h>#include "pc.hpp"#include <LogLevel.hpp>#include <NdbSleep.h>#include <EventLogger.hpp>Include dependency graph for Configuration.cpp:

Go to the source code of this file.
Enumerations | |
| enum | ndbd_options { OPT_INITIAL = NDB_STD_OPTIONS_LAST, OPT_NODAEMON, OPT_FOREGROUND, OPT_NOWAIT_NODES, OPT_INITIAL_START } |
Functions | |
| void | ndbSetOwnVersion () |
| static void | short_usage_sub (void) |
| static void | usage () |
| static char * | get_and_validate_path (ndb_mgm_configuration_iterator &iter, Uint32 param, const char *param_string) |
Variables | |
| EventLogger | g_eventLogger |
| NDB_STD_OPTS_VARS | |
| static int | _daemon |
| static int | _no_daemon |
| static int | _foreground |
| static int | _initial |
| static int | _no_start |
| static int | _initialstart |
| static const char * | _nowait_nodes |
| Uint32 | g_start_type |
| NdbNodeBitmask | g_nowait_nodes |
| static struct my_option | my_long_options [] |
| enum ndbd_options |
Definition at line 49 of file Configuration.cpp.
00049 { 00050 OPT_INITIAL = NDB_STD_OPTIONS_LAST, 00051 OPT_NODAEMON, 00052 OPT_FOREGROUND, 00053 OPT_NOWAIT_NODES, 00054 OPT_INITIAL_START 00055 };
| static char* get_and_validate_path | ( | ndb_mgm_configuration_iterator & | iter, | |
| Uint32 | param, | |||
| const char * | param_string | |||
| ) | [static] |
Definition at line 351 of file Configuration.cpp.
References access, DIR_SEPARATOR, ERROR_SET, yaSSL::fatal, ndb_mgm_configuration_iterator::get(), memset, NDBD_EXIT_AFS_INVALIDPATH, NDBD_EXIT_INVALID_CONFIG, NULL, path, strcat(), strcmp(), strdup(), strlen(), and W_OK.
Referenced by Configuration::setupConfiguration().
00353 { 00354 const char* path = NULL; 00355 if(iter.get(param, &path)){ 00356 ERROR_SET(fatal, NDBD_EXIT_INVALID_CONFIG, "Invalid configuration fetched missing ", 00357 param_string); 00358 } 00359 00360 if(path == 0 || strlen(path) == 0){ 00361 ERROR_SET(fatal, NDBD_EXIT_INVALID_CONFIG, 00362 "Invalid configuration fetched. Configuration does not contain valid ", 00363 param_string); 00364 } 00365 00366 // check that it is pointing on a valid directory 00367 // 00368 char buf2[PATH_MAX]; 00369 memset(buf2, 0,sizeof(buf2)); 00370 #ifdef NDB_WIN32 00371 char* szFilePart; 00372 if(!GetFullPathName(path, sizeof(buf2), buf2, &szFilePart) || 00373 (GetFileAttributes(buf2) & FILE_ATTRIBUTE_READONLY)) 00374 #else 00375 if((::realpath(path, buf2) == NULL)|| 00376 (::access(buf2, W_OK) != 0)) 00377 #endif 00378 { 00379 ERROR_SET(fatal, NDBD_EXIT_AFS_INVALIDPATH, path, param_string); 00380 } 00381 00382 if (strcmp(&buf2[strlen(buf2) - 1], DIR_SEPARATOR)) 00383 strcat(buf2, DIR_SEPARATOR); 00384 00385 return strdup(buf2); 00386 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void ndbSetOwnVersion | ( | ) |
Definition at line 79 of file version.c.
00079 { 00080 char buf[256]; 00081 if (NdbEnv_GetEnv("NDB_SETVERSION", buf, sizeof(buf))) { 00082 Uint32 _v1,_v2,_v3; 00083 if (sscanf(buf, "%u.%u.%u", &_v1, &_v2, &_v3) == 3) { 00084 ndbOwnVersionTesting = MAKE_VERSION(_v1,_v2,_v3); 00085 ndbout_c("Testing: Version set to 0x%x", ndbOwnVersionTesting); 00086 } 00087 } 00088 }
| static void short_usage_sub | ( | void | ) | [static] |
Definition at line 103 of file Configuration.cpp.
References my_progname.
00104 { 00105 printf("Usage: %s [OPTIONS]\n", my_progname); 00106 }
| static void usage | ( | void | ) | [static] |
Definition at line 107 of file Configuration.cpp.
References my_long_options, my_print_help(), my_print_variables(), ndb_std_print_version(), and short_usage_sub().
00108 { 00109 short_usage_sub(); 00110 ndb_std_print_version(); 00111 my_print_help(my_long_options); 00112 my_print_variables(my_long_options); 00113 }
Here is the call graph for this function:

int _daemon [static] |
int _foreground [static] |
int _initial [static] |
int _initialstart [static] |
int _no_daemon [static] |
int _no_start [static] |
const char* _nowait_nodes [static] |
Definition at line 482 of file QmgrMain.cpp.
Referenced by Qmgr::cmInfoconf010Lab(), and Configuration::init().
Definition at line 481 of file QmgrMain.cpp.
Referenced by Qmgr::cmInfoconf010Lab(), and Configuration::init().
struct my_option my_long_options[] [static] |
Arguments to NDB process
Definition at line 69 of file Configuration.cpp.
Definition at line 57 of file Configuration.cpp.
1.4.7

