diff options
author | Paul Marinescu <paul.marinescu@imperial.ac.uk> | 2013-08-29 15:59:16 +0100 |
---|---|---|
committer | Paul Marinescu <paul.marinescu@imperial.ac.uk> | 2013-08-29 15:59:16 +0100 |
commit | b6939ec17b8341b3e0c9b56475e5986750380991 (patch) | |
tree | c44ae0525b1fc3ed752d235e9921d7548f65769a /runtime/POSIX/fd_64.c | |
parent | 821b6f6473334eaa6c78205603faf14a2c1aca41 (diff) | |
download | klee-b6939ec17b8341b3e0c9b56475e5986750380991.tar.gz |
Added some of the common *at functions to the model
Diffstat (limited to 'runtime/POSIX/fd_64.c')
-rw-r--r-- | runtime/POSIX/fd_64.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/POSIX/fd_64.c b/runtime/POSIX/fd_64.c index d0710caf..742e560f 100644 --- a/runtime/POSIX/fd_64.c +++ b/runtime/POSIX/fd_64.c @@ -46,6 +46,20 @@ int open(const char *pathname, int flags, ...) { return __fd_open(pathname, flags, mode); } +int openat(int fd, const char *pathname, int flags, ...) { + mode_t mode = 0; + + if (flags & O_CREAT) { + /* get mode */ + va_list ap; + va_start(ap, flags); + mode = va_arg(ap, mode_t); + va_end(ap); + } + + return __fd_openat(fd, pathname, flags, mode); +} + off64_t lseek(int fd, off64_t offset, int whence) { return __fd_lseek(fd, offset, whence); } |