aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:34 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:34 -0700
commitd833d2a97f0c6597bd0f8088adf7e91792ccd14a (patch)
treede525044bded39bb91bb5fe97acf8d3acd401caa /memdisk
parentebda41df24e56adf9da6f7e50412828e097a9ea7 (diff)
downloadsyslinux.git-d833d2a97f0c6597bd0f8088adf7e91792ccd14a.tar.gz
syslinux.git-d833d2a97f0c6597bd0f8088adf7e91792ccd14a.tar.xz
syslinux.git-d833d2a97f0c6597bd0f8088adf7e91792ccd14a.zip
Run Nindent on memdisk/e820test.c
Automatically reformat memdisk/e820test.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/e820test.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/memdisk/e820test.c b/memdisk/e820test.c
index 2de7fd4e..0bd6c4c4 100644
--- a/memdisk/e820test.c
+++ b/memdisk/e820test.c
@@ -27,62 +27,62 @@ void *sys_bounce; /* Dummy */
extern void parse_mem(void);
extern uint32_t dos_mem, low_mem, high_mem;
-void __attribute__((noreturn)) die(void)
+void __attribute__ ((noreturn)) die(void)
{
- abort();
+ abort();
}
-void printranges(void) {
- int i;
+void printranges(void)
+{
+ int i;
- for ( i = 0 ; i < nranges ; i++ ) {
- printf("%016llx %016llx %d\n",
- ranges[i].start,
- ranges[i+1].start - ranges[i].start,
- ranges[i].type);
- }
+ for (i = 0; i < nranges; i++) {
+ printf("%016llx %016llx %d\n",
+ ranges[i].start,
+ ranges[i + 1].start - ranges[i].start, ranges[i].type);
+ }
}
int main(void)
{
- uint64_t start, len;
- uint32_t type;
- char line[BUFSIZ], *p;
-
- e820map_init();
- printranges();
-
- while ( fgets(line, BUFSIZ, stdin) ) {
- p = strchr(line, ':');
- p = p ? p+1 : line;
- if ( sscanf(p, " %llx %llx %d", &start, &len, &type) == 3 ) {
- putchar('\n');
- printf("%016llx %016llx %d <-\n", start, len, type);
- putchar('\n');
- insertrange(start, len, type);
- printranges();
+ uint64_t start, len;
+ uint32_t type;
+ char line[BUFSIZ], *p;
+
+ e820map_init();
+ printranges();
+
+ while (fgets(line, BUFSIZ, stdin)) {
+ p = strchr(line, ':');
+ p = p ? p + 1 : line;
+ if (sscanf(p, " %llx %llx %d", &start, &len, &type) == 3) {
+ putchar('\n');
+ printf("%016llx %016llx %d <-\n", start, len, type);
+ putchar('\n');
+ insertrange(start, len, type);
+ printranges();
+ }
}
- }
- parse_mem();
+ parse_mem();
- putchar('\n');
- printf("DOS mem = %#10x (%u K)\n", dos_mem, dos_mem >> 10);
- printf("Low mem = %#10x (%u K)\n", low_mem, low_mem >> 10);
- printf("High mem = %#10x (%u K)\n", high_mem, high_mem >> 10);
- putchar('\n');
+ putchar('\n');
+ printf("DOS mem = %#10x (%u K)\n", dos_mem, dos_mem >> 10);
+ printf("Low mem = %#10x (%u K)\n", low_mem, low_mem >> 10);
+ printf("High mem = %#10x (%u K)\n", high_mem, high_mem >> 10);
+ putchar('\n');
- /* Now, steal a chunk (2K) of DOS memory and make sure it registered OK */
- insertrange(dos_mem-2048, 2048, 2, 1); /* Type 2 = reserved */
+ /* Now, steal a chunk (2K) of DOS memory and make sure it registered OK */
+ insertrange(dos_mem - 2048, 2048, 2, 1); /* Type 2 = reserved */
- printranges();
- parse_mem();
+ printranges();
+ parse_mem();
- putchar('\n');
- printf("DOS mem = %#10x (%u K)\n", dos_mem, dos_mem >> 10);
- printf("Low mem = %#10x (%u K)\n", low_mem, low_mem >> 10);
- printf("High mem = %#10x (%u K)\n", high_mem, high_mem >> 10);
- putchar('\n');
+ putchar('\n');
+ printf("DOS mem = %#10x (%u K)\n", dos_mem, dos_mem >> 10);
+ printf("Low mem = %#10x (%u K)\n", low_mem, low_mem >> 10);
+ printf("High mem = %#10x (%u K)\n", high_mem, high_mem >> 10);
+ putchar('\n');
- return 0;
+ return 0;
}