Commit 86999f87 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: 64-bit cleanups in the system calls

64-bit cleanup - this fixes the return values of the system calls to be longs.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 431a4c7b
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#define __SYSCALL_USER_H #define __SYSCALL_USER_H
extern int record_syscall_start(int syscall); extern int record_syscall_start(int syscall);
extern void record_syscall_end(int index, int result); extern void record_syscall_end(int index, long result);
#endif #endif
......
...@@ -34,9 +34,9 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) ...@@ -34,9 +34,9 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
extern void log_exec(char **argv, void *tty); extern void log_exec(char **argv, void *tty);
static int execve1(char *file, char **argv, char **env) static long execve1(char *file, char **argv, char **env)
{ {
int error; long error;
#ifdef CONFIG_TTY_LOG #ifdef CONFIG_TTY_LOG
log_exec(argv, current->tty); log_exec(argv, current->tty);
...@@ -51,9 +51,9 @@ static int execve1(char *file, char **argv, char **env) ...@@ -51,9 +51,9 @@ static int execve1(char *file, char **argv, char **env)
return(error); return(error);
} }
int um_execve(char *file, char **argv, char **env) long um_execve(char *file, char **argv, char **env)
{ {
int err; long err;
err = execve1(file, argv, env); err = execve1(file, argv, env);
if(!err) if(!err)
...@@ -61,9 +61,9 @@ int um_execve(char *file, char **argv, char **env) ...@@ -61,9 +61,9 @@ int um_execve(char *file, char **argv, char **env)
return(err); return(err);
} }
int sys_execve(char *file, char **argv, char **env) long sys_execve(char *file, char **argv, char **env)
{ {
int error; long error;
char *filename; char *filename;
lock_kernel(); lock_kernel();
......
...@@ -26,7 +26,7 @@ void ptrace_disable(struct task_struct *child) ...@@ -26,7 +26,7 @@ void ptrace_disable(struct task_struct *child)
child->thread.singlestep_syscall = 0; child->thread.singlestep_syscall = 0;
} }
int sys_ptrace(long request, long pid, long addr, long data) long sys_ptrace(long request, long pid, long addr, long data)
{ {
struct task_struct *child; struct task_struct *child;
int i, ret; int i, ret;
......
...@@ -167,7 +167,7 @@ int do_signal(int error) ...@@ -167,7 +167,7 @@ int do_signal(int error)
/* /*
* Atomically swap in the new signal mask, and wait for a signal. * Atomically swap in the new signal mask, and wait for a signal.
*/ */
int sys_sigsuspend(int history0, int history1, old_sigset_t mask) long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
{ {
sigset_t saveset; sigset_t saveset;
...@@ -187,7 +187,7 @@ int sys_sigsuspend(int history0, int history1, old_sigset_t mask) ...@@ -187,7 +187,7 @@ int sys_sigsuspend(int history0, int history1, old_sigset_t mask)
} }
} }
int sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize) long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize)
{ {
sigset_t saveset, newset; sigset_t saveset, newset;
...@@ -245,7 +245,7 @@ int sys_sigaction(int sig, const struct old_sigaction __user *act, ...@@ -245,7 +245,7 @@ int sys_sigaction(int sig, const struct old_sigaction __user *act,
return ret; return ret;
} }
int sys_sigaltstack(const stack_t *uss, stack_t *uoss) long sys_sigaltstack(const stack_t *uss, stack_t *uoss)
{ {
return(do_sigaltstack(uss, uoss, PT_REGS_SP(&current->thread.regs))); return(do_sigaltstack(uss, uoss, PT_REGS_SP(&current->thread.regs)));
} }
...@@ -263,7 +263,7 @@ static int copy_sc_from_user(struct pt_regs *to, void *from, ...@@ -263,7 +263,7 @@ static int copy_sc_from_user(struct pt_regs *to, void *from,
return(ret); return(ret);
} }
int sys_sigreturn(struct pt_regs regs) long sys_sigreturn(struct pt_regs regs)
{ {
void __user *sc = sp_to_sc(PT_REGS_SP(&current->thread.regs)); void __user *sc = sp_to_sc(PT_REGS_SP(&current->thread.regs));
void __user *mask = sp_to_mask(PT_REGS_SP(&current->thread.regs)); void __user *mask = sp_to_mask(PT_REGS_SP(&current->thread.regs));
...@@ -281,7 +281,7 @@ int sys_sigreturn(struct pt_regs regs) ...@@ -281,7 +281,7 @@ int sys_sigreturn(struct pt_regs regs)
return(PT_REGS_SYSCALL_RET(&current->thread.regs)); return(PT_REGS_SYSCALL_RET(&current->thread.regs));
} }
int sys_rt_sigreturn(struct pt_regs regs) long sys_rt_sigreturn(struct pt_regs regs)
{ {
unsigned long sp = PT_REGS_SP(&current->thread.regs); unsigned long sp = PT_REGS_SP(&current->thread.regs);
struct ucontext __user *uc = sp_to_uc(sp); struct ucontext __user *uc = sp_to_uc(sp);
......
...@@ -104,11 +104,11 @@ struct mmap_arg_struct { ...@@ -104,11 +104,11 @@ struct mmap_arg_struct {
unsigned long offset; unsigned long offset;
}; };
int old_mmap(unsigned long addr, unsigned long len, long old_mmap(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags, unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long offset) unsigned long fd, unsigned long offset)
{ {
int err = -EINVAL; long err = -EINVAL;
if (offset & ~PAGE_MASK) if (offset & ~PAGE_MASK)
goto out; goto out;
...@@ -120,10 +120,10 @@ int old_mmap(unsigned long addr, unsigned long len, ...@@ -120,10 +120,10 @@ int old_mmap(unsigned long addr, unsigned long len,
* sys_pipe() is the normal C calling standard for creating * sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way unix traditionally does this, though. * a pipe. It's not the way unix traditionally does this, though.
*/ */
int sys_pipe(unsigned long * fildes) long sys_pipe(unsigned long * fildes)
{ {
int fd[2]; int fd[2];
int error; long error;
error = do_pipe(fd); error = do_pipe(fd);
if (!error) { if (!error) {
...@@ -218,9 +218,9 @@ int sys_ipc (uint call, int first, int second, ...@@ -218,9 +218,9 @@ int sys_ipc (uint call, int first, int second,
} }
} }
int sys_uname(struct old_utsname * name) long sys_uname(struct old_utsname * name)
{ {
int err; long err;
if (!name) if (!name)
return -EFAULT; return -EFAULT;
down_read(&uts_sem); down_read(&uts_sem);
...@@ -229,9 +229,9 @@ int sys_uname(struct old_utsname * name) ...@@ -229,9 +229,9 @@ int sys_uname(struct old_utsname * name)
return err?-EFAULT:0; return err?-EFAULT:0;
} }
int sys_olduname(struct oldold_utsname * name) long sys_olduname(struct oldold_utsname * name)
{ {
int error; long error;
if (!name) if (!name)
return -EFAULT; return -EFAULT;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
struct { struct {
int syscall; int syscall;
int pid; int pid;
int result; long result;
struct timeval start; struct timeval start;
struct timeval end; struct timeval end;
} syscall_record[1024]; } syscall_record[1024];
...@@ -30,7 +30,7 @@ int record_syscall_start(int syscall) ...@@ -30,7 +30,7 @@ int record_syscall_start(int syscall)
return(index); return(index);
} }
void record_syscall_end(int index, int result) void record_syscall_end(int index, long result)
{ {
syscall_record[index].result = result; syscall_record[index].result = result;
gettimeofday(&syscall_record[index].end, NULL); gettimeofday(&syscall_record[index].end, NULL);
......
...@@ -84,7 +84,7 @@ static inline pid_t setsid(void) ...@@ -84,7 +84,7 @@ static inline pid_t setsid(void)
KERNEL_CALL(pid_t, sys_setsid) KERNEL_CALL(pid_t, sys_setsid)
} }
static inline long lseek(unsigned int fd, off_t offset, unsigned int whence) static inline off_t lseek(unsigned int fd, off_t offset, unsigned int whence)
{ {
KERNEL_CALL(long, sys_lseek, fd, offset, whence) KERNEL_CALL(long, sys_lseek, fd, offset, whence)
} }
...@@ -102,13 +102,12 @@ static inline int write(unsigned int fd, char * buf, int len) ...@@ -102,13 +102,12 @@ static inline int write(unsigned int fd, char * buf, int len)
long sys_mmap2(unsigned long addr, unsigned long len, long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags, unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff); unsigned long fd, unsigned long pgoff);
int sys_execve(char *file, char **argv, char **env); long sys_execve(char *file, char **argv, char **env);
long sys_clone(unsigned long clone_flags, unsigned long newsp, long sys_clone(unsigned long clone_flags, unsigned long newsp,
int *parent_tid, int *child_tid); int *parent_tid, int *child_tid);
long sys_fork(void); long sys_fork(void);
long sys_vfork(void); long sys_vfork(void);
int sys_pipe(unsigned long *fildes); long sys_pipe(unsigned long *fildes);
int sys_ptrace(long request, long pid, long addr, long data);
struct sigaction; struct sigaction;
asmlinkage long sys_rt_sigaction(int sig, asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act, const struct sigaction __user *act,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment