Revision 814d7977 linux-user/syscall.c

b/linux-user/syscall.c
139 139

  
140 140

  
141 141
#define __NR_sys_uname __NR_uname
142
#define __NR_sys_fchmodat __NR_fchmodat
142 143
#define __NR_sys_fchownat __NR_fchownat
143 144
#define __NR_sys_getcwd1 __NR_getcwd
144 145
#define __NR_sys_getdents __NR_getdents
......
168 169
}
169 170
#endif
170 171
_syscall1(int,sys_uname,struct new_utsname *,buf)
172
#if defined(TARGET_NR_fchmodat) && defined(__NR_fchmodat)
173
_syscall4(int,sys_fchmodat,int,dirfd,const char *,pathname,
174
          mode_t,mode,int,flags)
175
#endif
171 176
#if defined(TARGET_NR_fchownat) && defined(__NR_fchownat)
172 177
_syscall5(int,sys_fchownat,int,dirfd,const char *,pathname,
173 178
          uid_t,owner,gid_t,group,int,flags)
......
3533 3538
    case TARGET_NR_fchmod:
3534 3539
        ret = get_errno(fchmod(arg1, arg2));
3535 3540
        break;
3541
#if defined(TARGET_NR_fchmodat) && defined(__NR_fchmodat)
3542
    case TARGET_NR_fchmodat:
3543
        if (!arg2) {
3544
            ret = -EFAULT;
3545
            goto fail;
3546
        }
3547
        p = lock_user_string(arg2);
3548
        if (!access_ok(VERIFY_READ, p, 1))
3549
            ret = -EFAULT;
3550
        else
3551
            ret = get_errno(sys_fchmodat(arg1, p, arg3, arg4));
3552
        if (p)
3553
            unlock_user(p, arg2, 0);
3554
        break;
3555
#endif
3536 3556
    case TARGET_NR_getpriority:
3537 3557
        ret = get_errno(getpriority(arg1, arg2));
3538 3558
        break;

Also available in: Unified diff