summaryrefslogtreecommitdiff
path: root/sbin/modload
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2002-06-09 08:13:10 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2002-06-09 08:13:10 +0000
commit3ed8b10a8df515c0cb5a2a6a0962c67f1c697164 (patch)
tree16644eb4e4232e2d2cd65fc342c5dbaafdc4e136 /sbin/modload
parentc021608bd50b74de1b8074e336f7adad03b1c7d8 (diff)
rm trailing whitespace
Diffstat (limited to 'sbin/modload')
-rw-r--r--sbin/modload/a.out.c14
-rw-r--r--sbin/modload/elf.c34
-rw-r--r--sbin/modload/modload.c22
-rw-r--r--sbin/modload/modload.h6
4 files changed, 38 insertions, 38 deletions
diff --git a/sbin/modload/a.out.c b/sbin/modload/a.out.c
index 84c720786d7..eca0958d67b 100644
--- a/sbin/modload/a.out.c
+++ b/sbin/modload/a.out.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: a.out.c,v 1.2 2002/01/09 00:02:52 ericj Exp $ */
+/* $OpenBSD: a.out.c,v 1.3 2002/06/09 08:13:07 todd Exp $ */
/* $NetBSD: a.out.c,v 1.1 1999/06/13 12:54:40 mrg Exp $ */
/*
@@ -69,15 +69,15 @@ extern int symtab;
void
a_out_linkcmd(char *buf,
size_t len,
- const char *kernel,
- const char *entry,
- const char *outfile,
- const void *address,
+ const char *kernel,
+ const char *entry,
+ const char *outfile,
+ const void *address,
const char *object)
{
ssize_t n;
- n = snprintf(buf, len, LINKCMD, kernel, entry,
+ n = snprintf(buf, len, LINKCMD, kernel, entry,
outfile, address, object);
if (n >= len)
errx(1, "link command longer than %lu bytes", (u_long)len);
@@ -93,7 +93,7 @@ a_out_read_header(int fd, struct exec *info_buf)
err(1, "failed reading %lu bytes", (u_long)sizeof(*info_buf));
if (n != sizeof(*info_buf)) {
if (debug)
- fprintf(stderr, "failed to read %lu bytes",
+ fprintf(stderr, "failed to read %lu bytes",
(u_long)sizeof(*info_buf));
return -1;
}
diff --git a/sbin/modload/elf.c b/sbin/modload/elf.c
index 08a3d484071..17dc2e3ef5c 100644
--- a/sbin/modload/elf.c
+++ b/sbin/modload/elf.c
@@ -1,8 +1,8 @@
-/* $OpenBSD: elf.c,v 1.2 2002/01/08 21:58:36 ericj Exp $ */
+/* $OpenBSD: elf.c,v 1.3 2002/06/09 08:13:07 todd Exp $ */
/* $NetBSD: elf.c,v 1.8 2002/01/03 21:45:58 jdolecek Exp $ */
/*
- * Copyright (c) 1998 Johan Danielsson <joda@pdc.kth.se>
+ * Copyright (c) 1998 Johan Danielsson <joda@pdc.kth.se>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -236,7 +236,7 @@ read_elf_header(int fd, Elf_Ehdr *ehdr)
ehdr->e_ident[EI_CLASS] != ELFCLASS)
errx(4, "not in ELF%u format", ELFSIZE);
if (ehdr->e_ehsize != ELF_HDR_SIZE)
- errx(4, "file has ELF%u identity, but wrong header size",
+ errx(4, "file has ELF%u identity, but wrong header size",
ELFSIZE);
return 0;
@@ -272,8 +272,8 @@ elf_mod_sizes(fd, modsize, strtablen, resrvp, sp)
continue;
}
if (debug)
- fprintf(stderr,
- "%s: addr = %p size = %#lx align = %#lx\n",
+ fprintf(stderr,
+ "%s: addr = %p size = %#lx align = %#lx\n",
s->name, s->addr, (u_long)s->size, (u_long)s->align);
/* XXX try to get rid of the hole before the data
section that GNU-ld likes to put there */
@@ -319,7 +319,7 @@ elf_mod_sizes(fd, modsize, strtablen, resrvp, sp)
* -R executable to link against
* -e entry point
* -o output file
- * -Ttext address to link text segment to in hex (assumes it's
+ * -Ttext address to link text segment to in hex (assumes it's
* a page boundry)
* -Tdata address to link data segment to in hex
* <target> object file */
@@ -332,20 +332,20 @@ elf_mod_sizes(fd, modsize, strtablen, resrvp, sp)
void
elf_linkcmd(char *buf,
size_t len,
- const char *kernel,
- const char *entry,
- const char *outfile,
- const void *address,
+ const char *kernel,
+ const char *entry,
+ const char *outfile,
+ const void *address,
const char *object)
{
ssize_t n;
if (data_offset == NULL)
- n = snprintf(buf, len, LINKCMD, kernel, entry,
+ n = snprintf(buf, len, LINKCMD, kernel, entry,
outfile, address, object);
else
- n = snprintf(buf, len, LINKCMD2, kernel, entry,
- outfile, address,
+ n = snprintf(buf, len, LINKCMD2, kernel, entry,
+ outfile, address,
(const char*)address + data_offset, object);
if (n >= len)
errx(1, "link command longer than %lu bytes", (u_long)len);
@@ -375,7 +375,7 @@ elf_mod_load(int fd)
&& (s->type != SHT_DYNSYM)) {
if (debug)
fprintf(stderr, "loading `%s': addr = %p, "
- "size = %#lx\n",
+ "size = %#lx\n",
s->name, s->addr, (u_long)s->size);
if (s->type == SHT_NOBITS) {
/* skip some space */
@@ -435,7 +435,7 @@ elf_mod_symload(strtablen)
err(12, "lseek");
if (read_elf_header(modfd, &ehdr) < 0)
return;
-
+
shstrtab = read_shstring_table(modfd, &ehdr);
read_sections(modfd, &ehdr, shstrtab, &head);
@@ -465,7 +465,7 @@ elf_mod_symload(strtablen)
for (s = head; s; s = s->next) {
struct elf_section *p = s;
-
+
if ((p->type == SHT_STRTAB)
&& (strcmp(p->name, ".strtab") == 0 )) {
if (debug)
@@ -482,7 +482,7 @@ elf_mod_symload(strtablen)
err(13, "malloc");
if (read(modfd, strbuf, p->size) != p->size)
err(14, "read");
-
+
loadsym(strbuf, p->size);
free(strbuf);
}
diff --git a/sbin/modload/modload.c b/sbin/modload/modload.c
index 0fb8c972aa7..9f1759e912f 100644
--- a/sbin/modload/modload.c
+++ b/sbin/modload/modload.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: modload.c,v 1.33 2002/02/16 21:27:35 millert Exp $ */
+/* $OpenBSD: modload.c,v 1.34 2002/06/09 08:13:07 todd Exp $ */
/* $NetBSD: modload.c,v 1.30 2001/11/08 15:33:15 christos Exp $ */
/*
@@ -71,16 +71,16 @@ static void cleanup(void);
/* prelink the module */
static int
-prelink(const char *kernel,
- const char *entry,
- const char *outfile,
- const void *address,
+prelink(const char *kernel,
+ const char *entry,
+ const char *outfile,
+ const void *address,
const char *object)
{
char cmdbuf[1024];
int error = 0;
- linkcmd(cmdbuf, sizeof(cmdbuf),
+ linkcmd(cmdbuf, sizeof(cmdbuf),
kernel, entry, outfile, address, object);
if (debug)
@@ -173,8 +173,8 @@ verify_entry(const char *entry, char *filename)
return n;
}
-/*
- * Transfer data to kernel memory in chunks
+/*
+ * Transfer data to kernel memory in chunks
* of MODIOBUF size at a time.
*/
void
@@ -210,8 +210,8 @@ loadspace(size_t len)
}
}
-/*
- * Transfer symbol table to kernel memory in chunks
+/*
+ * Transfer symbol table to kernel memory in chunks
* of MODIOBUF size at a time.
*/
void
@@ -339,7 +339,7 @@ main(int argc, char **argv)
errx(1, "can't prelink `%s' creating `%s'", modobj, out);
if (Sflag == 0)
fileopen |= OUTFILE_CREAT;
-
+
/*
* Pre-open the 0-linked module to get the size information
*/
diff --git a/sbin/modload/modload.h b/sbin/modload/modload.h
index e1940083881..e46de4261d6 100644
--- a/sbin/modload/modload.h
+++ b/sbin/modload/modload.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: modload.h,v 1.3 2002/02/17 19:42:28 millert Exp $ */
+/* $OpenBSD: modload.h,v 1.4 2002/06/09 08:13:07 todd Exp $ */
/* $NetBSD: modload.h,v 1.2 2001/11/08 15:33:15 christos Exp $ */
/*
@@ -39,14 +39,14 @@
int elf_mod_sizes(int, size_t *, int *, struct lmc_resrv *,
struct stat *);
void *elf_mod_load(int);
-void elf_linkcmd(char *, size_t, const char *, const char *,
+void elf_linkcmd(char *, size_t, const char *, const char *,
const char *, const void *, const char *);
void elf_mod_symload(int);
int a_out_mod_sizes(int, size_t *, int *, struct lmc_resrv *,
struct stat *);
void *a_out_mod_load(int);
-void a_out_linkcmd(char *, size_t, const char *, const char *,
+void a_out_linkcmd(char *, size_t, const char *, const char *,
const char *, const void *, const char *);
void a_out_mod_symload(int);