diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/audit-init.c | 2 | ||||
-rw-r--r-- | src/config.c | 2 | ||||
-rw-r--r-- | src/config.h | 8 |
4 files changed, 7 insertions, 8 deletions
@@ -1,3 +1,6 @@ +2010-08-05 Jiri Olsa <olsajiri@gmail.com> + * changed config file magic defines + 2010-07-02 Jiri Olsa <olsajiri@gmail.com> * fixing output for thread applications - proper tid displayed for pipe mode diff --git a/src/audit-init.c b/src/audit-init.c index a3c0cf7..0f60cc3 100644 --- a/src/audit-init.c +++ b/src/audit-init.c @@ -95,7 +95,7 @@ static int read_config(char *dir) return -1; } - if (LT_MAGIC != cfg.sh_storage.magic) { + if (LT_CONFIG_MAGIC != cfg.sh_storage.magic) { printf("config file magic check failed\n"); return -1; } diff --git a/src/config.c b/src/config.c index a52a489..52904f0 100644 --- a/src/config.c +++ b/src/config.c @@ -107,7 +107,7 @@ int lt_config(struct lt_config_app *cfg, int argc, char **argv) cfg->sh = &cfg->sh_storage; /* default values settings */ - lt_sh(cfg, magic) = LT_MAGIC; + lt_sh(cfg, magic) = LT_CONFIG_MAGIC; lt_sh(cfg, framesize) = 1000; lt_sh(cfg, fout) = stdout; lt_sh(cfg, indent_sym) = 1; diff --git a/src/config.h b/src/config.h index 78dee86..5eec433 100644 --- a/src/config.h +++ b/src/config.h @@ -42,11 +42,6 @@ #endif #endif -/* TODO put this to autoconf.h */ -#define LT_VERSION_MINOR 1 -#define LT_VERSION_MAJOR 0 -#define LT_VERSION (LT_VERSION_MAJOR*256 + LT_VERSION_MINOR) - #define LT_NAMES_MAX 50 #define LT_NAMES_SEP ',' @@ -72,7 +67,8 @@ struct lt_config_tv { }; struct lt_config_shared { -#define LT_MAGIC ((LT_VERSION << 16) + 0xdead) +#define LT_CONFIG_VERSION 1 +#define LT_CONFIG_MAGIC ((LT_CONFIG_VERSION << 16) + 0xdead) unsigned int magic; #define LT_LIBS_MAXSIZE 200 |