summaryrefslogtreecommitdiff
path: root/src/fcntl
diff options
context:
space:
mode:
Diffstat (limited to 'src/fcntl')
-rw-r--r--src/fcntl/fcntl.c7
-rw-r--r--src/fcntl/open.c6
-rw-r--r--src/fcntl/openat.c6
3 files changed, 4 insertions, 15 deletions
diff --git a/src/fcntl/fcntl.c b/src/fcntl/fcntl.c
index ab0ebecf..2c9fb6f3 100644
--- a/src/fcntl/fcntl.c
+++ b/src/fcntl/fcntl.c
@@ -6,17 +6,14 @@
int fcntl(int fd, int cmd, ...)
{
- int r;
long arg;
va_list ap;
va_start(ap, cmd);
arg = va_arg(ap, long);
va_end(ap);
if (cmd == F_SETFL) arg |= O_LARGEFILE;
- if (cmd == F_SETLKW) CANCELPT_BEGIN;
- r = syscall(SYS_fcntl, fd, cmd, arg);
- if (cmd == F_SETLKW) CANCELPT_END;
- return r;
+ if (cmd == F_SETLKW) return syscall_cp(SYS_fcntl, fd, cmd, arg);
+ return syscall(SYS_fcntl, fd, cmd, arg);
}
LFS64(fcntl);
diff --git a/src/fcntl/open.c b/src/fcntl/open.c
index 064d298c..31d6744c 100644
--- a/src/fcntl/open.c
+++ b/src/fcntl/open.c
@@ -6,16 +6,12 @@
int open(const char *filename, int flags, ...)
{
- int r;
mode_t mode;
va_list ap;
va_start(ap, flags);
mode = va_arg(ap, mode_t);
va_end(ap);
- CANCELPT_BEGIN;
- r = syscall(SYS_open, filename, flags|O_LARGEFILE, mode);
- CANCELPT_END;
- return r;
+ return syscall_cp(SYS_open, filename, flags|O_LARGEFILE, mode);
}
LFS64(open);
diff --git a/src/fcntl/openat.c b/src/fcntl/openat.c
index 1a2d9535..bdecb8c8 100644
--- a/src/fcntl/openat.c
+++ b/src/fcntl/openat.c
@@ -6,16 +6,12 @@
int openat(int fd, const char *filename, int flags, ...)
{
- int r;
mode_t mode;
va_list ap;
va_start(ap, flags);
mode = va_arg(ap, mode_t);
va_end(ap);
- CANCELPT_BEGIN;
- r = syscall(SYS_openat, fd, filename, flags|O_LARGEFILE, mode);
- CANCELPT_END;
- return r;
+ return syscall_cp(SYS_openat, fd, filename, flags|O_LARGEFILE, mode);
}
LFS64(openat);