about summary refs log tree commit diff homepage
path: root/runtime/POSIX/fd_init.c
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2016-05-27 18:43:04 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2016-05-27 18:43:04 +0100
commitd91432084ddb54ed528ae059c114cc5b225241c2 (patch)
tree73de3ff50dbc4b2f9e102f3c17316484ebca49a5 /runtime/POSIX/fd_init.c
parenta8012548f2cc31e2c2283f9f500b281532aa5aa7 (diff)
parent71a7e31ed99625e2f493ad99972b8446744da54e (diff)
downloadklee-d91432084ddb54ed528ae059c114cc5b225241c2.tar.gz
Merge pull request #397 from andreamattavelli/refactoring_stdin
Distinct options for symbolic files and symbolic stdin
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;