summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-03-03 09:17:12 +0000
committerdes <des@FreeBSD.org>2003-03-03 09:17:12 +0000
commit3c182bd3cd14b38db69ecb7fbaa4fbad85bf23c4 (patch)
tree60276925092cec90d0959942b4beda059d93328f /sys/i386/linux
parent021faa11ac3e8868e33ee981995319d77cba1b58 (diff)
downloadFreeBSD-src-3c182bd3cd14b38db69ecb7fbaa4fbad85bf23c4.zip
FreeBSD-src-3c182bd3cd14b38db69ecb7fbaa4fbad85bf23c4.tar.gz
Clean up whitespace and remove register keyword.
Diffstat (limited to 'sys/i386/linux')
-rw-r--r--sys/i386/linux/imgact_linux.c28
-rw-r--r--sys/i386/linux/linux_machdep.c10
-rw-r--r--sys/i386/linux/linux_ptrace.c6
-rw-r--r--sys/i386/linux/linux_sysvec.c54
4 files changed, 49 insertions, 49 deletions
diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c
index bc32ba8..25295f7 100644
--- a/sys/i386/linux/imgact_linux.c
+++ b/sys/i386/linux/imgact_linux.c
@@ -9,7 +9,7 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
+ * notice, this list of conditions and the following disclaimer
* in this position and unchanged.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -137,7 +137,7 @@ exec_linux_imgact(struct image_params *imgp)
*/
vmaddr = virtual_offset;
error = vm_map_find(&vmspace->vm_map, NULL, 0, &vmaddr,
- a_out->a_text + a_out->a_data + bss_size, FALSE,
+ a_out->a_text + a_out->a_data + bss_size, FALSE,
VM_PROT_ALL, VM_PROT_ALL, 0);
if (error)
goto fail;
@@ -150,7 +150,7 @@ exec_linux_imgact(struct image_params *imgp)
goto fail;
error = copyout((void *)(buffer + file_offset),
- (void *)vmaddr, a_out->a_text + a_out->a_data);
+ (void *)vmaddr, a_out->a_text + a_out->a_data);
vm_map_remove(kernel_map, buffer,
buffer + round_page(a_out->a_text + a_out->a_data + file_offset));
@@ -163,9 +163,9 @@ exec_linux_imgact(struct image_params *imgp)
*/
error = vm_map_protect(&vmspace->vm_map,
vmaddr,
- vmaddr + a_out->a_text,
- VM_PROT_EXECUTE|VM_PROT_READ,
- TRUE);
+ vmaddr + a_out->a_text,
+ VM_PROT_EXECUTE|VM_PROT_READ,
+ TRUE);
if (error)
goto fail;
}
@@ -179,13 +179,13 @@ exec_linux_imgact(struct image_params *imgp)
vmaddr = virtual_offset;
error = vm_mmap(&vmspace->vm_map, &vmaddr,
a_out->a_text + a_out->a_data,
- VM_PROT_READ | VM_PROT_EXECUTE,
- VM_PROT_ALL,
- MAP_PRIVATE | MAP_FIXED,
- (caddr_t)imgp->vp, file_offset);
+ VM_PROT_READ | VM_PROT_EXECUTE,
+ VM_PROT_ALL,
+ MAP_PRIVATE | MAP_FIXED,
+ (caddr_t)imgp->vp, file_offset);
if (error)
goto fail;
-
+
#ifdef DEBUG
printf("imgact: startaddr=%08lx, length=%08lx\n",
(u_long)vmaddr, a_out->a_text + a_out->a_data);
@@ -200,13 +200,13 @@ exec_linux_imgact(struct image_params *imgp)
FALSE);
if (error)
goto fail;
-
+
/*
* Allocate anon demand-zeroed area for uninitialized data
*/
if (bss_size != 0) {
vmaddr = virtual_offset + a_out->a_text + a_out->a_data;
- error = vm_map_find(&vmspace->vm_map, NULL, 0, &vmaddr,
+ error = vm_map_find(&vmspace->vm_map, NULL, 0, &vmaddr,
bss_size, FALSE, VM_PROT_ALL, VM_PROT_ALL, 0);
if (error)
goto fail;
@@ -229,7 +229,7 @@ exec_linux_imgact(struct image_params *imgp)
/* Fill in image_params */
imgp->interpreted = 0;
imgp->entry_addr = a_out->a_entry;
-
+
imgp->proc->p_sysent = &linux_sysvec;
fail:
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index 9448f3e..54593d3 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -6,7 +6,7 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
+ * notice, this list of conditions and the following disclaimer
* in this position and unchanged.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -318,7 +318,7 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
#ifdef DEBUG
if (ldebug(clone)) {
- printf(ARGS(clone, "flags %x, stack %x"),
+ printf(ARGS(clone, "flags %x, stack %x"),
(unsigned int)args->flags, (unsigned int)args->stack);
if (args->flags & CLONE_PID)
printf(LMSG("CLONE_PID not yet supported"));
@@ -395,9 +395,9 @@ linux_mmap2(struct thread *td, struct linux_mmap2_args *args)
#ifdef DEBUG
if (ldebug(mmap2))
- printf(ARGS(mmap2, "%p, %d, %d, 0x%08x, %d, %d"),
- (void *)args->addr, args->len, args->prot,
- args->flags, args->fd, args->pgoff);
+ printf(ARGS(mmap2, "%p, %d, %d, 0x%08x, %d, %d"),
+ (void *)args->addr, args->len, args->prot,
+ args->flags, args->fd, args->pgoff);
#endif
linux_args.addr = (l_caddr_t)args->addr;
diff --git a/sys/i386/linux/linux_ptrace.c b/sys/i386/linux/linux_ptrace.c
index 284c84a..530946a 100644
--- a/sys/i386/linux/linux_ptrace.c
+++ b/sys/i386/linux/linux_ptrace.c
@@ -346,7 +346,7 @@ linux_ptrace(struct thread *td, struct linux_ptrace_args *uap)
break;
#endif
/* FALL THROUGH */
- case PTRACE_GETFPXREGS: {
+ case PTRACE_GETFPXREGS: {
#ifdef CPU_ENABLE_SSE
struct proc *p;
struct thread *td2;
@@ -449,7 +449,7 @@ linux_ptrace(struct thread *td, struct linux_ptrace_args *uap)
map_regs_from_linux(&u.bsd_reg, &r.reg);
error = kern_ptrace(td, PT_SETREGS, pid, &u.bsd_reg, 0);
}
-
+
/*
* Simulate debug registers access
*/
@@ -459,7 +459,7 @@ linux_ptrace(struct thread *td, struct linux_ptrace_args *uap)
0);
if (error != 0)
break;
-
+
uap->addr -= LINUX_DBREG_OFFSET;
if (req == PTRACE_PEEKUSR) {
error = copyout((char *)&u.bsd_dbreg +
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index b476b48..407348d 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -6,7 +6,7 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
+ * notice, this list of conditions and the following disclaimer
* in this position and unchanged.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -115,15 +115,15 @@ static void linux_sendsig(sig_t catcher, int sig, sigset_t *mask,
* Linux syscalls return negative errno's, we do positive and map them
*/
static int bsd_to_linux_errno[ELAST + 1] = {
- -0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
- -10, -35, -12, -13, -14, -15, -16, -17, -18, -19,
- -20, -21, -22, -23, -24, -25, -26, -27, -28, -29,
- -30, -31, -32, -33, -34, -11,-115,-114, -88, -89,
- -90, -91, -92, -93, -94, -95, -96, -97, -98, -99,
+ -0, -1, -2, -3, -4, -5, -6, -7, -8, -9,
+ -10, -35, -12, -13, -14, -15, -16, -17, -18, -19,
+ -20, -21, -22, -23, -24, -25, -26, -27, -28, -29,
+ -30, -31, -32, -33, -34, -11,-115,-114, -88, -89,
+ -90, -91, -92, -93, -94, -95, -96, -97, -98, -99,
-100,-101,-102,-103,-104,-105,-106,-107,-108,-109,
-110,-111, -40, -36,-112,-113, -39, -11, -87,-122,
-116, -66, -6, -6, -6, -6, -6, -37, -38, -9,
- -6, -6, -43, -42, -75, -6, -84
+ -6, -6, -43, -42, -75, -6, -84
};
int bsd_to_linux_signal[LINUX_SIGTBLSZ] = {
@@ -230,9 +230,9 @@ elf_linux_fixup(register_t **stack_base, struct image_params *imgp)
{
Elf32_Auxargs *args = (Elf32_Auxargs *)imgp->auxargs;
register_t *pos;
-
- pos = *stack_base + (imgp->argc + imgp->envc + 2);
-
+
+ pos = *stack_base + (imgp->argc + imgp->envc + 2);
+
if (args->trace)
AUXARGS_ENTRY(pos, AT_DEBUG, 1);
if (args->execfd != -1)
@@ -251,8 +251,8 @@ elf_linux_fixup(register_t **stack_base, struct image_params *imgp)
AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid);
PROC_UNLOCK(imgp->proc);
AUXARGS_ENTRY(pos, AT_NULL, 0);
-
- free(imgp->auxargs, M_TEMP);
+
+ free(imgp->auxargs, M_TEMP);
imgp->auxargs = NULL;
(*stack_base)--;
@@ -266,9 +266,9 @@ extern unsigned long linux_sznonrtsigcode;
static void
linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
{
- register struct thread *td = curthread;
- register struct proc *p = td->td_proc;
- register struct trapframe *regs;
+ struct thread *td = curthread;
+ struct proc *p = td->td_proc;
+ struct trapframe *regs;
struct l_rt_sigframe *fp, frame;
int oonstack;
@@ -371,7 +371,7 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
* Build context to run handler in.
*/
regs->tf_esp = (int)fp;
- regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode) +
+ regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode) +
linux_sznonrtsigcode;
regs->tf_eflags &= ~(PSL_T | PSL_VM);
regs->tf_cs = _ucodesel;
@@ -396,9 +396,9 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
static void
linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
{
- register struct thread *td = curthread;
- register struct proc *p = td->td_proc;
- register struct trapframe *regs;
+ struct thread *td = curthread;
+ struct proc *p = td->td_proc;
+ struct trapframe *regs;
struct l_sigframe *fp, frame;
l_sigset_t lmask;
int oonstack, i;
@@ -508,7 +508,7 @@ linux_sigreturn(struct thread *td, struct linux_sigreturn_args *args)
{
struct proc *p = td->td_proc;
struct l_sigframe frame;
- register struct trapframe *regs;
+ struct trapframe *regs;
l_sigset_t lmask;
int eflags, i;
@@ -542,7 +542,7 @@ linux_sigreturn(struct thread *td, struct linux_sigreturn_args *args)
* allowing it is fairly harmless.
*/
if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF))
- return(EINVAL);
+ return(EINVAL);
/*
* Don't allow users to load a valid privileged %cs. Let the
@@ -605,7 +605,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args)
struct l_sigcontext *context;
l_stack_t *lss;
stack_t ss;
- register struct trapframe *regs;
+ struct trapframe *regs;
int eflags;
regs = td->td_frame;
@@ -640,7 +640,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args)
* allowing it is fairly harmless.
*/
if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF))
- return(EINVAL);
+ return(EINVAL);
/*
* Don't allow users to load a valid privileged %cs. Let the
@@ -757,12 +757,12 @@ linux_aout_coredump(struct thread *td, struct vnode *vp, off_t limit)
(caddr_t)trunc_page(USRSTACK - ctob(vm->vm_ssize)),
round_page(ctob(vm->vm_ssize)),
(off_t)ctob(uarea_pages + kstack_pages) +
- ctob(vm->vm_dsize), UIO_USERSPACE,
+ ctob(vm->vm_dsize), UIO_USERSPACE,
IO_UNIT | IO_DIRECT, cred, NOCRED, (int *) NULL, td);
return (error);
}
/*
- * If a linux binary is exec'ing something, try this image activator
+ * If a linux binary is exec'ing something, try this image activator
* first. We override standard shell script execution in order to
* be able to modify the interpreter path. We only do this if a linux
* binary is doing the exec, so we do not create an EXEC module for it.
@@ -810,12 +810,12 @@ struct sysentvec linux_sysvec = {
0xff,
LINUX_SIGTBLSZ,
bsd_to_linux_signal,
- ELAST + 1,
+ ELAST + 1,
bsd_to_linux_errno,
translate_traps,
linux_fixup,
linux_sendsig,
- linux_sigcode,
+ linux_sigcode,
&linux_szsigcode,
linux_prepsyscall,
"Linux a.out",
OpenPOWER on IntegriCloud