aboutsummaryrefslogtreecommitdiffstats
path: root/extlinux
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-05-03 17:32:15 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-05-03 17:32:15 -0700
commit28eecd8965aedbd75727fb0797a2e7033d5c54ee (patch)
tree1cac9ffc5f7fe7fd82d59b4accd7b8cf85762f74 /extlinux
parentf8c463722022008c8412a69f90576d2bf38818ed (diff)
downloadsyslinux-elf-28eecd8965aedbd75727fb0797a2e7033d5c54ee.tar.gz
syslinux-elf-28eecd8965aedbd75727fb0797a2e7033d5c54ee.tar.xz
syslinux-elf-28eecd8965aedbd75727fb0797a2e7033d5c54ee.zip
Across-the-board stealth whitespace cleanup
Diffstat (limited to 'extlinux')
-rw-r--r--extlinux/Makefile3
-rw-r--r--extlinux/ext2_fs.h4
-rw-r--r--extlinux/extlinux.c34
3 files changed, 19 insertions, 22 deletions
diff --git a/extlinux/Makefile b/extlinux/Makefile
index 3358f5af..a450a3dc 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
@@ -35,6 +35,3 @@ extlinux: $(OBJS)
$(CC) $(CFLAGS) -S -o $@ $<
-include .*.d
-
-
-
diff --git a/extlinux/ext2_fs.h b/extlinux/ext2_fs.h
index 6355d928..e0b4bbe1 100644
--- a/extlinux/ext2_fs.h
+++ b/extlinux/ext2_fs.h
@@ -172,7 +172,7 @@ struct ext2_group_desc
#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
#define EXT2_NOCOMP_FL 0x00000400 /* Don't compress */
#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
-/* End compression flags --- maybe not all used */
+/* End compression flags --- maybe not all used */
#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
@@ -345,7 +345,7 @@ struct ext2_super_block {
* the incompatible feature set is that if there is a bit set
* in the incompatible feature set that the kernel doesn't
* know about, it should refuse to mount the filesystem.
- *
+ *
* e2fsck's requirements are more strict; if it doesn't know
* about a feature in either the compatible or incompatible
* feature set, it must abort and not try to meddle with
diff --git a/extlinux/extlinux.c b/extlinux/extlinux.c
index 03e84295..c9520e8b 100644
--- a/extlinux/extlinux.c
+++ b/extlinux/extlinux.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 1998-2005 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -94,7 +94,7 @@ static const struct option long_options[] = {
{ "help", 0, NULL, 'h' },
{ 0, 0, 0, 0 }
};
-
+
static const char short_options[] = "iUuzS:H:vh";
@@ -146,7 +146,7 @@ enum bs_offsets {
bs32VolumeLabel = 71,
bs32FileSysType = 82,
bs32Code = 90,
-
+
bsSignature = 0x1fe
};
@@ -317,7 +317,7 @@ sectmap(int fd, uint32_t *sectors, int nsectors)
nblk = 0;
while ( nsectors ) {
-
+
blk = nblk++;
dprintf("querying block %u\n", blk);
if ( ioctl(fd, FIBMAP, &blk) )
@@ -400,7 +400,7 @@ get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo)
geo->cylinders = fd_str.track;
geo->start = 0;
return 0;
- }
+ }
/* Didn't work. Let's see if this is one of the standard geometries */
for ( gp = standard_geometries ; gp->bytes ; gp++ ) {
@@ -488,33 +488,33 @@ patch_file_and_bootblock(int fd, int dirfd, int devfd)
/* First sector need pointer in boot sector */
set_32(boot_block+0x1F8, *sectp++);
nsect--;
-
+
/* Search for LDLINUX_MAGIC to find the patch area */
for ( p = boot_image ; get_32(p) != LDLINUX_MAGIC ; p += 4 );
patcharea = p+8;
-
+
/* Set up the totals */
dw = boot_image_len >> 2; /* COMPLETE dwords! */
set_16(patcharea, dw);
set_16(patcharea+2, nsect); /* Does not include the first sector! */
set_32(patcharea+8, dirst.st_ino); /* "Current" directory */
-
+
/* Set the sector pointers */
p = patcharea+12;
-
+
memset(p, 0, 64*4);
while ( nsect-- ) {
set_32(p, *sectp++);
p += 4;
}
-
+
/* Now produce a checksum */
set_32(patcharea+4, 0);
csum = LDLINUX_MAGIC;
for ( i = 0, p = boot_image ; i < dw ; i++, p += 4 )
csum -= get_32(p); /* Negative checksum */
-
+
set_32(patcharea+4, csum);
}
@@ -536,7 +536,7 @@ install_bootblock(int fd, const char *device)
fprintf(stderr, "no ext2/ext3 superblock found on %s\n", device);
return 1;
}
-
+
if ( xpwrite(fd, boot_block, boot_block_len, 0) != boot_block_len ) {
perror("writing bootblock");
return 1;
@@ -565,7 +565,7 @@ install_file(const char *path, int devfd, struct stat *rst)
perror(path);
goto bail;
}
-
+
fd = open(file, O_RDONLY);
if ( fd < 0 ) {
if ( errno != ENOENT ) {
@@ -589,7 +589,7 @@ install_file(const char *path, int devfd, struct stat *rst)
perror(file);
goto bail;
}
-
+
/* Write it the first time */
if ( xpwrite(fd, boot_image, boot_image_len, 0) != boot_image_len ) {
fprintf(stderr, "%s: write failure on %s\n", program, file);
@@ -657,7 +657,7 @@ install_loader(const char *path, int update_only)
fprintf(stderr, "%s: Not a directory: %s\n", program, path);
return 1;
}
-
+
devfd = -1;
if ( (mtab = setmntent("/proc/mounts", "r")) ) {
@@ -692,12 +692,12 @@ install_loader(const char *path, int update_only)
fprintf(stderr, "%s: cannot open device %s\n", program, devname);
return 1;
}
-
+
if ( update_only && !already_installed(devfd) ) {
fprintf(stderr, "%s: no previous extlinux boot sector found\n", program);
return 1;
}
-
+
install_file(path, devfd, &fst);
if ( fst.st_dev != st.st_dev ) {