diff options
author | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2012-01-08 19:54:14 +0100 |
---|---|---|
committer | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2012-01-09 21:34:42 +0100 |
commit | c5ae864395919663cce9c70ff6078a42ba1acaa8 (patch) | |
tree | b70af8bc45497003b79b912ea12cc914722538fc /src/audit-init.c | |
parent | d6b83af2ca0c27c873fcd6d149b9b5ac8a590848 (diff) | |
download | latrace-c5ae864395919663cce9c70ff6078a42ba1acaa8.tar.gz latrace-c5ae864395919663cce9c70ff6078a42ba1acaa8.tar.xz latrace-c5ae864395919663cce9c70ff6078a42ba1acaa8.zip |
changeserror_simulation4
Diffstat (limited to 'src/audit-init.c')
-rw-r--r-- | src/audit-init.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/audit-init.c b/src/audit-init.c index b0fdea3..73a5208 100644 --- a/src/audit-init.c +++ b/src/audit-init.c @@ -70,7 +70,6 @@ static int init_ctl_config(char *file) static int read_config(char *dir) { int fd; - off_t len, extra_size = 0; char file[LT_MAXFILE]; memset(&cfg, 0, sizeof(cfg)); @@ -91,23 +90,10 @@ static int read_config(char *dir) cfg.sh = cfg.sh_storage.sh = &cfg.sh_storage; if (lt_sh(&cfg, error_sim)) { - extra_size = lt_error_config_read(&cfg, fd); - if (extra_size < 0) + if (lt_error_config_read(&cfg, fd)) return -1; } - if (-1 == (len = lseek(fd, 0, SEEK_END))) { - perror("lseek failed"); - return -1; - } - -#if 0 - if ((len - extra_size) != sizeof(cfg.sh_storage)) { - printf("config file size differs\n"); - return -1; - } -#endif - if (LT_CONFIG_MAGIC != cfg.sh_storage.magic) { printf("config file magic check failed\n"); return -1; |