summaryrefslogtreecommitdiff
path: root/util/mkelfImage/main
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-04-27 06:56:47 +0000
committerStefan Reinauer <stepan@openbios.org>2010-04-27 06:56:47 +0000
commit14e22779625de673569c7b950ecc2753fb915b31 (patch)
tree14a6ed759e116e9e6e9bbd7f499b74b96d6cc072 /util/mkelfImage/main
parent0e1e8065e303030c39c3f2c27e5d32ee58a16c66 (diff)
downloadcoreboot-14e22779625de673569c7b950ecc2753fb915b31.tar.xz
Since some people disapprove of white space cleanups mixed in regular commits
while others dislike them being extra commits, let's clean them up once and for all for the existing code. If it's ugly, let it only be ugly once :-) Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5507 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/mkelfImage/main')
-rw-r--r--util/mkelfImage/main/mkelfImage.c22
-rw-r--r--util/mkelfImage/main/mkelfImage.man2
2 files changed, 12 insertions, 12 deletions
diff --git a/util/mkelfImage/main/mkelfImage.c b/util/mkelfImage/main/mkelfImage.c
index bb318b3f37..0dcc8c2fc1 100644
--- a/util/mkelfImage/main/mkelfImage.c
+++ b/util/mkelfImage/main/mkelfImage.c
@@ -71,7 +71,7 @@ uint16_t add_ipchksums(unsigned long offset, uint16_t sum, uint16_t new)
sum = ~sum & 0xFFFF;
new = ~new & 0xFFFF;
if (offset & 1) {
- /* byte swap the sum if it came from an odd offset
+ /* byte swap the sum if it came from an odd offset
* since the computation is endian independant this
* works.
*/
@@ -114,7 +114,7 @@ char *slurp_file(const char *filename, off_t *r_size)
off_t size, progress;
ssize_t result;
struct stat stats;
-
+
if (!filename) {
*r_size = 0;
@@ -305,7 +305,7 @@ static void serialize_notes(char *buf, struct memelfheader *ehdr)
notes = ehdr->e_notenum;
size = sizeof_notes(note, notes);
memset(buf, 0, size);
-
+
/* Write the Elf Notes */
offset = 0;
for(i = 0; i < notes; i++) {
@@ -317,11 +317,11 @@ static void serialize_notes(char *buf, struct memelfheader *ehdr)
hdr.n_type = cpu_to_elf32(ehdr, note[i].n_type);
/* Copy the note into the buffer */
- memcpy(buf + offset, &hdr, sizeof(hdr));
+ memcpy(buf + offset, &hdr, sizeof(hdr));
offset += sizeof(hdr);
- memcpy(buf + offset, note[i].n_name, n_namesz);
+ memcpy(buf + offset, note[i].n_name, n_namesz);
offset += roundup(n_namesz, 4);
- memcpy(buf + offset, note[i].n_desc, note[i].n_descsz);
+ memcpy(buf + offset, note[i].n_desc, note[i].n_descsz);
offset += roundup(note[i].n_descsz, 4);
}
@@ -382,7 +382,7 @@ static void serialize_phdrs(char *buf, struct memelfheader *ehdr, size_t note_si
size_t offset, note_offset;
if (ehdr->ei_class == ELFCLASS32) {
Elf32_Phdr *phdr = (Elf32_Phdr *)buf;
- note_offset =
+ note_offset =
sizeof(Elf32_Ehdr) + (sizeof(Elf32_Phdr)*ehdr->e_phnum);
offset = note_offset + note_size;
for(i = 0; i < ehdr->e_phnum; i++) {
@@ -406,7 +406,7 @@ static void serialize_phdrs(char *buf, struct memelfheader *ehdr, size_t note_si
}
else if (ehdr->ei_class == ELFCLASS64) {
Elf64_Phdr *phdr = (Elf64_Phdr *)buf;
- note_offset =
+ note_offset =
sizeof(Elf64_Ehdr) + (sizeof(Elf64_Phdr)*ehdr->e_phnum);
offset = note_offset + note_size;
for(i = 0; i < ehdr->e_phnum; i++) {
@@ -478,7 +478,7 @@ static void write_elf(struct memelfheader *ehdr, char *output)
if (ehdr->ei_class == ELFCLASS32) {
ehdr_size = sizeof(Elf32_Ehdr);
phdr_size = sizeof(Elf32_Phdr) * ehdr->e_phnum;
- }
+ }
else if (ehdr->ei_class == ELFCLASS64) {
ehdr_size = sizeof(Elf64_Ehdr);
phdr_size = sizeof(Elf64_Phdr) * ehdr->e_phnum;
@@ -505,7 +505,7 @@ static void write_elf(struct memelfheader *ehdr, char *output)
/* Compute the final form of the notes */
serialize_notes(buf + ehdr_size + phdr_size, ehdr);
-
+
/* Now write the elf image */
fd = open(output, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IRGRP | S_IROTH);
if (fd < 0) {
@@ -612,7 +612,7 @@ int main(int argc, char **argv)
}
}
fileind = optind;
-
+
/* Reset getopt for the next pass */
opterr = 1;
optind = 1;
diff --git a/util/mkelfImage/main/mkelfImage.man b/util/mkelfImage/main/mkelfImage.man
index f3f50d56d0..faf3613d47 100644
--- a/util/mkelfImage/main/mkelfImage.man
+++ b/util/mkelfImage/main/mkelfImage.man
@@ -1,5 +1,5 @@
.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
-.\" But now manually maintained
+.\" But now manually maintained
.\"
.\" Standard preamble:
.\" ========================================================================