about summary refs log tree commit diff homepage
path: root/runtime/POSIX/fd_init.c
diff options
context:
space:
mode:
authorAndrea Mattavelli <andreamattavelli@gmail.com>2016-05-24 18:57:52 +0100
committerAndrea Mattavelli <andreamattavelli@gmail.com>2016-05-24 18:57:52 +0100
commit71a7e31ed99625e2f493ad99972b8446744da54e (patch)
tree322026ad9b5759611a906cc3a44c7a636bfc41e1 /runtime/POSIX/fd_init.c
parent4278fdcb819bb9a68ed43f88c86df21c6b04a0ab (diff)
downloadklee-71a7e31ed99625e2f493ad99972b8446744da54e.tar.gz
Split creation of symbolic files and stdin in two distinct options
Diffstat (limited to 'runtime/POSIX/fd_init.c')
-rw-r--r--runtime/POSIX/fd_init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/POSIX/fd_init.c b/runtime/POSIX/fd_init.c
index 8b69fd04..9184b7ea 100644
--- a/runtime/POSIX/fd_init.c
+++ b/runtime/POSIX/fd_init.c
@@ -107,9 +107,9 @@ static unsigned __sym_uint32(const char *name) {
                          writes past the initial file size are discarded 
 			 (file offset is always incremented)
    max_failures: maximum number of system call failures */
-void klee_init_fds(unsigned n_files, unsigned file_length, 
-		   int sym_stdout_flag, int save_all_writes_flag,
-		   unsigned max_failures) {
+void klee_init_fds(unsigned n_files, unsigned file_length,
+                   unsigned stdin_length, int sym_stdout_flag,
+                   int save_all_writes_flag, unsigned max_failures) {
   unsigned k;
   char name[7] = "?-data";
   struct stat64 s;
@@ -124,9 +124,9 @@ void klee_init_fds(unsigned n_files, unsigned file_length,
   }
   
   /* setting symbolic stdin */
-  if (file_length) {
+  if (stdin_length) {
     __exe_fs.sym_stdin = malloc(sizeof(*__exe_fs.sym_stdin));
-    __create_new_dfile(__exe_fs.sym_stdin, file_length, "stdin", &s);
+    __create_new_dfile(__exe_fs.sym_stdin, stdin_length, "stdin", &s);
     __exe_env.fds[0].dfile = __exe_fs.sym_stdin;
   }
   else __exe_fs.sym_stdin = NULL;