support kernels with no SYS_open syscall, only SYS_openat
open is handled specially because it is used from so many places, in so many variants (2 or 3 arguments, setting errno or not, and cancellable or not). trying to do it as a function would not only increase bloat, but would also risk subtle breakage. this is the first step towards supporting "new" archs where linux lacks "old" syscalls.
This commit is contained in:
@@ -96,8 +96,7 @@ static int child(void *args_vp)
|
||||
goto fail;
|
||||
break;
|
||||
case FDOP_OPEN:
|
||||
fd = __syscall(SYS_open, op->path,
|
||||
op->oflag | O_LARGEFILE, op->mode);
|
||||
fd = __sys_open(op->path, op->oflag, op->mode);
|
||||
if ((ret=fd) < 0) goto fail;
|
||||
if (fd != op->fd) {
|
||||
if ((ret=__syscall(SYS_dup2, fd, op->fd))<0)
|
||||
|
||||
Reference in New Issue
Block a user