aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aic7xxx/aic7xxx_asm.c16
-rw-r--r--sys/dev/aic7xxx/aicasm.c16
-rw-r--r--sys/dev/aic7xxx/aicasm/aicasm.c16
-rw-r--r--sys/dev/cy/cy.c16
-rw-r--r--sys/dev/cy/cy_isa.c16
-rw-r--r--sys/dev/de/if_de.c50
-rw-r--r--sys/dev/ed/if_ed.c22
-rw-r--r--sys/dev/ed/if_edreg.h10
-rw-r--r--sys/dev/eisa/eisaconf.c4
-rw-r--r--sys/dev/eisa/eisaconf.h4
-rw-r--r--sys/dev/ep/if_ep.c30
-rw-r--r--sys/dev/ep/if_epreg.h26
-rw-r--r--sys/dev/fdc/fdc.c42
-rw-r--r--sys/dev/fe/if_fe.c18
-rw-r--r--sys/dev/ic/i8237.h4
-rw-r--r--sys/dev/ie/if_ie.c98
-rw-r--r--sys/dev/joy/joy.c12
-rw-r--r--sys/dev/lnc/if_lnc.c82
-rw-r--r--sys/dev/lnc/if_lncreg.h34
-rw-r--r--sys/dev/mcd/mcd.c44
-rw-r--r--sys/dev/mcd/mcdreg.h4
-rw-r--r--sys/dev/mse/mse.c20
-rw-r--r--sys/dev/pci/pci.c12
-rw-r--r--sys/dev/pci/pcivar.h6
-rw-r--r--sys/dev/ppbus/lptio.h8
-rw-r--r--sys/dev/scd/scd.c46
-rw-r--r--sys/dev/sio/sio.c24
-rw-r--r--sys/dev/snp/snp.c14
-rw-r--r--sys/dev/speaker/spkr.c6
-rw-r--r--sys/dev/syscons/syscons.c360
-rw-r--r--sys/dev/syscons/syscons.h4
-rw-r--r--sys/dev/vn/vn.c22
32 files changed, 543 insertions, 543 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx_asm.c b/sys/dev/aic7xxx/aic7xxx_asm.c
index 5f910d45bb28..e2745f094023 100644
--- a/sys/dev/aic7xxx/aic7xxx_asm.c
+++ b/sys/dev/aic7xxx/aic7xxx_asm.c
@@ -43,7 +43,7 @@
* are token separators.
*
*-M*************************************************************************/
-static char id[] = "$Id$";
+static char id[] = "$Id: aic7xxx_asm.c,v 1.8 1995/04/15 21:45:56 gibbs Exp $";
#include <ctype.h>
#include <stdio.h>
#include <string.h>
@@ -70,7 +70,7 @@ char *filename;
FILE *ifp, *ofp;
unsigned char M[MEMORY][4];
-void
+void
error(char *s)
{
fprintf(stderr, "%s: %s at line %d\n", filename, s, lineno);
@@ -107,7 +107,7 @@ typedef struct sym_t {
struct sym_t *next; /* MUST BE FIRST */
char *name;
int value;
- int npatch;
+ int npatch;
int *patch;
} sym_t;
@@ -151,7 +151,7 @@ lookup(char *name)
return(NULL);
}
-void
+void
patch(sym_t *p, int location)
{
p->npatch += 1;
@@ -244,7 +244,7 @@ rescan:
else
error("too many tokens");
if (quote) {
- quote++;
+ quote++;
p = strchr(quote, '\"');
if (!p)
error("unterminated string constant");
@@ -256,7 +256,7 @@ rescan:
else
error("too many tokens");
goto rescan;
- }
+ }
if (i) {
*n = i;
return(a);
@@ -336,7 +336,7 @@ struct {
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
-int
+int
eval_operand(char **a, int spec)
{
int i;
@@ -604,7 +604,7 @@ main(int argc, char **argv)
}
break;
case 'h':
- printf("usage: %s [-d] [-Dname] [-ooutput] input\n",
+ printf("usage: %s [-d] [-Dname] [-ooutput] input\n",
*argv);
exit(EXIT_SUCCESS);
break;
diff --git a/sys/dev/aic7xxx/aicasm.c b/sys/dev/aic7xxx/aicasm.c
index 5f910d45bb28..e2745f094023 100644
--- a/sys/dev/aic7xxx/aicasm.c
+++ b/sys/dev/aic7xxx/aicasm.c
@@ -43,7 +43,7 @@
* are token separators.
*
*-M*************************************************************************/
-static char id[] = "$Id$";
+static char id[] = "$Id: aic7xxx_asm.c,v 1.8 1995/04/15 21:45:56 gibbs Exp $";
#include <ctype.h>
#include <stdio.h>
#include <string.h>
@@ -70,7 +70,7 @@ char *filename;
FILE *ifp, *ofp;
unsigned char M[MEMORY][4];
-void
+void
error(char *s)
{
fprintf(stderr, "%s: %s at line %d\n", filename, s, lineno);
@@ -107,7 +107,7 @@ typedef struct sym_t {
struct sym_t *next; /* MUST BE FIRST */
char *name;
int value;
- int npatch;
+ int npatch;
int *patch;
} sym_t;
@@ -151,7 +151,7 @@ lookup(char *name)
return(NULL);
}
-void
+void
patch(sym_t *p, int location)
{
p->npatch += 1;
@@ -244,7 +244,7 @@ rescan:
else
error("too many tokens");
if (quote) {
- quote++;
+ quote++;
p = strchr(quote, '\"');
if (!p)
error("unterminated string constant");
@@ -256,7 +256,7 @@ rescan:
else
error("too many tokens");
goto rescan;
- }
+ }
if (i) {
*n = i;
return(a);
@@ -336,7 +336,7 @@ struct {
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
-int
+int
eval_operand(char **a, int spec)
{
int i;
@@ -604,7 +604,7 @@ main(int argc, char **argv)
}
break;
case 'h':
- printf("usage: %s [-d] [-Dname] [-ooutput] input\n",
+ printf("usage: %s [-d] [-Dname] [-ooutput] input\n",
*argv);
exit(EXIT_SUCCESS);
break;
diff --git a/sys/dev/aic7xxx/aicasm/aicasm.c b/sys/dev/aic7xxx/aicasm/aicasm.c
index 5f910d45bb28..e2745f094023 100644
--- a/sys/dev/aic7xxx/aicasm/aicasm.c
+++ b/sys/dev/aic7xxx/aicasm/aicasm.c
@@ -43,7 +43,7 @@
* are token separators.
*
*-M*************************************************************************/
-static char id[] = "$Id$";
+static char id[] = "$Id: aic7xxx_asm.c,v 1.8 1995/04/15 21:45:56 gibbs Exp $";
#include <ctype.h>
#include <stdio.h>
#include <string.h>
@@ -70,7 +70,7 @@ char *filename;
FILE *ifp, *ofp;
unsigned char M[MEMORY][4];
-void
+void
error(char *s)
{
fprintf(stderr, "%s: %s at line %d\n", filename, s, lineno);
@@ -107,7 +107,7 @@ typedef struct sym_t {
struct sym_t *next; /* MUST BE FIRST */
char *name;
int value;
- int npatch;
+ int npatch;
int *patch;
} sym_t;
@@ -151,7 +151,7 @@ lookup(char *name)
return(NULL);
}
-void
+void
patch(sym_t *p, int location)
{
p->npatch += 1;
@@ -244,7 +244,7 @@ rescan:
else
error("too many tokens");
if (quote) {
- quote++;
+ quote++;
p = strchr(quote, '\"');
if (!p)
error("unterminated string constant");
@@ -256,7 +256,7 @@ rescan:
else
error("too many tokens");
goto rescan;
- }
+ }
if (i) {
*n = i;
return(a);
@@ -336,7 +336,7 @@ struct {
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
-int
+int
eval_operand(char **a, int spec)
{
int i;
@@ -604,7 +604,7 @@ main(int argc, char **argv)
}
break;
case 'h':
- printf("usage: %s [-d] [-Dname] [-ooutput] input\n",
+ printf("usage: %s [-d] [-Dname] [-ooutput] input\n",
*argv);
exit(EXIT_SUCCESS);
break;
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index a37292e6d460..fd898f24e23e 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.5 1995/03/28 07:55:25 bde Exp $
+ * $Id: cy.c,v 1.6 1995/03/28 12:29:11 bde Exp $
*/
/*
@@ -99,7 +99,7 @@
#define PollMode /* use polling-based irq service routine, not the
* hardware svcack lines. Must be defined for
* cyclom-16y boards.
- *
+ *
* XXX cyclom-8y doesn't work without this defined
* either (!)
*/
@@ -172,7 +172,7 @@ void delay(int delay);
/* Better get rid of this until the core people agree on kernel interfaces.
At least it will then compile on both WhichBSDs.
- */
+ */
#if 0
extern unsigned int delaycount; /* calibrated 1 ms cpu-spin delay */
#endif
@@ -546,7 +546,7 @@ service_upper_rx(int unit)
#ifdef FastRawInput
/* try to avoid calling the line discipline stuff if we can */
if ((tp->t_line == 0) &&
- !(tp->t_iflag & (ICRNL | IMAXBEL | INLCR)) &&
+ !(tp->t_iflag & (ICRNL | IMAXBEL | INLCR)) &&
!(tp->t_lflag & (ECHO | ECHONL | ICANON | IEXTEN |
ISIG | PENDIN)) &&
!(tp->t_state & (TS_CNTTB | TS_LNCH))) {
@@ -1321,11 +1321,11 @@ cyparam(struct tty *tp, struct termios *t)
if (iflag & IXOFF)
opt |= 1 << 6; /* auto XOFF output flow-control */
#endif
-#ifndef ALWAYS_RTS_CTS
+#ifndef ALWAYS_RTS_CTS
if (cflag & CCTS_OFLOW)
#endif
opt |= 1 << 1; /* auto CTS flow-control */
-
+
if (opt != infop->cor[1]) {
cor_change |= 1 << 2;
*(base + CD1400_COR2) = opt;
@@ -1560,7 +1560,7 @@ cyspeed(int speed, int *prescaler_io)
static void
cd1400_channel_cmd(cy_addr base, u_char cmd)
{
- /* XXX hsu@clinet.fi: This is always more dependent on ISA bus speed,
+ /* XXX hsu@clinet.fi: This is always more dependent on ISA bus speed,
as the card is probed every round? Replaced delaycount with 8k.
Either delaycount has to be implemented in FreeBSD or more sensible
way of doing these should be implemented. DELAY isn't enough here.
@@ -1570,7 +1570,7 @@ cd1400_channel_cmd(cy_addr base, u_char cmd)
/* wait for processing of previous command to complete */
while (*(base + CD1400_CCR) && maxwait--)
;
-
+
if (!maxwait)
log(LOG_ERR, "cy: channel command timeout (%d loops) - arrgh\n",
5 * 8 * 1024);
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index a37292e6d460..fd898f24e23e 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.5 1995/03/28 07:55:25 bde Exp $
+ * $Id: cy.c,v 1.6 1995/03/28 12:29:11 bde Exp $
*/
/*
@@ -99,7 +99,7 @@
#define PollMode /* use polling-based irq service routine, not the
* hardware svcack lines. Must be defined for
* cyclom-16y boards.
- *
+ *
* XXX cyclom-8y doesn't work without this defined
* either (!)
*/
@@ -172,7 +172,7 @@ void delay(int delay);
/* Better get rid of this until the core people agree on kernel interfaces.
At least it will then compile on both WhichBSDs.
- */
+ */
#if 0
extern unsigned int delaycount; /* calibrated 1 ms cpu-spin delay */
#endif
@@ -546,7 +546,7 @@ service_upper_rx(int unit)
#ifdef FastRawInput
/* try to avoid calling the line discipline stuff if we can */
if ((tp->t_line == 0) &&
- !(tp->t_iflag & (ICRNL | IMAXBEL | INLCR)) &&
+ !(tp->t_iflag & (ICRNL | IMAXBEL | INLCR)) &&
!(tp->t_lflag & (ECHO | ECHONL | ICANON | IEXTEN |
ISIG | PENDIN)) &&
!(tp->t_state & (TS_CNTTB | TS_LNCH))) {
@@ -1321,11 +1321,11 @@ cyparam(struct tty *tp, struct termios *t)
if (iflag & IXOFF)
opt |= 1 << 6; /* auto XOFF output flow-control */
#endif
-#ifndef ALWAYS_RTS_CTS
+#ifndef ALWAYS_RTS_CTS
if (cflag & CCTS_OFLOW)
#endif
opt |= 1 << 1; /* auto CTS flow-control */
-
+
if (opt != infop->cor[1]) {
cor_change |= 1 << 2;
*(base + CD1400_COR2) = opt;
@@ -1560,7 +1560,7 @@ cyspeed(int speed, int *prescaler_io)
static void
cd1400_channel_cmd(cy_addr base, u_char cmd)
{
- /* XXX hsu@clinet.fi: This is always more dependent on ISA bus speed,
+ /* XXX hsu@clinet.fi: This is always more dependent on ISA bus speed,
as the card is probed every round? Replaced delaycount with 8k.
Either delaycount has to be implemented in FreeBSD or more sensible
way of doing these should be implemented. DELAY isn't enough here.
@@ -1570,7 +1570,7 @@ cd1400_channel_cmd(cy_addr base, u_char cmd)
/* wait for processing of previous command to complete */
while (*(base + CD1400_CCR) && maxwait--)
;
-
+
if (!maxwait)
log(LOG_ERR, "cy: channel command timeout (%d loops) - arrgh\n",
5 * 8 * 1024);
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index 2767cceb9f9a..7a0eee7ca165 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_de.c,v 1.26 1995/05/22 13:32:24 davidg Exp $
+ * $Id: if_de.c,v 1.27 1995/05/26 02:02:44 davidg Exp $
*
*/
@@ -187,7 +187,7 @@ typedef struct {
* And the number of receive descriptors multiplied by the size
* of the receive buffers must equal the recevive space. This
* is so that we can manipulate the page tables so that even if a
- * packet wraps around the end of the receive space, we can
+ * packet wraps around the end of the receive space, we can
* treat it as virtually contiguous.
*
* The above used to be true (the stupid restriction is still true)
@@ -257,7 +257,7 @@ struct _tulip_softc_t {
#ifndef IFF_ALTPHYS
#define IFF_ALTPHYS IFF_LINK0 /* In case it isn't defined */
#endif
-static const char *tulip_chipdescs[] = {
+static const char *tulip_chipdescs[] = {
"DC21040 [10Mb/s]",
"DC21140 [10-100Mb/s]",
"DC21041 [10Mb/s]"
@@ -500,7 +500,7 @@ tulip_reset(
tulip_desc_t *di;
TULIP_WRITE_CSR(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
+ DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
33MHz that comes to two microseconds but wait a
bit longer anyways) */
@@ -532,7 +532,7 @@ tulip_reset(
di->d_status = 0;
/*
- * We need to collect all the mbufs were on the
+ * We need to collect all the mbufs were on the
* receive ring before we reinit it either to put
* them back on or to know if we have to allocate
* more.
@@ -648,7 +648,7 @@ tulip_rx_intr(
if (((volatile tulip_desc_t *) eop)->d_status & TULIP_DSTS_OWNER)
break;
-
+
total_len = ((eop->d_status >> 16) & 0x7FF) - 4;
IF_DEQUEUE(&sc->tulip_rxq, m);
if ((eop->d_status & TULIP_DSTS_ERRSUM) == 0) {
@@ -1056,8 +1056,8 @@ tulip_idle_srom(
tulip_softc_t * const sc)
{
unsigned bit, csr;
-
- csr = SROMSEL | SROMRD; EMIT;
+
+ csr = SROMSEL | SROMRD; EMIT;
csr ^= SROMCS; EMIT;
csr ^= SROMCLKON; EMIT;
@@ -1073,12 +1073,12 @@ tulip_idle_srom(
csr = 0; EMIT;
}
-
+
static void
tulip_read_srom(
tulip_softc_t * const sc)
-{
- int idx;
+{
+ int idx;
const unsigned bitwidth = SROM_BITWIDTH;
const unsigned cmdmask = (SROMCMD_RD << bitwidth);
const unsigned msb = 1 << (bitwidth + 3 - 1);
@@ -1091,7 +1091,7 @@ tulip_read_srom(
csr = SROMSEL | SROMRD; EMIT;
csr ^= SROMCSON; EMIT;
csr ^= SROMCLKON; EMIT;
-
+
lastbit = 0;
for (bits = idx|cmdmask, bit = bitwidth + 3; bit > 0; bit--, bits <<= 1) {
const unsigned thisbit = bits & msb;
@@ -1106,7 +1106,7 @@ tulip_read_srom(
for (data = 0, bits = 0; bits < 16; bits++) {
data <<= 1;
- csr ^= SROMCLKON; EMIT; /* clock high; data valid */
+ csr ^= SROMCLKON; EMIT; /* clock high; data valid */
data |= TULIP_READ_CSR(sc, csr_srom_mii) & SROMDIN ? 1 : 0;
csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */
}
@@ -1227,7 +1227,7 @@ tulip_read_macaddr(
if (cksum >= 65535) cksum -= 65535;
rom_cksum = *(u_short *) &sc->tulip_rombuf[6];
-
+
if (cksum != rom_cksum)
return -1;
@@ -1274,8 +1274,8 @@ tulip_addr_filter(
ETHER_NEXT_MULTI(step, enm);
}
sc->tulip_flags |= TULIP_WANTHASH;
- sp[39] = ((u_short *) sc->tulip_ac.ac_enaddr)[0];
- sp[40] = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
+ sp[39] = ((u_short *) sc->tulip_ac.ac_enaddr)[0];
+ sp[40] = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
sp[41] = ((u_short *) sc->tulip_ac.ac_enaddr)[2];
} else {
/*
@@ -1284,8 +1284,8 @@ tulip_addr_filter(
i = 0;
ETHER_FIRST_MULTI(step, &sc->tulip_ac, enm);
for (; enm != NULL; i++) {
- *sp++ = ((u_short *) enm->enm_addrlo)[0];
- *sp++ = ((u_short *) enm->enm_addrlo)[1];
+ *sp++ = ((u_short *) enm->enm_addrlo)[0];
+ *sp++ = ((u_short *) enm->enm_addrlo)[1];
*sp++ = ((u_short *) enm->enm_addrlo)[2];
ETHER_NEXT_MULTI(step, enm);
}
@@ -1302,8 +1302,8 @@ tulip_addr_filter(
* Pad the rest with our hardware address
*/
for (; i < 16; i++) {
- *sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[0];
- *sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
+ *sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[0];
+ *sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[1];
*sp++ = ((u_short *) sc->tulip_ac.ac_enaddr)[2];
}
}
@@ -1441,11 +1441,11 @@ tulip_attach(
ifp->if_ioctl = tulip_ioctl;
ifp->if_output = ether_output;
ifp->if_start = tulip_start;
-
+
#ifdef __FreeBSD__
printf("%s%d", sc->tulip_name, sc->tulip_unit);
#endif
- printf(": %s%s pass %d.%d Ethernet address %s\n",
+ printf(": %s%s pass %d.%d Ethernet address %s\n",
sc->tulip_boardsw->bd_description,
tulip_chipdescs[sc->tulip_chipid],
(sc->tulip_revinfo & 0xF0) >> 4,
@@ -1550,7 +1550,7 @@ tulip_pci_shutdown(
if (kdc->kdc_unit < NDE) {
tulip_softc_t * const sc = TULIP_UNIT_TO_SOFTC(kdc->kdc_unit);
TULIP_WRITE_CSR(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
+ DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
33MHz that comes to two microseconds but wait a
bit longer anyways) */
}
@@ -1595,7 +1595,7 @@ tulip_pci_shutdown(
{
tulip_softc_t * const sc = (tulip_softc_t *) arg;
TULIP_WRITE_CSR(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
+ DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
33MHz that comes to two microseconds but wait a
bit longer anyways) */
}
@@ -1684,7 +1684,7 @@ tulip_pci_shutdown(
{
tulip_softc_t * const sc = (tulip_softc_t *) arg;
TULIP_WRITE_CSR(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
+ DELAY(10); /* Wait 10 microsends (actually 50 PCI cycles but at
33MHz that comes to two microseconds but wait a
bit longer anyways) */
}
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index d4d29f87e363..100d8f737582 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
- * $Id: if_ed.c,v 1.71 1995/05/12 22:39:40 davidg Exp $
+ * $Id: if_ed.c,v 1.72 1995/05/14 11:01:20 davidg Exp $
*/
#include "ed.h"
@@ -363,11 +363,11 @@ ed_probe_WD80x3(isa_dev)
isa16bit = 1;
memsize = 16384;
sc->type_str = "WD8013EP";
- sc->kdc.kdc_description =
+ sc->kdc.kdc_description =
"Ethernet adapter: WD 8013EP";
} else {
sc->type_str = "WD8003EP";
- sc->kdc.kdc_description =
+ sc->kdc.kdc_description =
"Ethernet adapter: WD 8003EP";
}
break;
@@ -407,7 +407,7 @@ ed_probe_WD80x3(isa_dev)
break;
case ED_TYPE_SMC8216T:
sc->type_str = "SMC8216T";
- sc->kdc.kdc_description =
+ sc->kdc.kdc_description =
"Ethernet adapter: SMC 8216T";
outb(sc->asic_addr + ED_WD790_HWR,
@@ -1376,7 +1376,7 @@ ed_init(unit)
/*
* Enable the following interrupts: receive/transmit complete,
* receive/transmit error, and Receiver OverWrite.
- *
+ *
* Counter overflow and Remote DMA complete are *not* enabled.
*/
outb(sc->nic_addr + ED_P0_IMR,
@@ -2060,8 +2060,8 @@ ed_ioctl(ifp, command, data)
ed_init(ifp->if_unit);
}
/* UP controls BUSY/IDLE */
- sc->kdc.kdc_state = ((ifp->if_flags & IFF_UP)
- ? DC_BUSY
+ sc->kdc.kdc_state = ((ifp->if_flags & IFF_UP)
+ ? DC_BUSY
: DC_IDLE);
#if NBPFILTER > 0
@@ -2327,7 +2327,7 @@ ed_pio_write_mbufs(sc, m, dst)
outb(sc->nic_addr + ED_P0_CR, ED_CR_RD1 | ED_CR_STA);
/*
- * Transfer the mbuf chain to the NIC memory.
+ * Transfer the mbuf chain to the NIC memory.
* 16-bit cards require that data be transferred as words, and only words.
* So that case requires some extra code to patch over odd-length mbufs.
*/
@@ -2336,7 +2336,7 @@ ed_pio_write_mbufs(sc, m, dst)
/* NE1000s are easy */
while (m) {
if (m->m_len) {
- outsb(sc->asic_addr + ED_NOVELL_DATA,
+ outsb(sc->asic_addr + ED_NOVELL_DATA,
m->m_data, m->m_len);
}
m = m->m_next;
@@ -2346,7 +2346,7 @@ ed_pio_write_mbufs(sc, m, dst)
unsigned char *data;
int len, wantbyte;
unsigned char savebyte[2];
-
+
wantbyte = 0;
while (m) {
@@ -2363,7 +2363,7 @@ ed_pio_write_mbufs(sc, m, dst)
}
/* output contiguous words */
if (len > 1) {
- outsw(sc->asic_addr + ED_NOVELL_DATA,
+ outsw(sc->asic_addr + ED_NOVELL_DATA,
data, len >> 1);
data += len & ~1;
len &= 1;
diff --git a/sys/dev/ed/if_edreg.h b/sys/dev/ed/if_edreg.h
index 31f78795a9bf..430fa9393602 100644
--- a/sys/dev/ed/if_edreg.h
+++ b/sys/dev/ed/if_edreg.h
@@ -6,10 +6,10 @@
* of this software, nor does the author assume any responsibility
* for damages incurred with its use.
*
- * $Id: if_edreg.h,v 1.16 1994/08/04 17:42:35 davidg Exp $
+ * $Id: if_edreg.h,v 1.17 1995/01/23 19:06:08 davidg Exp $
*/
/*
- * National Semiconductor DS8390 NIC register definitions
+ * National Semiconductor DS8390 NIC register definitions
*
*
* Modification history
@@ -26,10 +26,10 @@
* changed double buffering flag to multi buffering
* made changes/additions for 3c503 multi-buffering
* ...companion to Rev. 2.0 of 'ed' driver.
- *
+ *
* Revision 1.1 93/06/23 03:01:07 davidg
* Initial revision
- *
+ *
*/
/*
@@ -378,7 +378,7 @@
* algorithm to allow prioritization of nodes.
*/
#define ED_TCR_OFST 0x10
-
+
/*
* bits 5, 6, and 7 are unused/reserved
*/
diff --git a/sys/dev/eisa/eisaconf.c b/sys/dev/eisa/eisaconf.c
index 2aad5d2c6fc0..ca6baf3f0cd8 100644
--- a/sys/dev/eisa/eisaconf.c
+++ b/sys/dev/eisa/eisaconf.c
@@ -13,7 +13,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: eisaconf.c,v 1.1 1995/03/13 09:10:17 root Exp root $
+ * $Id: eisaconf.c,v 1.1 1995/04/23 08:55:41 julian Exp $
*/
/*
@@ -61,7 +61,7 @@ eisa_configure()
if (productID & 0x80) {
printf("Warning: running EISA kernel on non-EISA system board\n");
return;
- }
+ }
printf("Probing for devices on EISA bus\n");
productID = (productID<<8) | inb(eisaBase+1);
productRevision = inb(eisaBase+2);
diff --git a/sys/dev/eisa/eisaconf.h b/sys/dev/eisa/eisaconf.h
index b0a0cbb27779..9b16c23543fa 100644
--- a/sys/dev/eisa/eisaconf.h
+++ b/sys/dev/eisa/eisaconf.h
@@ -13,14 +13,14 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: eisaconf.h,v 1.1 1995/03/13 09:10:17 root Exp root $
+ * $Id: eisaconf.h,v 1.1 1995/04/23 08:55:42 julian Exp $
*/
/*
* Ported to run under FreeBSD by Julian Elischer (julian@tfs.com) Sept 1992
*/
-#define EISA_SLOTS 10 /* PCI clashes with higher ones.. fix later */
+#define EISA_SLOTS 10 /* PCI clashes with higher ones.. fix later */
struct eisa_dev {
char productID[4];
unsigned short productType;
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index de75d41e72c6..3b677d6a9994 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -32,13 +32,13 @@
/*
* Modified from the FreeBSD 1.1.5.1 version by:
- * Andres Vega Garcia
+ * Andres Vega Garcia
* INRIA - Sophia Antipolis, France
* avega@sophia.inria.fr
*/
/*
- * $Id: if_ep.c,v 1.26 1995/04/12 20:47:49 wollman Exp $
+ * $Id: if_ep.c,v 1.27 1995/05/27 04:40:57 davidg Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -183,7 +183,7 @@ ep_look_for_board_at(is)
if (ep_current_tag == (EP_LAST_TAG + 1)) {
/* Come here just one time */
-
+
/* Look for the EISA boards, leave them activated */
for(j = 1; j < 16; j++) {
io_base = (j * EP_EISA_START) | EP_EISA_W0;
@@ -191,7 +191,7 @@ ep_look_for_board_at(is)
continue;
/* we must found 0x1f if the board is EISA configurated */
- if ((inw(io_base + EP_W0_ADDRESS_CFG) & 0x1f) != 0x1f)
+ if ((inw(io_base + EP_W0_ADDRESS_CFG) & 0x1f) != 0x1f)
continue;
/* Reset and Enable the card */
@@ -270,7 +270,7 @@ ep_look_for_board_at(is)
} else {
for (i=0; ep_board[i].epb_addr && ep_board[i].epb_addr != IS_BASE; i++);
- if( ep_board[i].epb_used || ep_board[i].epb_addr != IS_BASE)
+ if( ep_board[i].epb_used || ep_board[i].epb_addr != IS_BASE)
return 0;
if (inw(IS_BASE + EP_W0_EEPROM_COMMAND) & EEPROM_TST_MODE)
@@ -455,10 +455,10 @@ epattach(is)
sc->rx_avg_pkt = 128;
/*
- * NOTE: In all this I multiply everything by 64.
- * W_s = the speed the CPU is able to write to the TX FIFO.
+ * NOTE: In all this I multiply everything by 64.
+ * W_s = the speed the CPU is able to write to the TX FIFO.
* T_s = the speed the board sends the info to the Ether.
- * W_s/T_s = 16 (represents 16/64) => W_s = 25 % of T_s.
+ * W_s/T_s = 16 (represents 16/64) => W_s = 25 % of T_s.
* This will give us for a packet of 1500 bytes
* tx_start_thresh=1125 and for a pkt of 64 bytes tx_start_threshold=48.
* We prefer to start thinking the CPU is much slower than the Ethernet
@@ -814,7 +814,7 @@ rescan:
sc->rx_no_first, sc->rx_no_mbuf, sc->rx_bpf_disc, sc->rx_overrunf,
sc->rx_overrunl, sc->tx_underrun);
#else
- printf("ep%d: Status: %x\n", unit, status);
+ printf("ep%d: Status: %x\n", unit, status);
#endif
epinit(unit);
splx(x);
@@ -865,7 +865,7 @@ rescan:
outw(BASE + EP_COMMAND, C_INTR_LATCH); /* ACK int Latch */
- if ((status = inw(BASE + EP_STATUS)) & S_5_INTS)
+ if ((status = inw(BASE + EP_STATUS)) & S_5_INTS)
goto rescan;
/* re-enable Ints */
@@ -1195,17 +1195,17 @@ epioctl(ifp, cmd, data)
sizeof(sc->sc_addr));
break;
#endif
- case SIOCSIFMTU:
+ case SIOCSIFMTU:
/*
* Set the interface MTU.
*/
- if (ifr->ifr_mtu > ETHERMTU) {
- error = EINVAL;
+ if (ifr->ifr_mtu > ETHERMTU) {
+ error = EINVAL;
} else {
- ifp->if_mtu = ifr->ifr_mtu;
+ ifp->if_mtu = ifr->ifr_mtu;
}
- break;
+ break;
default:
error = EINVAL;
diff --git a/sys/dev/ep/if_epreg.h b/sys/dev/ep/if_epreg.h
index a905caaaa349..e0b7d09834c6 100644
--- a/sys/dev/ep/if_epreg.h
+++ b/sys/dev/ep/if_epreg.h
@@ -1,13 +1,13 @@
/*
* Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. 2. The name
* of the author may not be used to endorse or promote products derived from
* this software withough specific prior written permission
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
@@ -18,20 +18,20 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* if_epreg.h,v 1.4 1994/11/13 10:12:37 gibbs Exp Modified by:
- *
+ *
October 2, 1994
-
- Modified by: Andres Vega Garcia
- INRIA - Sophia Antipolis, France
- e-mail: avega@sophia.inria.fr
+ Modified by: Andres Vega Garcia
+
+ INRIA - Sophia Antipolis, France
+ e-mail: avega@sophia.inria.fr
finger: avega@pax.inria.fr
*/
/*
- * $Id: if_epreg.h,v 1.8 1995/04/10 07:48:03 root Exp root $
+ * $Id: if_epreg.h,v 1.7 1995/04/10 21:25:06 jkh Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -349,7 +349,7 @@ struct ep_softc {
#define SET_IRQ(i) (((i)<<12) | 0xF00) /* set IRQ i */
/*
- * FIFO Registers.
+ * FIFO Registers.
* RX Status. Window 1/Port 08
*
* 15: Incomplete or FIFO empty.
@@ -375,7 +375,7 @@ struct ep_softc {
#define ERR_RX_DRIBBLE (u_short) (0x2<<11)
/*
- * FIFO Registers.
+ * FIFO Registers.
* TX Status. Window 1/Port 0B
*
* Reports the transmit status of a completed transmission. Writing this
@@ -400,7 +400,7 @@ struct ep_softc {
#define TXS_STATUS_OVERFLOW 0x4
/*
- * Configuration control register.
+ * Configuration control register.
* Window 0/Port 04
*/
/* Read */
@@ -411,7 +411,7 @@ struct ep_softc {
#define ENABLE_DRQ_IRQ 0x0001
#define W0_P4_CMD_RESET_ADAPTER 0x4
#define W0_P4_CMD_ENABLE_ADAPTER 0x1
-/*
+/*
* Media type and status.
* Window 4/Port 0A
*/
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 49d7fdcf9c33..be36035d3d42 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.59 1995/05/06 19:34:25 joerg Exp $
+ * $Id: fd.c,v 1.60 1995/05/09 12:25:52 rgrimes Exp $
*
*/
@@ -370,7 +370,7 @@ fdc_err(fdcu_t fdcu, const char *s)
else if(fdc_data[fdcu].fdc_errs == FDC_ERRMAX)
printf("fdc%d: too many errors, not logging any more\n",
fdcu);
-
+
return FD_FAILED;
}
@@ -378,7 +378,7 @@ fdc_err(fdcu_t fdcu, const char *s)
* fd_cmd: Send a command to the chip. Takes a varargs with this structure:
* Unit number,
* # of output bytes, output bytes as ints ...,
- * # of input bytes, input bytes as ints ...
+ * # of input bytes, input bytes as ints ...
*/
int
@@ -604,7 +604,7 @@ fdattach(struct isa_device *dev)
unithasfd = 1;
if (ftattach(dev, fdup, unithasfd))
continue;
- if (fdsu < DRVS_PER_CTLR)
+ if (fdsu < DRVS_PER_CTLR)
fd->type = NO_TYPE;
#endif
continue;
@@ -683,9 +683,9 @@ fdattach(struct isa_device *dev)
break; /* already probed succesfully */
}
}
-
+
set_motor(fdcu, fdsu, TURNOFF);
-
+
if (st0 & NE7_ST0_EC) /* no track 0 -> no drive present */
continue;
@@ -694,13 +694,13 @@ fdattach(struct isa_device *dev)
fd->fdsu = fdsu;
fd->options = 0;
printf("fd%d: ", fdu);
-
+
fd_registerdev(fdcu, fdu);
switch (fdt) {
case RTCFDT_12M:
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
- kdc_fd[fdu].kdc_description =
+ kdc_fd[fdu].kdc_description =
"1.2MB (1200K) 5.25in floppy disk drive";
#ifdef DEVFS
sprintf(name,"fd%d.1200",fdu);
@@ -787,9 +787,9 @@ set_motor(fdcu_t fdcu, int fdsu, int turnon)
{
int fdout = fdc_data[fdcu].fdout;
int needspecify = 0;
-
+
if(turnon) {
- fdout &= ~FDO_FDSEL;
+ fdout &= ~FDO_FDSEL;
fdout |= (FDO_MOEN0 << fdsu) + fdsu;
} else
fdout &= ~(FDO_MOEN0 << fdsu);
@@ -856,7 +856,7 @@ fd_motor_on(void *arg1)
}
static void
-fd_turnon(fdu_t fdu)
+fd_turnon(fdu_t fdu)
{
fd_p fd = fd_data + fdu;
if(!(fd->flags & FD_MOTOR))
@@ -871,7 +871,7 @@ static void
fdc_reset(fdc_p fdc)
{
fdcu_t fdcu = fdc->fdcu;
-
+
/* Try a reset, keep motor on */
outb(fdc->baseport + FDOUT, fdc->fdout & ~(FDO_FRST|FDO_FDMAEN));
TRACE1("[0x%x->FDOUT]", fdc->fdout & ~(FDO_FRST|FDO_FDMAEN));
@@ -978,7 +978,7 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
return(ftopen(dev, flags));
#endif
/* check bounds */
- if (fdu >= NFD)
+ if (fdu >= NFD)
return(ENXIO);
fdc = fd_data[fdu].fdc;
if ((fdc == NULL) || (fd_data[fdu].type == NO_TYPE))
@@ -1093,7 +1093,7 @@ fdstrategy(struct buf *bp)
if (fdc->flags & FDC_TAPE_BUSY) {
bp->b_error = EBUSY;
bp->b_flags |= B_ERROR;
- goto bad;
+ goto bad;
}
#endif
if (!(bp->b_flags & B_FORMAT)) {
@@ -1111,7 +1111,7 @@ fdstrategy(struct buf *bp)
goto bad;
}
}
-
+
/*
* Set up block calculations.
*/
@@ -1262,7 +1262,7 @@ fdstate(fdcu_t fdcu, fdc_p fdc)
dp = &(fdc->head);
bp = dp->b_actf;
- if(!bp)
+ if(!bp)
{
/***********************************************\
* nothing left for this controller to do *
@@ -1469,7 +1469,7 @@ fdstate(fdcu_t fdcu, fdc_p fdc)
if(format)
{
/* formatting */
- if(fd_cmd(fdcu, 6,
+ if(fd_cmd(fdcu, 6,
NE7CMD_FORMAT,
head << 2 | fdu,
finfo->fd_formb_secshift,
@@ -1482,7 +1482,7 @@ fdstate(fdcu_t fdcu, fdc_p fdc)
fdc->retry = 6;
return(retrier(fdcu));
}
- }
+ }
else
{
if (fd_cmd(fdcu, 9,
@@ -1761,7 +1761,7 @@ fdformat(dev, finfo, p)
bp->b_bcount = sizeof(struct fd_idfield_data) * finfo->fd_formb_nsecs;
bp->b_un.b_addr = (caddr_t)finfo;
-
+
/* now do the format */
fdstrategy(bp);
@@ -1774,7 +1774,7 @@ fdformat(dev, finfo, p)
break;
}
splx(s);
-
+
if(rv == EWOULDBLOCK) {
/* timed out */
rv = EIO;
@@ -1890,7 +1890,7 @@ fdioctl(dev, cmd, addr, flag, p)
case FD_GOPTS: /* get drive options */
*(int *)addr = fd_data[FDUNIT(minor(dev))].options;
break;
-
+
case FD_SOPTS: /* set drive options */
fd_data[FDUNIT(minor(dev))].options = *(int *)addr;
break;
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index ab09ce57d286..80aba8286292 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -806,7 +806,7 @@ fe_probe_ati ( struct isa_device * isa_dev, struct fe_softc * sc )
/*
* Determine the card type.
- * There may be a way to identify various models. FIXME.
+ * There may be a way to identify various models. FIXME.
*/
sc->type = FE_TYPE_AT1700;
sc->typestr = "AT1700/RE2000";
@@ -1552,7 +1552,7 @@ fe_start ( struct ifnet *ifp )
* We *could* do better job by peeking the send queue to
* know the length of the next packet. Current version just
* tests against the worst case (i.e., longest packet). FIXME.
- *
+ *
* When adding the packet-peek feature, don't forget adding a
* test on txb_count against QUEUEING_MAX.
* There is a little chance the packet count exceeds
@@ -1755,7 +1755,7 @@ fe_tint ( struct fe_softc * sc, u_char tstat )
/*
* The transmitter is no more active.
- * Reset output active flag and watchdog timer.
+ * Reset output active flag and watchdog timer.
*/
sc->sc_if.if_flags &= ~IFF_OACTIVE;
sc->sc_if.if_timer = 0;
@@ -1879,7 +1879,7 @@ fe_rint ( struct fe_softc * sc, u_char rstat )
"fe%d: received a short packet? (%u bytes)\n",
sc->sc_unit, len );
}
-#endif
+#endif
/*
* Go get a packet.
@@ -1920,7 +1920,7 @@ feintr ( int unit )
* Loop until there are no more new interrupt conditions.
*/
for (;;) {
-
+
#if FE_DEBUG >= 4
fe_dump( LOG_INFO, sc, "intr()" );
#endif
@@ -2312,7 +2312,7 @@ fe_get_packet ( struct fe_softc * sc, u_short len )
*
* If an mbuf chain is too long for an Ethernet frame, it is not sent.
* Packets shorter than Ethernet minimum are legal, and we pad them
- * before sending out. An exception is "partial" packets which are
+ * before sending out. An exception is "partial" packets which are
* shorter than mandatory Ethernet header.
*
* I wrote a code for an experimental "delayed padding" technique.
@@ -2403,7 +2403,7 @@ fe_write_mbufs ( struct fe_softc *sc, struct mbuf *m )
#endif
/*
- * Transfer the data from mbuf chain to the transmission buffer.
+ * Transfer the data from mbuf chain to the transmission buffer.
* MB86960 seems to require that data be transferred as words, and
* only words. So that we require some extra code to patch
* over odd-length mbufs.
@@ -2503,7 +2503,7 @@ fe_mcaf ( struct fe_softc *sc )
log( LOG_INFO, "fe%d: hash(%s) == %d\n",
sc->sc_unit, ether_sprintf( enm->enm_addrlo ), index );
#endif
-
+
filter.data[index >> 3] |= 1 << (index & 7);
ETHER_NEXT_MULTI(step, enm);
}
@@ -2669,7 +2669,7 @@ fe_setlinkaddr ( struct fe_softc * sc )
{
struct ifaddr *ifa;
struct sockaddr_dl * sdl;
-
+
/*
* Search down the ifa address list looking for the AF_LINK type entry.
*/
diff --git a/sys/dev/ic/i8237.h b/sys/dev/ic/i8237.h
index 722194c5a65d..5493ca8eb44e 100644
--- a/sys/dev/ic/i8237.h
+++ b/sys/dev/ic/i8237.h
@@ -1,7 +1,7 @@
/*
* Intel 8237 DMA Controller
*
- * $Id: i8237.h,v 1.2 1993/10/16 13:48:48 rgrimes Exp $
+ * $Id: i8237.h,v 1.3 1994/11/01 17:26:47 ache Exp $
*/
#define DMA37MD_SINGLE 0x40 /* single pass mode */
@@ -9,4 +9,4 @@
#define DMA37MD_AUTO 0x50 /* autoinitialise single pass mode */
#define DMA37MD_WRITE 0x04 /* read the device, write memory operation */
#define DMA37MD_READ 0x08 /* write the device, read memory operation */
-
+
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index 5e85521f251b..8f4b47a71e39 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.22 1995/03/28 07:55:31 bde Exp $
+ * $Id: if_ie.c,v 1.23 1995/04/12 20:47:50 wollman Exp $
*/
/*
@@ -60,7 +60,7 @@
/*
* The i82586 is a very versatile chip, found in many implementations.
* Programming this chip is mostly the same, but certain details differ
- * from card to card. This driver is written so that different cards
+ * from card to card. This driver is written so that different cards
* can be automatically detected at run-time. Currently, only the
* AT&T EN100/StarLAN 10 series are supported.
*/
@@ -231,7 +231,7 @@ const char *ie_hardware_names[] = {
"Unknown"
};
-/*
+/*
sizeof(iscp) == 1+1+2+4 == 8
sizeof(scb) == 2+2+2+2+2+2+2+2 == 16
NFRAMES * sizeof(rfd) == NFRAMES*(2+2+2+2+6+6+2+2) == NFRAMES*24 == 384
@@ -274,7 +274,7 @@ struct ie_softc {
caddr_t iomembot;
unsigned iosize;
int bus_use; /* 0 means 16bit, 1 means 8 bit adapter */
-
+
int want_mcsetup;
int promisc;
volatile struct ie_int_sys_conf_ptr *iscp;
@@ -400,7 +400,7 @@ static int sl_probe(dvp)
break;
default:
- printf("ie%d: unknown AT&T board type code %d\n", unit,
+ printf("ie%d: unknown AT&T board type code %d\n", unit,
ie_softc[unit].hard_type);
return 0;
}
@@ -417,22 +417,22 @@ static int el_probe(dvp)
int i;
u_char signature[] = "*3COM*";
int unit = dvp->id_unit;
-
+
sc->port = dvp->id_iobase;
sc->iomembot = dvp->id_maddr;
sc->bus_use = 0;
-
+
/* Need this for part of the probe. */
sc->ie_reset_586 = el_reset_586;
sc->ie_chan_attn = el_chan_attn;
-
+
/* Reset and put card in CONFIG state without changing address. */
elink_reset();
outb(ELINK_ID_PORT, 0x00);
elink_idseq(ELINK_507_POLY);
elink_idseq(ELINK_507_POLY);
outb(ELINK_ID_PORT, 0xff);
-
+
c = inb(PORT + IE507_MADDR);
if(c & 0x20) {
#ifdef DEBUG
@@ -440,50 +440,50 @@ static int el_probe(dvp)
#endif
return 0;
}
-
+
/* go to RUN state */
outb(ELINK_ID_PORT, 0x00);
elink_idseq(ELINK_507_POLY);
outb(ELINK_ID_PORT, 0x00);
-
+
outb(PORT + IE507_CTRL, EL_CTRL_NRST);
-
+
for (i = 0; i < 6; i++)
if (inb(PORT + i) != signature[i])
return 0;
-
+
c = inb(PORT + IE507_IRQ) & 0x0f;
-
+
if (dvp->id_irq != (1 << c)) {
printf("ie%d: kernel configured irq %d doesn't match board configured irq %d\n",
unit, ffs(dvp->id_irq) - 1, c);
return 0;
}
-
+
c = (inb(PORT + IE507_MADDR) & 0x1c) + 0xc0;
-
+
if (kvtop(dvp->id_maddr) != ((int)c << 12)) {
printf("ie%d: kernel configured maddr %lx doesn't match board configured maddr %x\n",
unit, kvtop(dvp->id_maddr),(int)c << 12);
return 0;
}
-
+
outb(PORT + IE507_CTRL, EL_CTRL_NORMAL);
-
+
sc->hard_type = IE_3C507;
sc->hard_vers = 0; /* 3C507 has no version number. */
-
+
/*
* Divine memory size on-board the card.
*/
find_ie_mem_size(unit);
-
+
if (!sc->iosize) {
printf("ie%d: can't find shared memory\n", unit);
outb(PORT + IE507_CTRL, EL_CTRL_NRST);
return 0;
}
-
+
if(!dvp->id_msize)
dvp->id_msize = sc->iosize;
else if (dvp->id_msize != sc->iosize) {
@@ -492,12 +492,12 @@ static int el_probe(dvp)
outb(PORT + IE507_CTRL, EL_CTRL_NRST);
return 0;
}
-
+
sl_read_ether(unit, ie_softc[unit].arpcom.ac_enaddr);
-
+
/* Clear the interrupt latch just in case. */
outb(PORT + IE507_ICTRL, 1);
-
+
return 16;
}
@@ -538,7 +538,7 @@ static int ni_probe(dvp)
find_ie_mem_size(unit);
if(!ie_softc[unit].iosize) {
- return 0;
+ return 0;
}
if(!dvp->id_msize)
@@ -570,7 +570,7 @@ ieattach(dvp)
ifp->if_unit = unit;
ifp->if_name = iedriver.name;
ifp->if_mtu = ETHERMTU;
- printf(" <%s R%d> ethernet address %s\n",
+ printf(" <%s R%d> ethernet address %s\n",
ie_hardware_names[ie_softc[unit].hard_type],
ie_softc[unit].hard_vers + 1,
ether_sprintf(ie->arpcom.ac_enaddr));
@@ -586,7 +586,7 @@ ieattach(dvp)
ifp->if_type = IFT_ETHER;
ifp->if_addrlen = 6;
ifp->if_hdrlen = 14;
-
+
#if NBPFILTER > 0
bpfattach(&ie_softc[unit].ie_bpf, ifp, DLT_EN10MB,
sizeof(struct ether_header));
@@ -840,7 +840,7 @@ static inline int ether_equal(u_char *one, u_char *two) {
* only client which will fiddle with IFF_PROMISC is BPF. This is
* probably a good assumption, but we do not make it here. (Yet.)
*/
-static inline int check_eh(struct ie_softc *ie,
+static inline int check_eh(struct ie_softc *ie,
struct ether_header *eh,
int *to_bpf) {
int i;
@@ -902,7 +902,7 @@ static inline int check_eh(struct ie_softc *ie,
#endif
/* We want to see multicasts. */
if(eh->ether_dhost[0] & 1) return 1;
-
+
/* We want to see our own packets */
if(ether_equal(eh->ether_dhost, ie->arpcom.ac_enaddr)) return 1;
@@ -1032,7 +1032,7 @@ static inline int ieget(unit, ie, mp, ehp, to_bpf)
*/
do { /* while(resid > 0) */
/*
- * Try to allocate an mbuf to hold the data that we have. If we
+ * Try to allocate an mbuf to hold the data that we have. If we
* already allocated one, just get another one and stick it on the
* end (eventually). If we don't already have one, try to allocate
* an mbuf cluster big enough to hold the whole packet, if we think it's
@@ -1317,12 +1317,12 @@ iestart(ifp)
ie->xmit_buffs[ie->xmit_count]->ie_xmit_flags = IE_XMIT_LAST | len;
ie->xmit_buffs[ie->xmit_count]->ie_xmit_next = 0xffff;
- ie->xmit_buffs[ie->xmit_count]->ie_xmit_buf =
+ ie->xmit_buffs[ie->xmit_count]->ie_xmit_buf =
MK_24(ie->iomem, ie->xmit_cbuffs[ie->xmit_count]);
ie->xmit_cmds[ie->xmit_count]->com.ie_cmd_cmd = IE_CMD_XMIT;
ie->xmit_cmds[ie->xmit_count]->ie_xmit_status = 0;
- ie->xmit_cmds[ie->xmit_count]->ie_xmit_desc =
+ ie->xmit_cmds[ie->xmit_count]->ie_xmit_desc =
MK_16(ie->iomem, ie->xmit_buffs[ie->xmit_count]);
*bptr = MK_16(ie->iomem, ie->xmit_cmds[ie->xmit_count]);
@@ -1334,7 +1334,7 @@ iestart(ifp)
* If we queued up anything for transmission, send it.
*/
if(ie->xmit_count) {
- ie->xmit_cmds[ie->xmit_count - 1]->com.ie_cmd_cmd |=
+ ie->xmit_cmds[ie->xmit_count - 1]->com.ie_cmd_cmd |=
IE_CMD_LAST | IE_CMD_INTR;
/*
@@ -1369,7 +1369,7 @@ int check_ie_present(unit, where, size)
scp = (volatile struct ie_sys_conf_ptr *)(realbase + IE_SCP_ADDR);
bzero((char *)scp, sizeof *scp); /* ignore cast-qual */
-
+
/*
* First we put the ISCP at the bottom of memory; this tests to make
* sure that our idea of the size of memory is the same as the controller's.
@@ -1402,7 +1402,7 @@ int check_ie_present(unit, where, size)
* Now relocate the ISCP to its real home, and reset the controller
* again.
*/
- iscp = (void *)Align((caddr_t)(realbase + IE_SCP_ADDR -
+ iscp = (void *)Align((caddr_t)(realbase + IE_SCP_ADDR -
sizeof(struct ie_int_sys_conf_ptr)));
bzero((char *)iscp, sizeof *iscp); /* ignore cast-qual */
@@ -1526,7 +1526,7 @@ iereset(unit)
ie_softc[unit].arpcom.ac_if.if_flags |= IFF_UP;
ieioctl(&ie_softc[unit].arpcom.ac_if, SIOCSIFFLAGS, 0);
-
+
splx(s);
return;
}
@@ -1561,7 +1561,7 @@ static int command_and_wait(unit, cmd, pcmd, mask)
extern int hz;
ie_softc[unit].scb->ie_command = (u_short)cmd;
-
+
if(IE_ACTION_COMMAND(cmd) && pcmd) {
(*ie_softc[unit].ie_chan_attn)(unit);
@@ -1589,7 +1589,7 @@ static int command_and_wait(unit, cmd, pcmd, mask)
return timedout;
} else {
-
+
/*
* Otherwise, just wait for the command to be accepted.
*/
@@ -1624,7 +1624,7 @@ static void run_tdr(unit, cmd)
else
result = cmd->ie_tdr_time;
- ie_ack(ie_softc[unit].scb, IE_ST_WHENCE, unit,
+ ie_ack(ie_softc[unit].scb, IE_ST_WHENCE, unit,
ie_softc[unit].ie_chan_attn);
if(result & IE_TDR_SUCCESS)
@@ -1633,7 +1633,7 @@ static void run_tdr(unit, cmd)
if(result & IE_TDR_XCVR) {
printf("ie%d: transceiver problem\n", unit);
} else if(result & IE_TDR_OPEN) {
- printf("ie%d: TDR detected an open %d clocks away\n", unit,
+ printf("ie%d: TDR detected an open %d clocks away\n", unit,
result & IE_TDR_TIME);
} else if(result & IE_TDR_SHORT) {
printf("ie%d: TDR detected a short %d clocks away\n", unit,
@@ -1674,13 +1674,13 @@ static caddr_t setup_rfa(caddr_t ptr, struct ie_softc *ie) {
}
ptr = (caddr_t)Align((caddr_t)rfd); /* ignore cast-qual */
-
+
/* Now link them together */
for(i = 0; i < NFRAMES; i++) {
ie->rframes[i]->ie_fd_next =
MK_16(MEM, ie->rframes[(i + 1) % NFRAMES]);
}
-
+
/* Finally, set the EOL bit on the last one. */
ie->rframes[NFRAMES - 1]->ie_fd_last |= IE_FD_LAST;
@@ -1701,12 +1701,12 @@ static caddr_t setup_rfa(caddr_t ptr, struct ie_softc *ie) {
ptr += IE_RBUF_SIZE;
rbd = (void *)ptr;
}
-
+
/* Now link them together */
for(i = 0; i < NBUFFS; i++) {
ie->rbuffs[i]->ie_rbd_next = MK_16(MEM, ie->rbuffs[(i + 1) % NBUFFS]);
}
-
+
/* Tag EOF on the last one */
ie->rbuffs[NBUFFS - 1]->ie_rbd_length |= IE_RBD_LAST;
@@ -1728,21 +1728,21 @@ static caddr_t setup_rfa(caddr_t ptr, struct ie_softc *ie) {
* Run the multicast setup command.
* Call at splimp().
*/
-static int mc_setup(int unit, caddr_t ptr,
+static int mc_setup(int unit, caddr_t ptr,
volatile struct ie_sys_ctl_block *scb) {
struct ie_softc *ie = &ie_softc[unit];
volatile struct ie_mcast_cmd *cmd = (void *)ptr;
-
+
cmd->com.ie_cmd_status = 0;
cmd->com.ie_cmd_cmd = IE_CMD_MCAST | IE_CMD_LAST;
cmd->com.ie_cmd_link = 0xffff;
-
+
/* ignore cast-qual */
bcopy((caddr_t)ie->mcast_addrs, (caddr_t)cmd->ie_mcast_addrs,
ie->mcast_count * sizeof *ie->mcast_addrs);
cmd->ie_mcast_bytes = ie->mcast_count * 6; /* grrr... */
-
+
scb->ie_command_list = MK_16(MEM, cmd);
if(command_and_wait(unit, IE_CU_START, cmd, IE_STAT_COMPL)
|| !(cmd->com.ie_cmd_status & IE_STAT_OK)) {
@@ -1934,7 +1934,7 @@ ieioctl(ifp, command, data)
ie_stop(ifp->if_unit);
} else if((ifp->if_flags & IFF_UP) &&
(ifp->if_flags & IFF_RUNNING) == 0) {
- ie_softc[ifp->if_unit].promisc =
+ ie_softc[ifp->if_unit].promisc =
ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI);
ieinit(ifp->if_unit);
} else if(ie_softc[ifp->if_unit].promisc ^
diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c
index 942b45a03315..97225a88db93 100644
--- a/sys/dev/joy/joy.c
+++ b/sys/dev/joy/joy.c
@@ -41,7 +41,7 @@
#include <i386/isa/isa_device.h>
#include <i386/isa/timerreg.h>
-/* The game port can manage 4 buttons and 4 variable resistors (usually 2
+/* The game port can manage 4 buttons and 4 variable resistors (usually 2
* joysticks, each with 2 buttons and 2 pots.) via the port at address 0x201.
* Getting the state of the buttons is done by reading the game port:
* buttons 1-4 correspond to bits 4-7 and resistors 1-4 (X1, Y1, X2, Y2)
@@ -52,7 +52,7 @@
*/
-/* the formulae below only work if u is ``not too large''. See also
+/* the formulae below only work if u is ``not too large''. See also
* the discussion in microtime.s */
#define usec2ticks(u) (((u) * 19549)>>14)
#define ticks2usec(u) (((u) * 3433)>>12)
@@ -114,7 +114,7 @@ joyopen (dev_t dev, int flag)
joy[unit].timeout[i] = JOY_TIMEOUT;
return 0;
}
-int
+int
joyclose (dev_t dev, int flag)
{
int unit = UNIT (dev);
@@ -132,7 +132,7 @@ joyread (dev_t dev, struct uio *uio, int flag)
int i, t0, t1;
int state = 0, x = 0, y = 0;
struct joystick c;
-
+
disable_intr ();
outb (port, 0xff);
t0 = get_tick ();
@@ -140,7 +140,7 @@ joyread (dev_t dev, struct uio *uio, int flag)
i = usec2ticks(joy[unit].timeout[joypart(dev)]);
while (t0-t1 < i) {
state = inb (port);
- if (joypart(dev) == 1)
+ if (joypart(dev) == 1)
state >>= 2;
t1 = get_tick ();
if (t1 > t0)
@@ -149,7 +149,7 @@ joyread (dev_t dev, struct uio *uio, int flag)
x = t1;
if (!y && !(state & 0x02))
y = t1;
- if (x && y)
+ if (x && y)
break;
}
enable_intr ();
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index 8477f5878603..1366236cbf8a 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -6,8 +6,8 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * verbatim and that no modifications are made prior to this
+ * notice, this list of conditions and the following disclaimer,
+ * verbatim and that no modifications are made prior to this
* point in the file.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -35,28 +35,28 @@
/*
#define DIAGNOSTIC
#define DEBUG
- *
+ *
* TODO ----
*
* This driver will need bounce buffer support when dma'ing to mbufs above the
* 16Mb mark.
- *
+ *
* Check all the XXX comments -- some of them are just things I've left
* unfinished rather than "difficult" problems that were hacked around.
- *
+ *
* Check log settings.
- *
+ *
* Check how all the arpcom flags get set and used.
- *
+ *
* Re-inline and re-static all routines after debugging.
- *
+ *
* Remember to assign iobase in SHMEM probe routines.
- *
+ *
* Replace all occurences of LANCE-controller-card etc in prints by the name
* strings of the appropriate type -- nifty window dressing
- *
- * Add DEPCA support -- mostly done.
- *
+ *
+ * Add DEPCA support -- mostly done.
+ *
*/
#include "lnc.h"
@@ -175,7 +175,7 @@ lnc_registerdev(struct isa_device *isa_dev)
struct kern_devconf *kdc = &sc->kdc;
*kdc = kdc_lnc;
kdc->kdc_unit = isa_dev->id_unit;
- kdc->kdc_parentdata = isa_dev;
+ kdc->kdc_parentdata = isa_dev;
switch(sc->nic.ic) {
case LANCE:
@@ -209,7 +209,7 @@ lnc_registerdev(struct isa_device *isa_dev)
default:
break;
}
-
+
dev_attach(kdc);
}
@@ -270,7 +270,7 @@ alloc_mbuf_cluster(struct lnc_softc *sc, struct host_ring_entry *desc)
/* XXX m->m_data = m->m_ext.ext_buf;*/
} else {
MGET(m, M_DONTWAIT, MT_DATA);
- if (!m)
+ if (!m)
return(1);
MCLGET(m, M_DONTWAIT);
if (!m->m_ext.ext_buf) {
@@ -320,7 +320,7 @@ chain_mbufs(struct lnc_softc *sc, int start_of_packet, int pkt_len)
m->m_next = 0;
return(head);
-}
+}
inline struct mbuf *
mbuf_packet(struct lnc_softc *sc, int start_of_packet, int pkt_len)
@@ -415,7 +415,7 @@ lnc_rint(int unit)
* Therefore, it can be assumed that a complete packet can be found
* before hitting buffers that are still owned by the LANCE, if not
* then there is a bug in the driver that is causing the descriptors
- * to get out of sync.
+ * to get out of sync.
*/
#ifdef DIAGNOSTIC
@@ -443,8 +443,8 @@ lnc_rint(int unit)
* jabber packets can overrun into a second descriptor.
* If there is no error, then the ENP flag is set in the last
* descriptor of the packet. If there is an error then the ERR
- * flag will be set in the descriptor where the error occured.
- * Therefore, to find the last buffer of a packet we search for
+ * flag will be set in the descriptor where the error occured.
+ * Therefore, to find the last buffer of a packet we search for
* either ERR or ENP.
*/
@@ -533,7 +533,7 @@ lnc_rint(int unit)
if (head) {
/*
- * First mbuf in packet holds the
+ * First mbuf in packet holds the
* ethernet and packet headers
*/
head->m_pkthdr.rcvif = &sc->arpcom.ac_if;
@@ -627,7 +627,7 @@ lnc_tint(int unit)
* status will be written into the descriptor that was being accessed
* when the error occured and all subsequent descriptors in that
* packet will have been relinquished by the LANCE.
- *
+ *
* At this point we know that sc->trans_next points to the start
* of a packet that the LANCE has just finished trying to transmit.
* We now search for a buffer with either ENP or ERR set.
@@ -648,7 +648,7 @@ lnc_tint(int unit)
#endif
/*
- * Find end of packet.
+ * Find end of packet.
*/
if (!(next->md->md1 & (ENP | MDERR))) {
@@ -717,7 +717,7 @@ lnc_tint(int unit)
* set then TBUFF will have been cleared above. A
* UFLO error will turn off the transmitter so we
* have to reset.
- *
+ *
*/
if (next->md->md3 & UFLO) {
@@ -759,7 +759,7 @@ lnc_tint(int unit)
* ERR would have also been set and we would have
* returned from lnc_tint above. Therefore we can
* assume if we arrive here that ONE is valid.
- *
+ *
*/
if (next->md->md1 & ONE) {
@@ -810,7 +810,7 @@ lnc_tint(int unit)
} while (sc->pending_transmits && !(next->md->md1 & OWN));
/*
- * Clear TINT since we've dealt with all
+ * Clear TINT since we've dealt with all
* the completed transmissions.
*/
@@ -887,7 +887,7 @@ int i;
* There isn't any way to determine if a NIC is a BICC. Basically, if
* the lance probe succeeds using the i/o addresses of the BICC then
* we assume it's a BICC.
- *
+ *
*/
sc->rap = isa_dev->id_iobase + BICC_RAP;
@@ -1035,14 +1035,14 @@ lnc_attach(struct isa_device * isa_dev)
/*
* Allocate memory for use by the controller.
- *
+ *
* XXX -- the Am7990 and Am79C960 only have 24 address lines and so can
* only access the lower 16Mb of physical memory. For the moment we
* assume that malloc will allocate memory within the lower 16Mb
* range. This is not a very valid assumption but there's nothing
* that can be done about it yet. For shared memory NICs this isn't
* relevant.
- *
+ *
*/
lnc_mem_size = ((NDESC(sc->nrdre) + NDESC(sc->ntdre)) *
@@ -1139,7 +1139,7 @@ lnc_init(int unit)
* on a word boundary),the transmit and receive ring structures (each
* entry is 4 words long and must start on a quadword boundary) and
* the data buffers.
- *
+ *
* The alignment tests are particularly paranoid.
*/
@@ -1248,7 +1248,7 @@ lnc_init(int unit)
* For the Am7990 it controls DMA operations, for the Am79C960 it
* controls interrupt masks and transmitter algorithms. In either
* case, none of the flags are set.
- *
+ *
*/
write_csr(unit, CSR3, 0);
@@ -1286,13 +1286,13 @@ lnc_init(int unit)
* The interrupt flag (INTR) will be set and provided that the interrupt enable
* flag (INEA) is also set, the interrupt pin will be driven low when any of
* the following occur:
- *
+ *
* 1) Completion of the initialisation routine (IDON). 2) The reception of a
* packet (RINT). 3) The transmission of a packet (TINT). 4) A transmitter
* timeout error (BABL). 5) A missed packet (MISS). 6) A memory error (MERR).
- *
+ *
* The interrupt flag is cleared when all of the above conditions are cleared.
- *
+ *
* If the driver is reset from this routine then it first checks to see if any
* interrupts have ocurred since the reset and handles them before returning.
* This is because the NIC may signify a pending interrupt in CSR0 using the
@@ -1300,7 +1300,7 @@ lnc_init(int unit)
* think it does from reading the data sheets). We may as well deal with
* these pending interrupts now rather than get the overhead of another
* hardware interrupt immediately upon returning from the interrupt handler.
- *
+ *
*/
void
@@ -1440,7 +1440,7 @@ lnc_start(struct ifnet *ifp)
no_entries_needed++;
/*
- * We try and avoid bcopy as much as possible
+ * We try and avoid bcopy as much as possible
* but there are two cases when we use it.
*
* 1) If there are not enough free entries in the ring
@@ -1452,7 +1452,7 @@ lnc_start(struct ifnet *ifp)
* packet so it's necessary to shuffle the mbuf
* contents to ensure this.
*/
-
+
if (no_entries_needed > (NDESC(sc->ntdre) - sc->pending_transmits))
if (!(head = chain_to_cluster(head))) {
@@ -1465,9 +1465,9 @@ lnc_start(struct ifnet *ifp)
len = 100 - head->m_len;
if (M_TRAILINGSPACE(head) < len) {
/*
- * Move data to start of data
- * area. We assume the first
- * mbuf has a packet header
+ * Move data to start of data
+ * area. We assume the first
+ * mbuf has a packet header
* and is not a cluster.
*/
bcopy((caddr_t)head->m_data, (caddr_t)head->m_pktdat, head->m_len);
@@ -1564,7 +1564,7 @@ lnc_start(struct ifnet *ifp)
} while (sc->pending_transmits < NDESC(sc->ntdre));
/*
- * Transmit ring is full so set IFF_OACTIVE
+ * Transmit ring is full so set IFF_OACTIVE
* since we can't buffer any more packets.
*/
@@ -1633,7 +1633,7 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data)
*/
lnc_init(ifp->if_unit);
}
- sc->kdc.kdc_state =
+ sc->kdc.kdc_state =
((ifp->if_flags & IFF_UP) ? DC_BUSY : DC_IDLE);
break;
#ifdef notyet
diff --git a/sys/dev/lnc/if_lncreg.h b/sys/dev/lnc/if_lncreg.h
index bbc6c63d4b42..fe146ee8931c 100644
--- a/sys/dev/lnc/if_lncreg.h
+++ b/sys/dev/lnc/if_lncreg.h
@@ -1,6 +1,6 @@
/*
* Am7990, Local Area Network Controller for Ethernet (LANCE)
- *
+ *
* Copyright (c) 1994, Paul Richards. This software may be used,
* modified, copied, distributed, and sold, in both source and binary
* form provided that the above copyright and these terms are retained.
@@ -35,18 +35,18 @@
#define MISS 0x1000
#define MERR 0x0800
#define RINT 0x0400
-#define TINT 0x0200
-#define IDON 0x0100
+#define TINT 0x0200
+#define IDON 0x0100
#define INTR 0x0080
#define INEA 0x0040
#define RXON 0x0020
#define TXON 0x0010
#define TDMD 0x0008
-#define STOP 0x0004
+#define STOP 0x0004
#define STRT 0x0002
-#define INIT 0x0001
+#define INIT 0x0001
-/*
+/*
* CSR3
*
* Bits 3-15 are reserved.
@@ -54,12 +54,12 @@
*/
#define BSWP 0x0004
-#define ACON 0x0002
+#define ACON 0x0002
#define BCON 0x0001
/* Initialisation block */
-struct init_block {
+struct init_block {
u_short mode; /* Mode register */
u_char padr[6]; /* Ethernet address */
u_char ladrf[8]; /* Logical address filter (multicast) */
@@ -88,7 +88,7 @@ struct init_block {
#define DTX 0x0002 /* Disable the transmitter */
#define DRX 0x0001 /* Disable the receiver */
-/*
+/*
* Message Descriptor Structure
*
* Each transmit or receive descriptor ring entry (RDRE's and TDRE's)
@@ -100,14 +100,14 @@ struct init_block {
* 3. The status information for that particular buffer. The eight most
* significant bits of md1 are collectively termed the STATUS of the
* descriptor.
- *
+ *
* Descriptor md0 contains LADR 0-15, the low order 16 bits of the 24-bit
- * address of the actual data buffer. Bits 0-7 of descriptor md1 contain
+ * address of the actual data buffer. Bits 0-7 of descriptor md1 contain
* HADR, the high order 8-bits of the 24-bit data buffer address. Bits 8-15
* of md1 contain the status flags of the buffer. Descriptor md2 contains the
- * buffer byte count in bits 0-11 as a two's complement number and must have
+ * buffer byte count in bits 0-11 as a two's complement number and must have
* 1's written to bits 12-15. For the receive entry md3 has the Message Byte
- * Count in bits 0-11, this is the length of the received message and is valid
+ * Count in bits 0-11, this is the length of the received message and is valid
* only when ERR is cleared and ENP is set. For the transmit entry it contains
* more status information.
*
@@ -116,8 +116,8 @@ struct init_block {
struct mds {
u_short md0;
u_short md1;
- short md2;
- u_short md3;
+ short md2;
+ u_short md3;
};
/* Receive STATUS flags for md1 */
@@ -147,8 +147,8 @@ struct mds {
#define ONE 0x0800 /* Exactly one retry was needed */
#define DEF 0x0400 /* Packet transmit deferred -- channel busy */
-/*
- * Transmit status flags for md2
+/*
+ * Transmit status flags for md2
*
* Same as for receive descriptor.
*
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index fbe6b13dcfa2..d976194877fb 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -40,7 +40,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: mcd.c,v 1.42 1995/05/09 11:39:40 rgrimes Exp $
+ * $Id: mcd.c,v 1.43 1995/05/11 19:26:18 rgrimes Exp $
*/
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@@ -249,7 +249,7 @@ int mcd_attach(struct isa_device *dev)
{
struct mcd_data *cd = mcd_data + dev->id_unit;
int i;
-
+
cd->iobase = dev->id_iobase;
cd->flags |= MCDINIT;
mcd_soft_reset(dev->id_unit);
@@ -269,7 +269,7 @@ int mcdopen(dev_t dev)
{
int unit,part,phys,r,retry;
struct mcd_data *cd;
-
+
unit = mcd_unit(dev);
if (unit >= NMCD)
return ENXIO;
@@ -277,7 +277,7 @@ int mcdopen(dev_t dev)
cd = mcd_data + unit;
part = mcd_part(dev);
phys = mcd_phys(dev);
-
+
/* not initialized*/
if (!(cd->flags & MCDINIT))
return ENXIO;
@@ -337,7 +337,7 @@ MCD_TRACE("open: partition=%d, disksize = %ld, blksize=%d\n",
return ENXIO;
return 0;
}
-
+
return ENXIO;
}
@@ -345,7 +345,7 @@ int mcdclose(dev_t dev)
{
int unit,part,phys;
struct mcd_data *cd;
-
+
unit = mcd_unit(dev);
if (unit >= NMCD)
return ENXIO;
@@ -353,7 +353,7 @@ int mcdclose(dev_t dev)
cd = mcd_data + unit;
part = mcd_part(dev);
phys = mcd_phys(dev);
-
+
if (!(cd->flags & MCDINIT))
return ENXIO;
@@ -377,7 +377,7 @@ mcdstrategy(struct buf *bp)
struct mcd_data *cd;
struct buf *qp;
int s;
-
+
int unit = mcd_unit(bp->b_dev);
cd = mcd_data + unit;
@@ -406,11 +406,11 @@ MCD_TRACE("strategy: drive not valid\n");
bp->b_error = EROFS;
goto bad;
}
-
+
/* no data to read */
if (bp->b_bcount == 0)
goto done;
-
+
/* for non raw access, check partition limits */
if (mcd_part(bp->b_dev) != RAW_PART) {
if (!(cd->flags & MCDLABEL)) {
@@ -425,13 +425,13 @@ MCD_TRACE("strategy: drive not valid\n");
bp->b_pblkno = bp->b_blkno;
bp->b_resid = 0;
}
-
+
/* queue it */
qp = &cd->head;
s = splbio();
disksort(qp,bp);
splx(s);
-
+
/* now check whether we can perform processing */
mcd_start(unit);
return;
@@ -451,7 +451,7 @@ static void mcd_start(int unit)
struct partition *p;
int part;
register s = splbio();
-
+
if (cd->flags & MCDMBXBSY) {
splx(s);
return;
@@ -495,7 +495,7 @@ int mcdioctl(dev_t dev, int cmd, caddr_t addr, int flags)
{
struct mcd_data *cd;
int unit,part;
-
+
unit = mcd_unit(dev);
part = mcd_part(dev);
cd = mcd_data + unit;
@@ -523,7 +523,7 @@ MCD_TRACE("ioctl called 0x%x\n", cmd);
return 0;
/*
- * a bit silly, but someone might want to test something on a
+ * a bit silly, but someone might want to test something on a
* section of cdrom.
*/
case DIOCWDINFO:
@@ -614,10 +614,10 @@ MCD_TRACE("ioctl called 0x%x\n", cmd);
static int mcd_getdisklabel(int unit)
{
struct mcd_data *cd = mcd_data + unit;
-
+
if (cd->flags & MCDLABEL)
return -1;
-
+
bzero(&cd->dlabel,sizeof(struct disklabel));
/* filled with spaces first */
strncpy(cd->dlabel.d_typename," ",
@@ -642,7 +642,7 @@ static int mcd_getdisklabel(int unit)
cd->dlabel.d_magic = DISKMAGIC;
cd->dlabel.d_magic2 = DISKMAGIC;
cd->dlabel.d_checksum = dkcksum(&cd->dlabel);
-
+
cd->flags |= MCDLABEL;
return 0;
}
@@ -704,7 +704,7 @@ twiddle_thumbs(int port, int unit, int count, char *whine)
int
mcd_probe(struct isa_device *dev)
{
- int port = dev->id_iobase;
+ int port = dev->id_iobase;
int unit = dev->id_unit;
int i, j;
int status;
@@ -856,7 +856,7 @@ mcd_get(int unit, char *buf, int nmax)
{
int port = mcd_data[unit].iobase;
int i,k;
-
+
for (i=0; i<nmax; i++) {
/* wait for data */
if ((k = mcd_getreply(unit,DELAY_GETREPLY)) < 0) {
@@ -873,7 +873,7 @@ mcd_send(int unit, int cmd,int nretrys)
{
int i,k=0;
int port = mcd_data[unit].iobase;
-
+
/*MCD_TRACE("mcd_send: command = 0x%02x\n",cmd,0,0,0);*/
for (i=0; i<nretrys; i++) {
outb(port+mcd_command, cmd);
@@ -1406,7 +1406,7 @@ mcd_toc_entrys(int unit, struct ioc_read_toc_entry *te)
i = te->starting_track;
if (i == MCD_LASTPLUS1)
i = bcd2bin(cd->volinfo.trk_high) + 1;
-
+
/* verify starting track */
if (i < bcd2bin(cd->volinfo.trk_low) ||
i > bcd2bin(cd->volinfo.trk_high)+1) {
diff --git a/sys/dev/mcd/mcdreg.h b/sys/dev/mcd/mcdreg.h
index f8d8598f2bab..d5ece62169e7 100644
--- a/sys/dev/mcd/mcdreg.h
+++ b/sys/dev/mcd/mcdreg.h
@@ -1,7 +1,7 @@
/*
* Copyright 1993 by Holger Veit (data part)
* Copyright 1993 by Brian Moore (audio part)
- * Changes Copyright 1993 by Gary Clark II
+ * Changes Copyright 1993 by Gary Clark II
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@
* the manufacturer or anyone else might provide better documentation,
* so this file (and the driver) will then have a better quality.
*
- * $Id: mcdreg.h,v 1.6 1994/12/24 13:24:02 ache Exp $
+ * $Id: mcdreg.h,v 1.7 1995/01/30 06:44:40 ache Exp $
*/
#ifndef MCD_H
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index a2c5ef3fd3b2..4dedadd5f4e9 100644
--- a/sys/dev/mse/mse.c
+++ b/sys/dev/mse/mse.c
@@ -11,7 +11,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
- * $Id: mse.c,v 1.10 1995/03/28 07:55:44 bde Exp $
+ * $Id: mse.c,v 1.11 1995/04/12 20:47:59 wollman Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -114,9 +114,9 @@ struct mse_softc {
#define MSE_SETUP 0x91 /* What does this mean? */
/* The definition for the control port */
/* is as follows: */
-
+
/* D7 = Mode set flag (1 = active) */
- /* D6,D5 = Mode selection (port A) */
+ /* D6,D5 = Mode selection (port A) */
/* 00 = Mode 0 = Basic I/O */
/* 01 = Mode 1 = Strobed I/O */
/* 10 = Mode 2 = Bi-dir bus */
@@ -129,7 +129,7 @@ struct mse_softc {
/* D1 = Port B direction (1 = input)*/
/* D0 = Port C (lower 4 bits) */
/* direction. (1 = input) */
-
+
/* So 91 means Basic I/O on all 3 ports,*/
/* Port A is an input port, B is an */
/* output port, C is split with upper */
@@ -288,7 +288,7 @@ mseclose(dev, flag)
return(0);
}
-/*
+/*
* mseread: return mouse info using the MSC serial protocol, but without
* using bytes 4 and 5.
* (Yes this is cheesy, but it makes the X386 server happy, so...)
@@ -404,10 +404,10 @@ mseintr(unit)
*/
if (sc->sc_deltax != 0 || sc->sc_deltay != 0 ||
(sc->sc_obuttons ^ sc->sc_buttons) != 0) {
- if (sc->sc_flags & MSESC_WANT) {
- sc->sc_flags &= ~MSESC_WANT;
- wakeup((caddr_t)sc);
- }
+ if (sc->sc_flags & MSESC_WANT) {
+ sc->sc_flags &= ~MSESC_WANT;
+ wakeup((caddr_t)sc);
+ }
selwakeup(&sc->sc_selp);
}
}
@@ -437,7 +437,7 @@ mse_probelogi(idp)
outb(idp->id_iobase + MSE_PORTC, MSE_DISINTR);
return(1);
} else {
- printf("mse%d: wrong signature %x\n",idp->id_unit,sig);
+ printf("mse%d: wrong signature %x\n",idp->id_unit,sig);
return(0);
}
}
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index e12474009fd6..0d0c2f82d0fc 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.21 1995/03/23 06:14:44 davidg Exp $
+** $Id: pci.c,v 1.22 1995/05/04 06:57:11 davidg Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -113,7 +113,7 @@ struct pcicb {
static int
pci_externalize (struct proc *, struct kern_devconf *, void *, size_t);
-
+
static int
pci_internalize (struct proc *, struct kern_devconf *, void *, size_t);
@@ -234,7 +234,7 @@ pci_register_io (struct pcicb * cb, u_int base, u_int limit)
cb->pcicb_pupto = limit;
/*
- ** XXX should set bridge io mapping here
+ ** XXX should set bridge io mapping here
** but it can be mapped in 4k blocks only,
** leading to conflicts with isa/eisa ..
*/
@@ -1097,8 +1097,8 @@ pci_externalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t l)
return copyout(&buffer, u, sizeof buffer);
}
-
-
+
+
static int
pci_internalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t s)
{
@@ -1476,7 +1476,7 @@ static struct vt VendorTable[] = {
static const char *const majclasses[] = {
"old", "storage", "network", "display",
- "multimedia", "memory", "bridge"
+ "multimedia", "memory", "bridge"
};
void not_supported (pcici_t tag, u_long type)
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index 712c6705f3ac..207a7437d46f 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcivar.h,v 1.4 1995/03/21 23:01:06 se Exp $
+** $Id: pcivar.h,v 1.5 1995/03/25 21:10:38 bde Exp $
**
** Declarations for pci device drivers.
**
@@ -159,8 +159,8 @@ extern unsigned pci_maxdevice;
struct pci_info {
u_short pi_bus;
u_short pi_device;
-};
-
+};
+
#define PCI_EXT_CONF_LEN (16)
#define PCI_EXTERNAL_LEN (sizeof(struct pci_externalize_buffer))
diff --git a/sys/dev/ppbus/lptio.h b/sys/dev/ppbus/lptio.h
index 7e3df4224182..a203c7d69d54 100644
--- a/sys/dev/ppbus/lptio.h
+++ b/sys/dev/ppbus/lptio.h
@@ -1,17 +1,17 @@
/*
* Copyright (C) 1994 Geoffrey M. Rehmet
*
- * This program is free software; you may redistribute it and/or
- * modify it, provided that it retain the above copyright notice
+ * This program is free software; you may redistribute it and/or
+ * modify it, provided that it retain the above copyright notice
* and the following disclaimer.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Geoff Rehmet, Rhodes University, South Africa <csgr@cs.ru.ac.za>
*
- * $Id$
+ * $Id: lpt.h,v 1.2 1994/08/02 07:38:52 davidg Exp $
*/
#ifndef _LPT_PRINTER_H_
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index 8b68956edd45..9f50105f57f6 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -41,7 +41,7 @@
*/
-/* $Id: scd.c,v 1.3 1995/04/12 20:48:02 wollman Exp $ */
+/* $Id: scd.c,v 1.4 1995/05/09 12:25:58 rgrimes Exp $ */
/* Please send any comments to micke@dynas.se */
@@ -135,7 +135,7 @@ struct scd_data {
short first_track;
short last_track;
struct ioc_play_msf last_play;
-
+
short audio_status;
struct buf head; /* head of buf queue */
struct scd_mbx mbx;
@@ -213,7 +213,7 @@ int scd_attach(struct isa_device *dev)
{
struct scd_data *cd = scd_data + dev->id_unit;
int i;
-
+
cd->iobase = dev->id_iobase; /* Already set by probe, but ... */
kdc_scd[dev->id_unit].kdc_state = DC_IDLE;
@@ -235,7 +235,7 @@ scdopen(dev_t dev)
int unit,part,phys;
int rc;
struct scd_data *cd;
-
+
unit = scd_unit(dev);
if (unit >= NSCD)
return ENXIO;
@@ -243,7 +243,7 @@ scdopen(dev_t dev)
cd = scd_data + unit;
part = scd_part(dev);
phys = scd_phys(dev);
-
+
/* not initialized*/
if (!(cd->flags & SCDINIT))
return ENXIO;
@@ -289,7 +289,7 @@ scdclose(dev_t dev)
struct scd_data *cd;
int rlen;
char rdata[10];
-
+
unit = scd_unit(dev);
if (unit >= NSCD)
return ENXIO;
@@ -297,8 +297,8 @@ scdclose(dev_t dev)
cd = scd_data + unit;
part = scd_part(dev);
phys = scd_phys(dev);
-
- if (!(cd->flags & SCDINIT) || !cd->openflag)
+
+ if (!(cd->flags & SCDINIT) || !cd->openflag)
return ENXIO;
if (cd->audio_status != CD_AS_PLAY_IN_PROGRESS) {
@@ -346,11 +346,11 @@ scdstrategy(struct buf *bp)
bp->b_error = EROFS;
goto bad;
}
-
+
/* no data to read */
if (bp->b_bcount == 0)
goto done;
-
+
if (!(cd->flags & SCDTOC)) {
bp->b_error = EIO;
goto bad;
@@ -361,13 +361,13 @@ scdstrategy(struct buf *bp)
bp->b_pblkno = bp->b_blkno;
bp->b_resid = 0;
-
+
/* queue it */
qp = &cd->head;
s = splbio();
disksort(qp,bp);
splx(s);
-
+
/* now check whether we can perform processing */
scd_start(unit);
return;
@@ -388,7 +388,7 @@ scd_start(int unit)
struct partition *p;
int part;
register s = splbio();
-
+
if (cd->flags & SCDMBXBSY) {
splx(s);
return;
@@ -423,7 +423,7 @@ scdioctl(dev_t dev, int cmd, caddr_t addr, int flags)
{
struct scd_data *cd;
int unit,part;
-
+
unit = scd_unit(dev);
part = scd_part(dev);
cd = scd_data + unit;
@@ -618,7 +618,7 @@ scd_pause(int unit)
if (send_cmd(unit, CMD_STOP_AUDIO, 0) != 0)
return EIO;
-
+
cd->last_play.start_m = subpos.abs_msf[0];
cd->last_play.start_s = subpos.abs_msf[1];
cd->last_play.start_f = subpos.abs_msf[2];
@@ -831,7 +831,7 @@ trystat:
(caddr_t)SCD_S_WAITSTAT,hz/100); /* XXX */
return;
}
-
+
process_attention(unit);
/* reject, if audio active */
@@ -1184,19 +1184,19 @@ get_tl(struct sony_toc *toc, int size)
if (tl->track != 0xb0)
return tl;
(char *)tl += 9;
- if (tl->track != 0xb1)
+ if (tl->track != 0xb1)
return tl;
(char *)tl += 9;
- if (tl->track != 0xb2)
+ if (tl->track != 0xb2)
return tl;
(char *)tl += 9;
- if (tl->track != 0xb3)
+ if (tl->track != 0xb3)
return tl;
(char *)tl += 9;
- if (tl->track != 0xb4)
+ if (tl->track != 0xb4)
return tl;
(char *)tl += 9;
- if (tl->track != 0xc0)
+ if (tl->track != 0xc0)
return tl;
(char *)tl += 9;
return tl;
@@ -1368,7 +1368,7 @@ send_cmd(u_int unit, u_char cmd, u_int nargs, ...)
XDEBUG(1, ("\nscd%d: wparam timeout\n", unit));
return -EIO;
}
-
+
va_start(ap, nargs);
reg = port + OREG_WPARAMS;
for (i = 0; i < nargs; i++) {
@@ -1512,7 +1512,7 @@ scd_toc_entrys (int unit, struct ioc_read_toc_entry *te)
i = te->starting_track;
if (i == SCD_LASTPLUS1)
i = cd->last_track + 1;
-
+
/* verify starting track */
if (i < cd->first_track || i > cd->last_track+1)
return EINVAL;
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 9764ef65112e..4ae58cddc9ef 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.97 1995/05/07 23:00:02 ache Exp $
+ * $Id: sio.c,v 1.98 1995/05/11 19:26:19 rgrimes Exp $
*/
#include "sio.h"
@@ -630,7 +630,7 @@ sioattach(isdp)
#ifdef DSI_SOFT_MODEM
if((inb(iobase+7) ^ inb(iobase+7)) & 0x80) {
printf(" Digicom Systems, Inc. SoftModem");
- kdc_sio[unit].kdc_description =
+ kdc_sio[unit].kdc_description =
"Serial port: Digicom Systems SoftModem";
goto determined_type;
}
@@ -1326,15 +1326,15 @@ sioioctl(dev, cmd, data, flag, p)
pi = (u_char*)(*(caddr_t*)data);
error = copyin(pi,&l,sizeof l);
- if(error)
+ if(error)
{return error;};
pi += sizeof l;
p = malloc(l,M_TEMP,M_NOWAIT);
- if(!p)
+ if(!p)
{return ENOBUFS;}
error = copyin(pi,p,l);
- if(error)
+ if(error)
{free(p,M_TEMP); return error;};
if(error = LoadSoftModem(
MINOR_TO_UNIT(mynor),iobase,l,p))
@@ -2229,7 +2229,7 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
int int_c,int_k;
int data_0188, data_0187;
- /*
+ /*
* First see if it is a DSI SoftModem
*/
if(!((inb(base_io+7) ^ inb(base_io+7) & 0x80)))
@@ -2248,8 +2248,8 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
DSI_ERROR("dsp bus not granted");
if(0x01 != (inb(base_io+7) & 0x01)) {
- outb(base_io+7,0x18);
- outb(base_io+7,0x19);
+ outb(base_io+7,0x18);
+ outb(base_io+7,0x19);
if(0x01 != (inb(base_io+7) & 0x01))
DSI_ERROR("program mem not granted");
}
@@ -2275,14 +2275,14 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
outb(base_io+7,0x19);
if(0x00 != (inb(base_io+7) & 0x01))
DSI_ERROR("program data not granted");
-
+
for(int_k = 0 ; int_k < 0x800; int_k++) {
outb(base_io+1,*ptr++);
outb(base_io+2,0);
outb(base_io+1,*ptr++);
outb(base_io+2,*ptr++);
}
-
+
size -= 0x1800;
while(size > 0x1800) {
@@ -2299,7 +2299,7 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
outb(base_io+2,*ptr++);
}
}
-
+
} else if (size > 0) {
if(int_c == 7) {
outb(base_io+7,0x18);
@@ -2319,7 +2319,7 @@ LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr)
outb(base_io+2,*ptr++);
}
}
- }
+ }
outb(base_io+7,0x11);
outb(base_io+7,3);
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index e36af000a998..503836b79a65 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -63,7 +63,7 @@ snpwrite(dev, uio, flag)
int unit = minor(dev), len, i, error;
struct snoop *snp = &snoopsw[unit];
struct tty *tp;
- char c[SNP_INPUT_BUF];
+ char c[SNP_INPUT_BUF];
if (snp->snp_tty == NULL)
return (EIO);
@@ -71,16 +71,16 @@ snpwrite(dev, uio, flag)
tp = snp->snp_tty;
if ((tp->t_sc == snp) && (tp->t_state & TS_SNOOP) &&
- (tp->t_line == OTTYDISC || tp->t_line == NTTYDISC))
+ (tp->t_line == OTTYDISC || tp->t_line == NTTYDISC))
goto tty_input;
printf("Snoop: attempt to write to bad tty.\n");
return (EIO);
tty_input:
- if (!(tp->t_state & TS_ISOPEN))
+ if (!(tp->t_state & TS_ISOPEN))
return (EIO);
-
+
while (uio->uio_resid > 0) {
len = MIN(uio->uio_resid,SNP_INPUT_BUF);
if ((error = uiomove(c, len, uio)) != 0)
@@ -91,7 +91,7 @@ tty_input:
}
}
return 0;
-
+
}
@@ -443,7 +443,7 @@ snpioctl(dev, cmd, data, flag)
s = spltty();
if (snp->snp_tty != NULL)
*(int *) data = snp->snp_len;
- else
+ else
if (snp->snp_flags & SNOOP_DOWN) {
if (snp->snp_flags & SNOOP_OFLOW)
*(int *) data = SNP_OFLOW;
@@ -473,7 +473,7 @@ snpselect(dev, rw, p)
if (rw != FREAD)
return 1;
-
+
if (snp->snp_len > 0)
return 1;
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index 170abb8c0020..4c1f12890640 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -4,7 +4,7 @@
* v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
* modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
*
- * $Id: spkr.c,v 1.12 1995/03/16 18:12:05 bde Exp $
+ * $Id: spkr.c,v 1.13 1995/05/05 06:15:11 davidg Exp $
*/
#include "speaker.h"
@@ -48,14 +48,14 @@
* | SC1 SC0 | RW1 RW0 | M2 M1 M0 | BCD |
* +----------+----------+---------------+-----+
* Counter Write Mode 3 Binary
- * Channel 2 LSB first, (Square Wave) Encoding
+ * Channel 2 LSB first, (Square Wave) Encoding
* MSB second
*/
#define PPI_SPKR 0x03 /* turn these PPI bits on to pass sound */
#define PIT_MODE 0xB6 /* set timer mode for sound generation */
/*
- * Magic numbers for timer control.
+ * Magic numbers for timer control.
*/
#define TIMER_CLK 1193180L /* corresponds to 18.2 MHz tick rate */
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 123e2a9cc0d8..19c572a5c039 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -6,7 +6,7 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
+ * notice, this list of conditions and the following disclaimer
* in this position and unchanged.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.115 1995/04/28 09:10:56 sos Exp $
+ * $Id: syscons.c,v 1.116 1995/05/21 18:30:05 sos Exp $
*/
#include "sc.h"
@@ -65,7 +65,7 @@
#endif
/* this may break on older VGA's but is usefull on real 32 bit systems */
-#define bcopyw bcopy
+#define bcopyw bcopy
static default_attr user_default = {
(FG_LIGHTGREY | BG_BLACK) << 8,
@@ -81,7 +81,7 @@ static scr_stat main_console;
static scr_stat *console[MAXCONS];
scr_stat *cur_console;
static scr_stat *new_scp, *old_scp;
-static term_stat kernel_console;
+static term_stat kernel_console;
static default_attr *current_default;
static char init_done = FALSE;
static int configuration = 0;
@@ -107,7 +107,7 @@ static char *video_mode_ptr = NULL;
static u_char kbd_reply = 0;
#endif
-static u_short mouse_and_mask[16] = {
+static u_short mouse_and_mask[16] = {
0xc000, 0xe000, 0xf000, 0xf800, 0xfc00, 0xfe00, 0xff00, 0xff80,
0xfe00, 0x1e00, 0x1f00, 0x0f00, 0x0f00, 0x0000, 0x0000, 0x0000
};
@@ -168,7 +168,7 @@ scprobe(struct isa_device *dev)
DELAY(10);
val = inb(KB_DATA);
if (val == KB_ACK || val == KB_ECHO)
- goto gotres;
+ goto gotres;
if (val == KB_RESEND)
break;
}
@@ -184,7 +184,7 @@ gotack:
val = inb(KB_DATA);
if (val == KB_ACK)
goto gotack;
- if (val != KB_RESET_DONE)
+ if (val != KB_RESET_DONE)
printf("scprobe: keyboard RESET failed %02x\n", val);
}
#ifdef XT_KEYBOARD
@@ -218,8 +218,8 @@ sc_registerdev(struct isa_device *id)
dev_attach(&kdc_sc[id->id_unit]);
}
-#if NAPM > 0
-static int
+#if NAPM > 0
+static int
scresume(void *dummy)
{
shfts = 0;
@@ -265,7 +265,7 @@ scattach(struct isa_device *dev)
bzero(scp->history_head, scp->history_size*sizeof(u_short));
/* initialize cursor stuff */
- draw_cursor(scp, TRUE);
+ draw_cursor(scp, TRUE);
if (crtc_vga && (configuration & CHAR_CURSOR))
set_destructive_cursor(scp, TRUE);
@@ -279,12 +279,12 @@ scattach(struct isa_device *dev)
if (crtc_vga)
if (crtc_addr == MONO_BASE)
printf("VGA mono");
- else
+ else
printf("VGA color");
else
if (crtc_addr == MONO_BASE)
printf("MDA/hercules");
- else
+ else
printf("CGA/EGA");
printf(" <%d virtual consoles, flags=0x%x>\n", MAXCONS, configuration);
@@ -298,7 +298,7 @@ scattach(struct isa_device *dev)
return 0;
}
-struct tty
+struct tty
*scdevtotty(dev_t dev)
{
int unit = minor(dev);
@@ -310,7 +310,7 @@ struct tty
return VIRTUAL_TTY(unit);
}
-static scr_stat
+static scr_stat
*get_scr_stat(dev_t dev)
{
int unit = minor(dev);
@@ -332,7 +332,7 @@ get_scr_num()
return i < MAXCONS ? i : 0;
}
-int
+int
scopen(dev_t dev, int flag, int mode, struct proc *p)
{
struct tty *tp = scdevtotty(dev);
@@ -352,8 +352,8 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
scparam(tp, &tp->t_termios);
ttsetwater(tp);
- }
- else
+ }
+ else
if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0)
return(EBUSY);
tp->t_state |= TS_CARR_ON;
@@ -363,7 +363,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
return((*linesw[tp->t_line].l_open)(dev, tp));
}
-int
+int
scclose(dev_t dev, int flag, int mode, struct proc *p)
{
struct tty *tp = scdevtotty(dev);
@@ -382,8 +382,8 @@ scclose(dev_t dev, int flag, int mode, struct proc *p)
scp->smode.mode = VT_AUTO;
}
else {
- free(scp->scr_buf, M_DEVBUF);
- free(scp->history, M_DEVBUF);
+ free(scp->scr_buf, M_DEVBUF);
+ free(scp->history, M_DEVBUF);
free(scp, M_DEVBUF);
console[minor(dev)] = NULL;
}
@@ -394,11 +394,11 @@ scclose(dev_t dev, int flag, int mode, struct proc *p)
#endif
}
(*linesw[tp->t_line].l_close)(tp, flag);
- ttyclose(tp);
+ ttyclose(tp);
return(0);
}
-int
+int
scread(dev_t dev, struct uio *uio, int flag)
{
struct tty *tp = scdevtotty(dev);
@@ -408,7 +408,7 @@ scread(dev_t dev, struct uio *uio, int flag)
return((*linesw[tp->t_line].l_read)(tp, uio, flag));
}
-int
+int
scwrite(dev_t dev, struct uio *uio, int flag)
{
struct tty *tp = scdevtotty(dev);
@@ -418,7 +418,7 @@ scwrite(dev_t dev, struct uio *uio, int flag)
return((*linesw[tp->t_line].l_write)(tp, uio, flag));
}
-void
+void
scintr(int unit)
{
static struct tty *cur_tty;
@@ -461,10 +461,10 @@ scintr(int unit)
(*linesw[cur_tty->t_line].l_rint)('[', cur_tty);
(*linesw[cur_tty->t_line].l_rint)('Z', cur_tty);
break;
- }
+ }
}
-int
+int
scparam(struct tty *tp, struct termios *t)
{
tp->t_ispeed = t->c_ispeed;
@@ -473,13 +473,13 @@ scparam(struct tty *tp, struct termios *t)
return 0;
}
-int
+int
scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
{
int i, error;
struct tty *tp;
struct trapframe *fp;
- scr_stat *scp;
+ scr_stat *scp;
tp = scdevtotty(dev);
if (!tp)
@@ -498,14 +498,14 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
else
*(int*)data = 0;
return 0;
-
+
case CONS_CURRENT: /* get current adapter type */
if (crtc_vga)
*(int*)data = KD_VGA;
else
if (crtc_addr == MONO_BASE)
*(int*)data = KD_MONO;
- else
+ else
*(int*)data = KD_CGA;
return 0;
@@ -538,7 +538,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
case CONS_HISTORY: /* set history size */
if (*data) {
- free(scp->history, M_DEVBUF);
+ free(scp->history, M_DEVBUF);
scp->history_size = *(int*)data;
if (scp->history_size < scp->ysize)
scp->history = NULL;
@@ -604,7 +604,7 @@ set_mouse_pos:
scp->mouse_xpos = (scp->xsize*8)-1;
if (scp->mouse_ypos >= scp->ysize*fontsize)
scp->mouse_ypos = (scp->ysize*fontsize)-1;
- scp->mouse_pos = scp->scr_buf +
+ scp->mouse_pos = scp->scr_buf +
(scp->mouse_ypos/fontsize)*scp->xsize + scp->mouse_xpos/8;
if (scp->status & MOUSE_ENABLED)
scp->status |= UPDATE_MOUSE;
@@ -664,7 +664,7 @@ set_mouse_pos:
case SW_VGA_C80x60: case SW_VGA_M80x60:
case SW_B40x25: case SW_C40x25:
case SW_B80x25: case SW_C80x25:
- case SW_ENH_B40x25: case SW_ENH_C40x25:
+ case SW_ENH_B40x25: case SW_ENH_C40x25:
case SW_ENH_B80x25: case SW_ENH_C80x25:
case SW_ENH_B80x43: case SW_ENH_C80x43:
@@ -696,26 +696,26 @@ set_mouse_pos:
default:
if ((cmd & 0xff) > M_VGA_CG320)
return EINVAL;
- else
+ else
scp->xsize = *(video_mode_ptr+((cmd&0xff)*64));
scp->ysize = *(video_mode_ptr+((cmd&0xff)*64)+1)+1;
break;
}
scp->mode = cmd & 0xff;
scp->status &= ~UNKNOWN_MODE; /* text mode */
- free(scp->scr_buf, M_DEVBUF);
+ free(scp->scr_buf, M_DEVBUF);
scp->scr_buf = (u_short *)malloc(scp->xsize*scp->ysize*sizeof(u_short),
M_DEVBUF, M_NOWAIT);
if (scp == cur_console)
set_mode(scp);
clear_screen(scp);
- if (tp->t_winsize.ws_col != scp->xsize
+ if (tp->t_winsize.ws_col != scp->xsize
|| tp->t_winsize.ws_row != scp->ysize) {
tp->t_winsize.ws_col = scp->xsize;
tp->t_winsize.ws_row = scp->ysize;
pgsignal(tp->t_pgrp, SIGWINCH, 1);
}
- return 0;
+ return 0;
/* GRAPHICS MODES */
case SW_BG320: case SW_BG640:
@@ -733,7 +733,7 @@ set_mouse_pos:
set_mode(scp);
/* clear_graphics();*/
- if (tp->t_winsize.ws_xpixel != scp->xsize
+ if (tp->t_winsize.ws_xpixel != scp->xsize
|| tp->t_winsize.ws_ypixel != scp->ysize) {
tp->t_winsize.ws_xpixel = scp->xsize;
tp->t_winsize.ws_ypixel = scp->ysize;
@@ -748,11 +748,11 @@ set_mouse_pos:
scp->pid = scp->proc->p_pid;
}
return 0;
-
+
case VT_GETMODE: /* get screen switcher mode */
bcopy(&scp->smode, data, sizeof(struct vt_mode));
return 0;
-
+
case VT_RELDISP: /* screen switcher ioctl */
switch(*data) {
case VT_FALSE: /* user refuses to release screen, abort */
@@ -771,7 +771,7 @@ set_mouse_pos:
new_scp->status |= SWITCH_WAIT_ACQ;
psignal(new_scp->proc, new_scp->smode.acqsig);
}
- else
+ else
switch_in_progress = FALSE;
return 0;
}
@@ -797,24 +797,24 @@ set_mouse_pos:
*data = i + 1;
return 0;
}
- }
+ }
return EINVAL;
case VT_ACTIVATE: /* switch to screen *data */
return switch_scr(scp, (*data) - 1);
case VT_WAITACTIVE: /* wait for switch to occur */
- if (*data > MAXCONS || *data < 0)
+ if (*data > MAXCONS || *data < 0)
return EINVAL;
- if (minor(dev) == (*data) - 1)
+ if (minor(dev) == (*data) - 1)
return 0;
if (*data == 0) {
if (scp == cur_console)
return 0;
}
- else
+ else
scp = console[(*data) - 1];
- while ((error=tsleep((caddr_t)&scp->smode, PZERO|PCATCH,
+ while ((error=tsleep((caddr_t)&scp->smode, PZERO|PCATCH,
"waitvt", 0)) == ERESTART) ;
return error;
@@ -825,7 +825,7 @@ set_mouse_pos:
case KDENABIO: /* allow io operations */
fp = (struct trapframe *)p->p_md.md_regs;
fp->tf_eflags |= PSL_IOPL;
- return 0;
+ return 0;
case KDDISABIO: /* disallow io operations (default) */
fp = (struct trapframe *)p->p_md.md_regs;
@@ -873,7 +873,7 @@ set_mouse_pos:
if (!crtc_vga)
return ENXIO;
scp->border = *data;
- if (scp == cur_console)
+ if (scp == cur_console)
set_border(scp->border);
return 0;
@@ -881,7 +881,7 @@ set_mouse_pos:
if (*data >= 0 && *data <= LOCK_KEY_MASK) {
scp->status &= ~LOCK_KEY_MASK;
scp->status |= *data;
- if (scp == cur_console)
+ if (scp == cur_console)
update_leds(scp->status);
return 0;
}
@@ -984,7 +984,7 @@ set_mouse_pos:
case SETFKEY: /* set functionkey string */
if (*(u_short*)data < n_fkey_tab) {
fkeyarg_t *ptr = (fkeyarg_t*)data;
- bcopy(ptr->keydef, &fkey_tab[ptr->keynum].str,
+ bcopy(ptr->keydef, &fkey_tab[ptr->keynum].str,
min(ptr->flen, MAXFK));
fkey_tab[ptr->keynum].len = min(ptr->flen, MAXFK);
return 0;
@@ -1069,8 +1069,8 @@ set_mouse_pos:
return ENXIO;
default:
break;
- }
-
+ }
+
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
if (error >= 0)
return(error);
@@ -1080,7 +1080,7 @@ set_mouse_pos:
return(ENOTTY);
}
-void
+void
scxint(dev_t dev)
{
struct tty *tp = scdevtotty(dev);
@@ -1094,7 +1094,7 @@ scxint(dev_t dev)
scstart(tp);
}
-void
+void
scstart(struct tty *tp)
{
struct clist *rbp;
@@ -1126,7 +1126,7 @@ scstart(struct tty *tp)
splx(s);
}
-void
+void
pccnprobe(struct consdev *cp)
{
int maj;
@@ -1141,13 +1141,13 @@ pccnprobe(struct consdev *cp)
cp->cn_pri = CN_INTERNAL;
}
-void
+void
pccninit(struct consdev *cp)
{
scinit();
}
-void
+void
pccnputc(dev_t dev, int c)
{
u_char buf[1];
@@ -1169,7 +1169,7 @@ pccnputc(dev_t dev, int c)
scp->term = save;
if (scp == cur_console /* && scrn_timer not running */) {
if (scp->scr_buf != Crtat && (scp->start <= scp->end)) {
- bcopyw(scp->scr_buf + scp->start, Crtat + scp->start,
+ bcopyw(scp->scr_buf + scp->start, Crtat + scp->start,
(1 + scp->end - scp->start) * sizeof(u_short));
scp->start = scp->xsize * scp->ysize;
scp->end = 0;
@@ -1179,7 +1179,7 @@ pccnputc(dev_t dev, int c)
}
}
-int
+int
pccngetc(dev_t dev)
{
int s = spltty(); /* block scintr while we poll */
@@ -1188,13 +1188,13 @@ pccngetc(dev_t dev)
return(c);
}
-int
+int
pccncheckc(dev_t dev)
{
return (scgetc(1) & 0xff);
}
-static void
+static void
scrn_timer()
{
static int cursor_blinkrate;
@@ -1205,11 +1205,11 @@ scrn_timer()
timeout((timeout_func_t)scrn_timer, 0, hz/10);
return;
}
-
+
if (!scrn_blanked) {
/* update screen image */
if (scp->start <= scp->end) {
- bcopyw(scp->scr_buf + scp->start, Crtat + scp->start,
+ bcopyw(scp->scr_buf + scp->start, Crtat + scp->start,
(1 + scp->end - scp->start) * sizeof(u_short));
scp->status &= ~CURSOR_SHOWN;
scp->start = scp->xsize * scp->ysize;
@@ -1229,7 +1229,7 @@ scrn_timer()
timeout((timeout_func_t)scrn_timer, 0, hz/25);
}
-static void
+static void
clear_screen(scr_stat *scp)
{
move_crsr(scp, 0, 0);
@@ -1238,14 +1238,14 @@ clear_screen(scr_stat *scp)
mark_all(scp);
}
-static int
+static int
switch_scr(scr_stat *scp, u_int next_scr)
{
if (switch_in_progress && (cur_console->proc != pfind(cur_console->pid)))
switch_in_progress = FALSE;
- if (next_scr >= MAXCONS || switch_in_progress ||
- (cur_console->smode.mode == VT_AUTO
+ if (next_scr >= MAXCONS || switch_in_progress ||
+ (cur_console->smode.mode == VT_AUTO
&& cur_console->status & UNKNOWN_MODE)) {
do_bell(scp, BELL_PITCH, BELL_DURATION);
return EINVAL;
@@ -1273,7 +1273,7 @@ switch_scr(scr_stat *scp, u_int next_scr)
delayed_next_scr = FALSE;
return 0;
}
-
+
/* has controlling process died? */
if (old_scp->proc && (old_scp->proc != pfind(old_scp->pid)))
old_scp->smode.mode = VT_AUTO;
@@ -1297,8 +1297,8 @@ switch_scr(scr_stat *scp, u_int next_scr)
return 0;
}
-static void
-exchange_scr(void)
+static void
+exchange_scr(void)
{
move_crsr(old_scp, old_scp->xpos, old_scp->ypos);
cur_console = new_scp;
@@ -1327,7 +1327,7 @@ exchange_scr(void)
new_scp->status &= ~CURSOR_SHOWN;
}
-static inline void
+static inline void
move_crsr(scr_stat *scp, int x, int y)
{
if (x < 0 || y < 0 || x >= scp->xsize || y >= scp->ysize)
@@ -1339,10 +1339,10 @@ move_crsr(scr_stat *scp, int x, int y)
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
}
-static void
+static void
scan_esc(scr_stat *scp, u_char c)
{
- static u_char ansi_col[16] =
+ static u_char ansi_col[16] =
{0, 4, 2, 6, 1, 5, 3, 7, 8, 12, 10, 14, 9, 13, 11, 15};
int i, n;
u_short *src, *dst, count;
@@ -1364,7 +1364,7 @@ scan_esc(scr_stat *scp, u_char c)
else {
bcopyw(scp->scr_buf, scp->scr_buf + scp->xsize,
(scp->ysize - 1) * scp->xsize * sizeof(u_short));
- fillw(scp->term.cur_attr | scr_map[0x20],
+ fillw(scp->term.cur_attr | scr_map[0x20],
scp->scr_buf, scp->xsize);
mark_all(scp);
}
@@ -1440,7 +1440,7 @@ scan_esc(scr_stat *scp, u_char c)
case 'f': /* Cursor move */
case 'H':
- if (scp->term.num_param == 0)
+ if (scp->term.num_param == 0)
move_crsr(scp, 0, 0);
else if (scp->term.num_param == 2)
move_crsr(scp, scp->term.param[1] - 1, scp->term.param[0] - 1);
@@ -1454,14 +1454,14 @@ scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of display */
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->cursor_pos,
+ scp->cursor_pos,
scp->scr_buf + scp->xsize * scp->ysize - scp->cursor_pos);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
mark_for_update(scp, scp->xsize * scp->ysize);
break;
case 1: /* clear from beginning of display to cursor */
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->scr_buf,
+ scp->scr_buf,
scp->cursor_pos - scp->scr_buf);
mark_for_update(scp, 0);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
@@ -1480,21 +1480,21 @@ scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of line */
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->cursor_pos,
+ scp->cursor_pos,
scp->xsize - scp->xpos);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf +
scp->xsize - scp->xpos);
break;
case 1: /* clear from beginning of line to cursor */
- fillw(scp->term.cur_attr|scr_map[0x20],
+ fillw(scp->term.cur_attr|scr_map[0x20],
scp->cursor_pos - (scp->xsize - scp->xpos),
(scp->xsize - scp->xpos) + 1);
mark_for_update(scp, scp->ypos * scp->xsize);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
break;
case 2: /* clear entire line */
- fillw(scp->term.cur_attr|scr_map[0x20],
+ fillw(scp->term.cur_attr|scr_map[0x20],
scp->cursor_pos - (scp->xsize - scp->xpos),
scp->xsize);
mark_for_update(scp, scp->ypos * scp->xsize);
@@ -1563,11 +1563,11 @@ scan_esc(scr_stat *scp, u_char c)
n = scp->term.param[0]; if (n < 1) n = 1;
if (n > scp->ysize)
n = scp->ysize;
- bcopyw(scp->scr_buf + (scp->xsize * n),
- scp->scr_buf,
+ bcopyw(scp->scr_buf + (scp->xsize * n),
+ scp->scr_buf,
scp->xsize * (scp->ysize - n) * sizeof(u_short));
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->scr_buf + scp->xsize * (scp->ysize - n),
+ scp->scr_buf + scp->xsize * (scp->ysize - n),
scp->xsize * n);
mark_all(scp);
break;
@@ -1576,11 +1576,11 @@ scan_esc(scr_stat *scp, u_char c)
n = scp->term.param[0]; if (n < 1) n = 1;
if (n > scp->ysize)
n = scp->ysize;
- bcopyw(scp->scr_buf,
+ bcopyw(scp->scr_buf,
scp->scr_buf + (scp->xsize * n),
- scp->xsize * (scp->ysize - n) *
+ scp->xsize * (scp->ysize - n) *
sizeof(u_short));
- fillw(scp->term.cur_attr | scr_map[0x20],
+ fillw(scp->term.cur_attr | scr_map[0x20],
scp->scr_buf, scp->xsize * n);
mark_all(scp);
break;
@@ -1589,8 +1589,8 @@ scan_esc(scr_stat *scp, u_char c)
n = scp->term.param[0]; if (n < 1) n = 1;
if (n > scp->xsize - scp->xpos)
n = scp->xsize - scp->xpos;
- fillw(scp->term.cur_attr | scr_map[0x20],
- scp->scr_buf + scp->xpos +
+ fillw(scp->term.cur_attr | scr_map[0x20],
+ scp->scr_buf + scp->xpos +
((scp->xsize*scp->ypos) * sizeof(u_short)), n);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
mark_for_update(scp, scp->cursor_pos - scp->scr_buf + n);
@@ -1600,9 +1600,9 @@ scan_esc(scr_stat *scp, u_char c)
n = scp->term.param[0]; if (n < 1) n = 1;
if ((i = scp->xpos & 0xf8) == scp->xpos)
i -= 8*n;
- else
- i -= 8*(n-1);
- if (i < 0)
+ else
+ i -= 8*(n-1);
+ if (i < 0)
i = 0;
move_crsr(scp, i, scp->ypos);
break;
@@ -1653,15 +1653,15 @@ scan_esc(scr_stat *scp, u_char c)
scp->term.cur_attr = scp->term.rev_attr;
break;
case 30: case 31: /* set fg color */
- case 32: case 33: case 34:
+ case 32: case 33: case 34:
case 35: case 36: case 37:
- scp->term.cur_attr =
+ scp->term.cur_attr =
(scp->term.cur_attr&0xF8FF) | (ansi_col[(n-30)&7]<<8);
break;
case 40: case 41: /* set bg color */
- case 42: case 43: case 44:
+ case 42: case 43: case 44:
case 45: case 46: case 47:
- scp->term.cur_attr =
+ scp->term.cur_attr =
(scp->term.cur_attr&0x8FFF) | (ansi_col[(n-40)&7]<<12);
break;
}
@@ -1680,12 +1680,12 @@ scan_esc(scr_stat *scp, u_char c)
scp->term.rev_attr = current_default->rev_attr;
break;
case 1: /* set ansi background */
- scp->term.cur_attr = scp->term.std_attr =
+ scp->term.cur_attr = scp->term.std_attr =
(scp->term.std_attr & 0x0F00) |
(ansi_col[(scp->term.param[1])&0x0F]<<12);
break;
case 2: /* set ansi foreground */
- scp->term.cur_attr = scp->term.std_attr =
+ scp->term.cur_attr = scp->term.std_attr =
(scp->term.std_attr & 0xF000) |
(ansi_col[(scp->term.param[1])&0x0F]<<8);
break;
@@ -1694,12 +1694,12 @@ scan_esc(scr_stat *scp, u_char c)
(scp->term.param[1]&0xFF)<<8;
break;
case 5: /* set ansi reverse video background */
- scp->term.rev_attr =
+ scp->term.rev_attr =
(scp->term.rev_attr & 0x0F00) |
(ansi_col[(scp->term.param[1])&0x0F]<<12);
break;
case 6: /* set ansi reverse video foreground */
- scp->term.rev_attr =
+ scp->term.rev_attr =
(scp->term.rev_attr & 0xF000) |
(ansi_col[(scp->term.param[1])&0x0F]<<8);
break;
@@ -1764,38 +1764,38 @@ scan_esc(scr_stat *scp, u_char c)
configuration &= ~CHAR_CURSOR;
}
else if (scp->term.num_param == 2) {
- scp->cursor_start = scp->term.param[0] & 0x1F;
- scp->cursor_end = scp->term.param[1] & 0x1F;
+ scp->cursor_start = scp->term.param[0] & 0x1F;
+ scp->cursor_end = scp->term.param[1] & 0x1F;
if (configuration & CHAR_CURSOR)
set_destructive_cursor(scp, TRUE);
}
break;
case 'F': /* set ansi foreground */
- if (scp->term.num_param == 1)
- scp->term.cur_attr = scp->term.std_attr =
- (scp->term.std_attr & 0xF000)
+ if (scp->term.num_param == 1)
+ scp->term.cur_attr = scp->term.std_attr =
+ (scp->term.std_attr & 0xF000)
| ((scp->term.param[0] & 0x0F) << 8);
break;
case 'G': /* set ansi background */
- if (scp->term.num_param == 1)
- scp->term.cur_attr = scp->term.std_attr =
- (scp->term.std_attr & 0x0F00)
+ if (scp->term.num_param == 1)
+ scp->term.cur_attr = scp->term.std_attr =
+ (scp->term.std_attr & 0x0F00)
| ((scp->term.param[0] & 0x0F) << 12);
break;
case 'H': /* set ansi reverse video foreground */
- if (scp->term.num_param == 1)
- scp->term.rev_attr =
- (scp->term.rev_attr & 0xF000)
+ if (scp->term.num_param == 1)
+ scp->term.rev_attr =
+ (scp->term.rev_attr & 0xF000)
| ((scp->term.param[0] & 0x0F) << 8);
break;
case 'I': /* set ansi reverse video background */
- if (scp->term.num_param == 1)
- scp->term.rev_attr =
- (scp->term.rev_attr & 0x0F00)
+ if (scp->term.num_param == 1)
+ scp->term.rev_attr =
+ (scp->term.rev_attr & 0x0F00)
| ((scp->term.param[0] & 0x0F) << 12);
break;
}
@@ -1803,7 +1803,7 @@ scan_esc(scr_stat *scp, u_char c)
scp->term.esc = 0;
}
-static inline void
+static inline void
draw_cursor(scr_stat *scp, int show)
{
if (show && !(scp->status & CURSOR_SHOWN)) {
@@ -1836,12 +1836,12 @@ draw_cursor(scr_stat *scp, int show)
}
}
-static void
+static void
ansi_put(scr_stat *scp, u_char *buf, int len)
{
u_char *ptr = buf;
- if (scp->status & UNKNOWN_MODE)
+ if (scp->status & UNKNOWN_MODE)
return;
/* make screensaver happy */
@@ -1945,7 +1945,7 @@ outloop:
bcopyw(scp->scr_buf + scp->xsize, scp->scr_buf,
scp->xsize * (scp->ysize - 1) * sizeof(u_short));
fillw(scp->term.cur_attr | scr_map[0x20],
- scp->scr_buf + scp->xsize * (scp->ysize - 1),
+ scp->scr_buf + scp->xsize * (scp->ysize - 1),
scp->xsize);
scp->cursor_pos -= scp->xsize;
scp->ypos--;
@@ -1958,14 +1958,14 @@ outloop:
switch_scr(scp, delayed_next_scr - 1);
}
-static void
+static void
scinit(void)
{
u_short volatile *cp = Crtat + (CGA_BUF-MONO_BUF)/sizeof(u_short), was;
unsigned hw_cursor;
int i;
- if (init_done)
+ if (init_done)
return;
init_done = TRUE;
/*
@@ -2033,7 +2033,7 @@ scinit(void)
scr_map[i] = i;
}
-static scr_stat
+static scr_stat
*alloc_scp()
{
scr_stat *scp;
@@ -2081,7 +2081,7 @@ init_scp(scr_stat *scp)
scp->history_size = HISTORY_SIZE;
}
-static u_char
+static u_char
*get_fstr(u_int c, u_int *len)
{
u_int i;
@@ -2095,7 +2095,7 @@ static u_char
return(fkey_tab[i].str);
}
-static void
+static void
update_leds(int which)
{
int s;
@@ -2113,14 +2113,14 @@ update_leds(int which)
kbd_cmd(xlate_leds[which & LED_MASK]);
splx(s);
}
-
+
static void
history_to_screen(scr_stat *scp)
{
int i;
for (i=0; i<scp->ysize; i++)
- bcopyw(scp->history + (((scp->history_pos - scp->history) +
+ bcopyw(scp->history + (((scp->history_pos - scp->history) +
scp->history_size-((i+1)*scp->xsize))%scp->history_size),
scp->scr_buf + (scp->xsize * (scp->ysize-1 - i)),
scp->xsize * sizeof(u_short));
@@ -2153,11 +2153,11 @@ history_down_line(scr_stat *scp)
}
/*
- * scgetc(noblock) - get character from keyboard.
+ * scgetc(noblock) - get character from keyboard.
* If noblock = 0 wait until a key is pressed.
* Else return NOKEY.
*/
-u_int
+u_int
scgetc(int noblock)
{
u_char scancode, keycode;
@@ -2192,9 +2192,9 @@ next_code:
switch(scancode) {
case 0xB8: /* left alt (compose key) */
if (compose) {
- compose = 0;
+ compose = 0;
if (chr > 255) {
- do_bell(cur_console,
+ do_bell(cur_console,
BELL_PITCH, BELL_DURATION);
chr = 0;
}
@@ -2209,7 +2209,7 @@ next_code:
case 0xE0:
case 0xE1:
esc_flag = scancode;
- goto next_code;
+ goto next_code;
}
break;
case 0xE0: /* 0xE0 prefix */
@@ -2276,13 +2276,13 @@ next_code:
}
break;
case 0xE1: /* 0xE1 prefix */
- esc_flag = 0;
+ esc_flag = 0;
if (keycode == 0x1D)
esc_flag = 0x1D;
goto next_code;
/* NOT REACHED */
case 0x1D: /* pause / break */
- esc_flag = 0;
+ esc_flag = 0;
if (keycode != 0x45)
goto next_code;
keycode = 0x68;
@@ -2300,7 +2300,7 @@ next_code:
/* copy screen into top of history buffer */
for (i=0; i<cur_console->ysize; i++) {
- bcopyw(cur_console->scr_buf + (cur_console->xsize * i),
+ bcopyw(cur_console->scr_buf + (cur_console->xsize * i),
cur_console->history_head,
cur_console->xsize * sizeof(u_short));
cur_console->history_head += cur_console->xsize;
@@ -2319,7 +2319,7 @@ next_code:
case 0x4F: /* end key */
cur_console->history_pos =
- WRAPHIST(cur_console, cur_console->history_head,
+ WRAPHIST(cur_console, cur_console->history_head,
cur_console->xsize*cur_console->ysize);
history_to_screen(cur_console);
goto next_code;
@@ -2358,10 +2358,10 @@ next_code:
case 0x47: case 0x48: case 0x49: /* keypad 7,8,9 */
chr = (scancode - 0x40) + chr*10;
goto next_code;
- case 0x4B: case 0x4C: case 0x4D: /* keypad 4,5,6 */
+ case 0x4B: case 0x4C: case 0x4D: /* keypad 4,5,6 */
chr = (scancode - 0x47) + chr*10;
goto next_code;
- case 0x4F: case 0x50: case 0x51: /* keypad 1,2,3 */
+ case 0x4F: case 0x50: case 0x51: /* keypad 1,2,3 */
chr = (scancode - 0x4E) + chr*10;
goto next_code;
case 0x52: /* keypad 0 */
@@ -2370,8 +2370,8 @@ next_code:
/* key release, no interest here */
case 0xC7: case 0xC8: case 0xC9: /* keypad 7,8,9 */
- case 0xCB: case 0xCC: case 0xCD: /* keypad 4,5,6 */
- case 0xCF: case 0xD0: case 0xD1: /* keypad 1,2,3 */
+ case 0xCB: case 0xCC: case 0xCD: /* keypad 4,5,6 */
+ case 0xCF: case 0xD0: case 0xD1: /* keypad 1,2,3 */
case 0xD2: /* keypad 0 */
goto next_code;
@@ -2381,12 +2381,12 @@ next_code:
if (chr) {
compose = chr = 0;
do_bell(cur_console, BELL_PITCH, BELL_DURATION);
- goto next_code;
+ goto next_code;
}
break;
}
}
-
+
state = (shfts ? 1 : 0 ) | (2 * (ctls ? 1 : 0)) | (4 * (alts ? 1 : 0));
if ((!agrs && (cur_console->status & ALKED))
|| (agrs && !(cur_console->status & ALKED)))
@@ -2420,7 +2420,7 @@ next_code:
alts &= ~2;
break;
case NLK:
- nlkcnt = 0;
+ nlkcnt = 0;
break;
case CLK:
clkcnt = 0;
@@ -2452,7 +2452,7 @@ next_code:
case NLK:
if (!nlkcnt) {
nlkcnt++;
- if (cur_console->status & NLKED)
+ if (cur_console->status & NLKED)
cur_console->status &= ~NLKED;
else
cur_console->status |= NLKED;
@@ -2479,7 +2479,7 @@ next_code:
u_short *ptr = cur_console->history_save;
for (i=0; i<cur_console->ysize; i++) {
- bcopyw(ptr,
+ bcopyw(ptr,
cur_console->scr_buf +
(cur_console->xsize*i),
cur_console->xsize * sizeof(u_short));
@@ -2495,8 +2495,8 @@ next_code:
mark_all(cur_console);
}
scstart(VIRTUAL_TTY(get_scr_num()));
- }
- else
+ }
+ else
cur_console->status |= SLKED;
update_leds(cur_console->status);
}
@@ -2517,9 +2517,9 @@ next_code:
break;
case RBT:
shutdown_nice();
- break;
+ break;
case SUSP:
-#if NAPM > 0
+#if NAPM > 0
apm_suspend();
#endif
break;
@@ -2528,7 +2528,7 @@ next_code:
#ifdef DDB /* try to switch to console 0 */
if (cur_console->smode.mode == VT_AUTO &&
console[0]->smode.mode == VT_AUTO)
- switch_scr(cur_console, 0);
+ switch_scr(cur_console, 0);
Debugger("manual escape to debugger");
return(NOKEY);
#else
@@ -2569,7 +2569,7 @@ next_code:
switch_scr(cur_console, action - F_SCR);
break;
}
- if (action >= F_FN && action <= L_FN)
+ if (action >= F_FN && action <= L_FN)
action |= FKEY;
return(action);
}
@@ -2583,7 +2583,7 @@ next_code:
goto next_code;
}
-int
+int
scmmap(dev_t dev, int offset, int nprot)
{
if (offset > 0x20000 - PAGE_SIZE)
@@ -2591,19 +2591,19 @@ scmmap(dev_t dev, int offset, int nprot)
return i386_btop((VIDEOMEM + offset));
}
-static void
+static void
kbd_wait(void)
{
int i = 1000;
while (i--) {
- if ((inb(KB_STAT) & KB_READY) == 0)
+ if ((inb(KB_STAT) & KB_READY) == 0)
break;
DELAY (10);
}
}
-static void
+static void
kbd_cmd(u_char command)
{
int retry = 5;
@@ -2637,7 +2637,7 @@ kbd_cmd(u_char command)
} while (retry--);
}
-static void
+static void
set_mode(scr_stat *scp)
{
char *modetable;
@@ -2649,11 +2649,11 @@ set_mode(scr_stat *scp)
/* setup video hardware for the given mode */
switch (scp->mode) {
- case M_VGA_M80x60:
+ case M_VGA_M80x60:
bcopyw(video_mode_ptr+(64*M_VGA_M80x25),&special_modetable, 64);
goto special_80x60;
- case M_VGA_C80x60:
+ case M_VGA_C80x60:
bcopyw(video_mode_ptr+(64*M_VGA_C80x25),&special_modetable, 64);
special_80x60:
special_modetable[2] = 0x08;
@@ -2673,7 +2673,7 @@ special_480l:
special_modetable[16] = 0x08;
special_modetable[17] = 0x3e;
special_modetable[26] = 0xea;
- special_modetable[28] = 0xdf;
+ special_modetable[28] = 0xdf;
special_modetable[31] = 0xe7;
special_modetable[32] = 0x04;
modetable = special_modetable;
@@ -2685,17 +2685,17 @@ special_480l:
case M_ENH_C80x43:
bcopyw(video_mode_ptr+(64*M_ENH_C80x25),&special_modetable, 64);
-special_80x43:
+special_80x43:
special_modetable[28] = 87;
goto special_80x50;
- case M_VGA_M80x50:
+ case M_VGA_M80x50:
bcopyw(video_mode_ptr+(64*M_VGA_M80x25),&special_modetable, 64);
goto special_80x50;
case M_VGA_C80x50:
bcopyw(video_mode_ptr+(64*M_VGA_C80x25),&special_modetable, 64);
-special_80x50:
+special_80x50:
special_modetable[2] = 8;
special_modetable[19] = 7;
modetable = special_modetable;
@@ -2737,7 +2737,7 @@ setup_mode:
case M_CG320_D: case M_CG640_E:
case M_CG640x350: case M_ENH_CG640:
case M_BG640x480: case M_CG640x480: case M_VGA_CG320:
-
+
set_vgaregs(video_mode_ptr + (scp->mode * 64));
break;
@@ -2751,11 +2751,11 @@ setup_mode:
return;
}
-void
+void
set_border(int color)
{
inb(crtc_addr+6); /* reset flip-flop */
- outb(ATC, 0x11); outb(ATC, color);
+ outb(ATC, 0x11); outb(ATC, color);
inb(crtc_addr+6); /* reset flip-flop */
outb(ATC, 0x20); /* enable Palette */
}
@@ -2768,7 +2768,7 @@ set_vgaregs(char *modetable)
outb(TSIDX, 0x00); outb(TSREG, 0x01); /* stop sequencer */
outb(TSIDX, 0x07); outb(TSREG, 0x00); /* unlock registers */
for (i=0; i<4; i++) { /* program sequencer */
- outb(TSIDX, i+1);
+ outb(TSIDX, i+1);
outb(TSREG, modetable[i+5]);
}
outb(MISC, modetable[9]); /* set dot-clock */
@@ -2776,7 +2776,7 @@ set_vgaregs(char *modetable)
outb(crtc_addr, 0x11);
outb(crtc_addr+1, inb(crtc_addr+1) & 0x7F);
for (i=0; i<25; i++) { /* program crtc */
- outb(crtc_addr, i);
+ outb(crtc_addr, i);
if (i == 14 || i == 15) /* no hardware cursor */
outb(crtc_addr+1, 0xff);
else
@@ -2784,11 +2784,11 @@ set_vgaregs(char *modetable)
}
inb(crtc_addr+6); /* reset flip-flop */
for (i=0; i<20; i++) { /* program attribute ctrl */
- outb(ATC, i);
+ outb(ATC, i);
outb(ATC, modetable[i+35]);
}
for (i=0; i<9; i++) { /* program graph data ctrl */
- outb(GDCIDX, i);
+ outb(GDCIDX, i);
outb(GDCREG, modetable[i+55]);
}
inb(crtc_addr+6); /* reset flip-flop */
@@ -2807,7 +2807,7 @@ set_font_mode()
outb(TSIDX, 0x04); outb(TSREG, 0x06);
outb(GDCIDX, 0x04); outb(GDCREG, 0x02);
outb(GDCIDX, 0x05); outb(GDCREG, 0x00);
- outb(GDCIDX, 0x06); outb(GDCREG, 0x05);
+ outb(GDCIDX, 0x06); outb(GDCREG, 0x05);
#else
outw(TSIDX, 0x0402);
outw(TSIDX, 0x0604);
@@ -2849,7 +2849,7 @@ set_normal_mode()
splx(s);
}
-static void
+static void
copy_font(int operation, int font_type, char* font_image)
{
int ch, line, segment, fontsize;
@@ -2873,11 +2873,11 @@ copy_font(int operation, int font_type, char* font_image)
outb(TSIDX, 0x01); val = inb(TSREG); /* disable screen */
outb(TSIDX, 0x01); outb(TSREG, val | 0x20);
set_font_mode();
- for (ch=0; ch < 256; ch++)
- for (line=0; line < fontsize; line++)
+ for (ch=0; ch < 256; ch++)
+ for (line=0; line < fontsize; line++)
if (operation)
*(char *)pa_to_va(VIDEOMEM+(segment)+(ch*32)+line) =
- font_image[(ch*fontsize)+line];
+ font_image[(ch*fontsize)+line];
else
font_image[(ch*fontsize)+line] =
*(char *)pa_to_va(VIDEOMEM+(segment)+(ch*32)+line);
@@ -2885,7 +2885,7 @@ copy_font(int operation, int font_type, char* font_image)
outb(TSIDX, 0x01); outb(TSREG, val & 0xDF); /* enable screen */
}
-static void
+static void
set_destructive_cursor(scr_stat *scp, int force)
{
u_char cursor[32];
@@ -2918,7 +2918,7 @@ set_destructive_cursor(scr_stat *scp, int force)
bcopyw(font_buffer + ((scp->cursor_saveunder & 0xff) * font_size),
cursor, font_size);
for (i=0; i<32; i++)
- if ((i >= scp->cursor_start && i <= scp->cursor_end) ||
+ if ((i >= scp->cursor_start && i <= scp->cursor_end) ||
(scp->cursor_start >= font_size && i == font_size - 1))
cursor[i] |= 0xff;
while (!(inb(crtc_addr+6) & 0x08)) /* wait for vertical retrace */ ;
@@ -3018,25 +3018,25 @@ draw_mouse_image(scr_stat *scp)
set_normal_mode();
}
-static void
+static void
save_palette(void)
{
int i;
- outb(PALRADR, 0x00);
- for (i=0x00; i<0x300; i++)
+ outb(PALRADR, 0x00);
+ for (i=0x00; i<0x300; i++)
palette[i] = inb(PALDATA);
inb(crtc_addr+6); /* reset flip/flop */
}
-void
+void
load_palette(void)
{
int i;
outb(PIXMASK, 0xFF); /* no pixelmask */
- outb(PALWADR, 0x00);
- for (i=0x00; i<0x300; i++)
+ outb(PALWADR, 0x00);
+ for (i=0x00; i<0x300; i++)
outb(PALDATA, palette[i]);
inb(crtc_addr+6); /* reset flip/flop */
outb(ATC, 0x20); /* enable palette */
@@ -3052,7 +3052,7 @@ do_bell(scr_stat *scp, int pitch, int duration)
blink_in_progress = 4;
blink_screen(scp);
timeout((timeout_func_t)blink_screen, scp, hz/10);
- }
+ }
else
sysbeep(pitch, duration);
}
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 649b6535be52..4b22de6e83b9 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -6,7 +6,7 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
+ * notice, this list of conditions and the following disclaimer
* in this position and unchanged.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.h,v 1.7 1995/04/04 20:04:17 sos Exp $
+ * $Id: syscons.h,v 1.8 1995/04/23 10:15:38 bde Exp $
*/
#ifndef SYSCONS_H
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c
index 310b8e54eb26..d5d268717e16 100644
--- a/sys/dev/vn/vn.c
+++ b/sys/dev/vn/vn.c
@@ -156,7 +156,7 @@ vnopen(dev_t dev, int flags, int mode, struct proc *p)
if (unit >= NVN) {
if (vn_options & VN_FOLLOW)
- printf("vnopen(0x%lx, 0x%x, 0x%x, %p)\n",
+ printf("vnopen(0x%lx, 0x%x, 0x%x, %p)\n",
dev, flags, mode, p);
return(ENOENT);
}
@@ -184,14 +184,14 @@ vnopen(dev_t dev, int flags, int mode, struct proc *p)
label.d_ntracks = 64;
label.d_ncylinders = vn->sc_size / (32 * 64);
label.d_secpercyl = 32 * 64;
- label.d_secperunit =
+ label.d_secperunit =
label.d_partitions[RAW_PART].p_size =
vn->sc_size;
return (dsopen("vn", dev, mode, &vn->sc_slices, &label,
vnstrategy, (ds_setgeom_t *)NULL));
}
- if (dkslice(dev) != WHOLE_DISK_SLICE ||
+ if (dkslice(dev) != WHOLE_DISK_SLICE ||
dkpart(dev) != RAW_PART ||
mode != S_IFCHR)
return (ENXIO);
@@ -277,9 +277,9 @@ vnstrategy(struct buf *bp)
daddr_t bsize;
int flags, resid;
caddr_t addr;
-
+
struct buf *nbp;
-
+
nbp = getvnbuf();
bn = dbtob(bn);
@@ -359,7 +359,7 @@ vnstrategy(struct buf *bp)
putvnbuf(nbp);
return;
}
-
+
bn += sz;
addr += sz;
resid -= sz;
@@ -409,7 +409,7 @@ vnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
if (error != -1)
return (error);
}
- if (dkslice(dev) != WHOLE_DISK_SLICE ||
+ if (dkslice(dev) != WHOLE_DISK_SLICE ||
dkpart(dev) != RAW_PART)
return (ENOTTY);
}
@@ -456,8 +456,8 @@ vnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
IFOPT(vn, VN_LABELS) {
/*
* Reopen so that `ds' knows which devices are open.
- * If this is the first VNIOCSET, then we've
- * guaranteed that the device is the cdev and that
+ * If this is the first VNIOCSET, then we've
+ * guaranteed that the device is the cdev and that
* no other slices or labels are open. Otherwise,
* we rely on VNIOCCLR not being abused.
*/
@@ -485,7 +485,7 @@ vnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
IFOPT(vn, VN_FOLLOW)
printf("vnioctl: CLRed\n");
break;
-
+
case VNIOCGSET:
vn_options |= *f;
*f = vn_options;
@@ -518,7 +518,7 @@ vnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
* to this "disk" is essentially as root. Note that credentials may change
* if some other uid can write directly to the mapped file (NFS).
*/
-int
+int
vnsetcred(struct vn_softc *vn, struct ucred *cred)
{
struct uio auio;