summaryrefslogtreecommitdiffstats
path: root/src/audit-init.c
diff options
context:
space:
mode:
authorjolsa@redhat.com <jolsa@redhat.com>2011-06-20 16:14:11 +0200
committerJiri Olsa <Jiri Olsa jolsa@redhat.com>2011-11-24 21:20:27 +0100
commitd4d4ddd698f1378649e33aa58b7e3b687a2e6c3d (patch)
treee3748aa5978ca912c964f4f50defe3b3b4740a52 /src/audit-init.c
parent2d6cc3704e7affeb56c798b39a942daca95385dc (diff)
downloadlatrace-d4d4ddd698f1378649e33aa58b7e3b687a2e6c3d.tar.gz
latrace-d4d4ddd698f1378649e33aa58b7e3b687a2e6c3d.tar.xz
latrace-d4d4ddd698f1378649e33aa58b7e3b687a2e6c3d.zip
error simulation: library part
Diffstat (limited to 'src/audit-init.c')
-rw-r--r--src/audit-init.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/audit-init.c b/src/audit-init.c
index c3f96a4..092bb0c 100644
--- a/src/audit-init.c
+++ b/src/audit-init.c
@@ -253,8 +253,18 @@ int audit_init(int argc, char **argv, char **env)
if (lt_sh(&cfg, not_follow_fork))
lt_sh(&cfg, pid) = getpid();
- /* enable global symbols if needed */
- lt_sh(&cfg, global_symbols) = lt_sh(&cfg, args_enabled);
+ /* error simulation */
+ if (lt_sh(&cfg, error_sim))
+ lt_error_init(&cfg);
+
+ /*
+ enable global symbols if
+ - we need to display arguments
+ - we do the error simulation
+ */
+ lt_sh(&cfg, global_symbols) = \
+ lt_sh(&cfg, args_enabled) ||
+ lt_sh(&cfg, error_sim);
PRINT_VERBOSE(&cfg, 1, "global_symbols %d\n", lt_sh(&cfg, global_symbols));