From 3e17f981b0084495991f61e5b083f070dd5ca4c9 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Thu, 12 May 2016 01:19:11 +0000 Subject: [PATCH] sys/boot/common: use of spaces vs. TAB. No functional change. --- sys/boot/common/interp_backslash.c | 20 +++++----- sys/boot/common/interp_forth.c | 4 +- sys/boot/common/isapnp.c | 62 +++++++++++++++--------------- sys/boot/common/module.c | 16 ++++---- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/sys/boot/common/interp_backslash.c b/sys/boot/common/interp_backslash.c index 3cbdd5b105ea..09b8f57bf029 100644 --- a/sys/boot/common/interp_backslash.c +++ b/sys/boot/common/interp_backslash.c @@ -21,7 +21,7 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" -#define DIGIT(x) (isdigit(x) ? (x) - '0' : islower(x) ? (x) + 10 - 'a' : (x) + 10 - 'A') +#define DIGIT(x) (isdigit(x) ? (x) - '0' : islower(x) ? (x) + 10 - 'a' : (x) + 10 - 'A') /* * backslash: Return malloc'd copy of str with all standard "backslash @@ -146,20 +146,20 @@ backslash(char *str) break; } } - else { - if (*str == '\\') { - seenbs = 1; - str++; - } + else { + if (*str == '\\') { + seenbs = 1; + str++; + } else new_str[i++] = *str++; - } + } } if (seenbs) { - /* - * The final character was a '\'. Put it in as a single backslash. - */ + /* + * The final character was a '\'. Put it in as a single backslash. + */ new_str[i++] = '\\'; } new_str[i] = '\0'; diff --git a/sys/boot/common/interp_forth.c b/sys/boot/common/interp_forth.c index 7137d3770922..aedac6af09a2 100644 --- a/sys/boot/common/interp_forth.c +++ b/sys/boot/common/interp_forth.c @@ -38,9 +38,9 @@ extern char bootprog_rev[]; /* #define BFORTH_DEBUG */ #ifdef BFORTH_DEBUG -# define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) +#define DEBUG(fmt, args...) printf("%s: " fmt "\n" , __func__ , ## args) #else -# define DEBUG(fmt, args...) +#define DEBUG(fmt, args...) #endif /* diff --git a/sys/boot/common/isapnp.c b/sys/boot/common/isapnp.c index a8efb28c7e1b..58676007248c 100644 --- a/sys/boot/common/isapnp.c +++ b/sys/boot/common/isapnp.c @@ -37,8 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include -#define inb(x) (archsw.arch_isainb((x))) -#define outb(x,y) (archsw.arch_isaoutb((x),(y))) +#define inb(x) (archsw.arch_isainb((x))) +#define outb(x,y) (archsw.arch_isaoutb((x),(y))) static void isapnp_write(int d, int r); static void isapnp_send_Initiation_LFSR(void); @@ -49,7 +49,7 @@ static void isapnp_enumerate(void); /* PnP read data port */ int isapnp_readport = 0; -#define _PNP_ID_LEN 9 +#define _PNP_ID_LEN 9 struct pnphandler isapnphandler = { @@ -129,20 +129,20 @@ isapnp_get_resource_info(u_int8_t *buffer, int len) u_char temp; for (i = 0; i < len; i++) { - outb(_PNP_ADDRESS, STATUS); - for (j = 0; j < 100; j++) { - if ((inb(isapnp_readport)) & 0x1) - break; - delay(1); - } - if (j == 100) { - printf("PnP device failed to report resource data\n"); - return(1); - } - outb(_PNP_ADDRESS, RESOURCE_DATA); - temp = inb(isapnp_readport); - if (buffer != NULL) - buffer[i] = temp; + outb(_PNP_ADDRESS, STATUS); + for (j = 0; j < 100; j++) { + if ((inb(isapnp_readport)) & 0x1) + break; + delay(1); + } + if (j == 100) { + printf("PnP device failed to report resource data\n"); + return(1); + } + outb(_PNP_ADDRESS, RESOURCE_DATA); + temp = inb(isapnp_readport); + if (buffer != NULL) + buffer[i] = temp; } return(0); } @@ -166,27 +166,27 @@ isapnp_scan_resdata(struct pnpinfo *pi) limit = 1000; while ((limit-- > 0) && !isapnp_get_resource_info(&tag, 1)) { - if (PNP_RES_TYPE(tag) == 0) { - /* Small resource */ - switch (PNP_SRES_NUM(tag)) { + if (PNP_RES_TYPE(tag) == 0) { + /* Small resource */ + switch (PNP_SRES_NUM(tag)) { - case COMP_DEVICE_ID: - /* Got a compatible device id resource */ - if (isapnp_get_resource_info(resinfo, PNP_SRES_LEN(tag))) + case COMP_DEVICE_ID: + /* Got a compatible device id resource */ + if (isapnp_get_resource_info(resinfo, PNP_SRES_LEN(tag))) return(1); pnp_addident(pi, pnp_eisaformat(resinfo)); - case END_TAG: + case END_TAG: return(0); - break; + break; - default: - /* Skip this resource */ - if (isapnp_get_resource_info(NULL, PNP_SRES_LEN(tag))) + default: + /* Skip this resource */ + if (isapnp_get_resource_info(NULL, PNP_SRES_LEN(tag))) return(1); - break; - } - } else { + break; + } + } else { /* Large resource */ if (isapnp_get_resource_info(resinfo, 2)) return(1); diff --git a/sys/boot/common/module.c b/sys/boot/common/module.c index 980813229dd8..f8baf988660c 100644 --- a/sys/boot/common/module.c +++ b/sys/boot/common/module.c @@ -105,7 +105,7 @@ command_load(int argc, char *argv[]) struct preloaded_file *fp; char *typestr; int dofile, dokld, ch, error; - + dokld = dofile = 0; optind = 1; optreset = 1; @@ -516,7 +516,7 @@ mod_loadkld(const char *kldname, int argc, char *argv[]) sprintf(command_errbuf, "can't find '%s'", kldname); return (ENOENT); } - /* + /* * Check if KLD already loaded */ fp = file_findfile(filename, NULL); @@ -525,7 +525,7 @@ mod_loadkld(const char *kldname, int argc, char *argv[]) free(filename); return (0); } - for (last_file = preloaded_files; + for (last_file = preloaded_files; last_file != NULL && last_file->f_next != NULL; last_file = last_file->f_next) ; @@ -584,7 +584,7 @@ file_findmodule(struct preloaded_file *fp, char *modname, if (fp == NULL) { for (fp = preloaded_files; fp; fp = fp->f_next) { mp = file_findmodule(fp, modname, verinfo); - if (mp) + if (mp) return (mp); } return (NULL); @@ -598,7 +598,7 @@ file_findmodule(struct preloaded_file *fp, char *modname, mver = mp->m_version; if (mver == verinfo->md_ver_preferred) return (mp); - if (mver >= verinfo->md_ver_minimum && + if (mver >= verinfo->md_ver_minimum && mver <= verinfo->md_ver_maximum && mver > bestver) { best = mp; @@ -784,7 +784,7 @@ mod_search_hints(struct moduledir *mdp, const char *modname, found = 1; break; } - if (ival >= verinfo->md_ver_minimum && + if (ival >= verinfo->md_ver_minimum && ival <= verinfo->md_ver_maximum && ival > bestver) { bestver = ival; @@ -886,7 +886,7 @@ file_discard(struct preloaded_file *fp) mp1 = mp; mp = mp->m_next; free(mp1); - } + } if (fp->f_name != NULL) free(fp->f_name); if (fp->f_type != NULL) @@ -904,7 +904,7 @@ struct preloaded_file * file_alloc(void) { struct preloaded_file *fp; - + if ((fp = malloc(sizeof(struct preloaded_file))) != NULL) { bzero(fp, sizeof(struct preloaded_file)); }