summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/lib/libsa/exec.c')
-rw-r--r--sys/lib/libsa/exec.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/sys/lib/libsa/exec.c b/sys/lib/libsa/exec.c
index 1af7bebd79d..4a42c8e893d 100644
--- a/sys/lib/libsa/exec.c
+++ b/sys/lib/libsa/exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.c,v 1.24 2005/12/11 12:24:46 christos Exp $ */
+/* $NetBSD: exec.c,v 1.25 2007/11/24 13:20:55 isaki Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@@ -48,10 +48,7 @@
#include "stand.h"
void
-exec(path, loadaddr, howto)
- char *path;
- char *loadaddr;
- int howto;
+exec(char *path, char *loadaddr, int howto)
{
#ifndef INSECURE
struct stat sb;
@@ -80,7 +77,7 @@ exec(path, loadaddr, howto)
return;
}
- /* Text */
+ /* Text */
printf("%ld", x.a_text);
addr = loadaddr;
if (N_GETMAGIC(x) == ZMAGIC) {
@@ -95,18 +92,18 @@ exec(path, loadaddr, howto)
while ((long)addr & (N_PAGSIZ(x) - 1))
*addr++ = 0;
- /* Data */
+ /* Data */
printf("+%ld", x.a_data);
if (read(io, addr, x.a_data) != (ssize_t)x.a_data)
goto shread;
addr += x.a_data;
- /* Bss */
+ /* Bss */
printf("+%ld", x.a_bss);
for (i = 0; i < (int)x.a_bss; i++)
*addr++ = 0;
- /* Symbols */
+ /* Symbols */
ssym = addr;
bcopy(&x.a_syms, addr, sizeof(x.a_syms));
addr += sizeof(x.a_syms);
@@ -126,7 +123,7 @@ exec(path, loadaddr, howto)
i -= sizeof(int);
addr += sizeof(int);
if (read(io, addr, i) != i)
- goto shread;
+ goto shread;
addr += i;
}
@@ -139,7 +136,7 @@ exec(path, loadaddr, howto)
#define round_to_size(x) \
(((int)(x) + sizeof(int) - 1) & ~(sizeof(int) - 1))
- esym = (char *)round_to_size(addr - loadaddr);
+ esym = (char *)round_to_size(addr - loadaddr);
#undef round_to_size
/* and note the end address of all this */
@@ -154,9 +151,9 @@ exec(path, loadaddr, howto)
*/
#ifdef EXEC_DEBUG
- printf("ssym=0x%x esym=0x%x\n", ssym, esym);
- printf("\n\nReturn to boot...\n");
- getchar();
+ printf("ssym=0x%x esym=0x%x\n", ssym, esym);
+ printf("\n\nReturn to boot...\n");
+ getchar();
#endif
machdep_start((char *)x.a_entry, howto, loadaddr, ssym, esym);