Remove trailing whitespace.
This commit is contained in:
parent
44204187ec
commit
9b2e535452
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8876
@ -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: console.h,v 1.15 1995/01/20 08:35:18 sos Exp $
|
||||
* $Id: console.h,v 1.18 1995/01/28 22:15:30 sos Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CONSOLE_H_
|
||||
@ -47,7 +47,7 @@
|
||||
#define KIOCSOUND _IO('K', 63)
|
||||
#define KDGKBTYPE _IOR('K', 64, int)
|
||||
#define KDGETLED _IOR('K', 65, int)
|
||||
#define KDSETLED _IO('K', 66)
|
||||
#define KDSETLED _IO('K', 66)
|
||||
#define KDSETRAD _IO('K', 67)
|
||||
|
||||
#define GETFKEY _IOWR('k', 0, fkeyarg_t)
|
||||
@ -79,14 +79,14 @@
|
||||
#define CONS_GETVERS _IOR('c', 74, int)
|
||||
|
||||
#define VT_OPENQRY _IOR('v', 1, int)
|
||||
#define VT_SETMODE _IOW('v', 2, vtmode_t)
|
||||
#define VT_SETMODE _IOW('v', 2, vtmode_t)
|
||||
#define VT_GETMODE _IOR('v', 3, vtmode_t)
|
||||
#define VT_RELDISP _IO('v', 4)
|
||||
#define VT_ACTIVATE _IO('v', 5)
|
||||
#define VT_WAITACTIVE _IO('v', 6)
|
||||
#define VT_GETACTIVE _IOR('v', 7, int)
|
||||
|
||||
#define VT_FALSE 0
|
||||
#define VT_FALSE 0
|
||||
#define VT_TRUE 1
|
||||
#define VT_ACKACQ 2
|
||||
|
||||
@ -135,7 +135,7 @@ struct mouse_info {
|
||||
#define NLKED 2 /* Num locked */
|
||||
#define SLKED 4 /* Scroll locked */
|
||||
#define ALKED 8 /* AltGr locked */
|
||||
#define LED_CAP 1 /* Caps lock LED */
|
||||
#define LED_CAP 1 /* Caps lock LED */
|
||||
#define LED_NUM 2 /* Num lock LED */
|
||||
#define LED_SCR 4 /* Scroll lock LED */
|
||||
|
||||
|
@ -34,13 +34,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
|
||||
* $Id: autoconf.c,v 1.31 1995/05/14 02:59:51 davidg Exp $
|
||||
* $Id: autoconf.c,v 1.32 1995/05/29 04:08:13 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Setup the system to run on the current machine.
|
||||
*
|
||||
* Configure() is called at boot time and initializes the vba
|
||||
* Configure() is called at boot time and initializes the vba
|
||||
* device tables and the memory controller monitoring. Available
|
||||
* devices are determined (from possibilities mentioned in ioconf.c),
|
||||
* and the drivers are initialized.
|
||||
@ -237,7 +237,7 @@ setdumpdev(dev)
|
||||
dumpdev = dev;
|
||||
dumplo = newdumplo;
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
u_long bootdev = 0; /* not a dev_t - encoding is different */
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_disasm.c,v 1.7 1994/10/08 22:19:47 phk Exp $
|
||||
* $Id: db_disasm.c,v 1.8 1995/01/29 02:38:15 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_interface.c,v 1.12 1995/03/16 18:11:25 bde Exp $
|
||||
* $Id: db_interface.c,v 1.13 1995/04/08 21:31:53 joerg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_trace.c,v 1.9 1995/03/01 21:37:44 davidg Exp $
|
||||
* $Id: db_trace.c,v 1.10 1995/03/16 18:11:26 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -127,13 +127,13 @@ db_numargs(fp)
|
||||
return (args);
|
||||
}
|
||||
|
||||
/*
|
||||
* Figure out the next frame up in the call stack.
|
||||
* For trap(), we print the address of the faulting instruction and
|
||||
/*
|
||||
* Figure out the next frame up in the call stack.
|
||||
* For trap(), we print the address of the faulting instruction and
|
||||
* proceed with the calling frame. We return the ip that faulted.
|
||||
* If the trap was caused by jumping through a bogus pointer, then
|
||||
* the next line in the backtrace will list some random function as
|
||||
* being called. It should get the argument list correct, though.
|
||||
* the next line in the backtrace will list some random function as
|
||||
* being called. It should get the argument list correct, though.
|
||||
* It might be possible to dig out from the next frame up the name
|
||||
* of the function that faulted, but that could get hairy.
|
||||
*/
|
||||
|
@ -32,7 +32,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: npx.c,v 1.21 1995/03/05 04:06:44 wpaul Exp $
|
||||
* $Id: npx.c,v 1.22 1995/04/12 20:48:01 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -280,7 +280,7 @@ npxprobe1(dvp)
|
||||
/*
|
||||
* Good, now check for a proper control word.
|
||||
*/
|
||||
control = 0x5a5a;
|
||||
control = 0x5a5a;
|
||||
fnstcw(&control);
|
||||
if ((control & 0x1f3f) == 0x033f) {
|
||||
hw_float = npx_exists = 1;
|
||||
@ -344,7 +344,7 @@ npxattach(dvp)
|
||||
printf("npx%d: INT 16 interface\n", dvp->id_unit);
|
||||
else if (npx_irq13)
|
||||
; /* higher level has printed "irq 13" */
|
||||
#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE)
|
||||
#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE)
|
||||
else if (npx_exists) {
|
||||
printf("npx%d: error reporting broken; using 387 emulator\n",
|
||||
dvp->id_unit);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
|
||||
* $Id: genassym.c,v 1.25 1995/02/14 18:01:24 phk Exp $
|
||||
* $Id: genassym.c,v 1.26 1995/05/25 07:41:18 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -43,10 +43,10 @@
|
||||
#include <sys/proc.h>
|
||||
/* XXX This is just real ugly to have to do, but it is what you have to do! */
|
||||
#ifndef NFS
|
||||
#define NFS
|
||||
#define NFS
|
||||
#include <sys/mount.h>
|
||||
#undef NFS
|
||||
#else
|
||||
#else
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
#include <sys/mbuf.h>
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.126 1995/05/12 19:17:14 wollman Exp $
|
||||
* $Id: machdep.c,v 1.127 1995/05/25 07:41:20 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -389,7 +389,7 @@ cpu_startup()
|
||||
printf(" %x:%08x", i, j);
|
||||
printf(" %d cyl, %d heads, %d sects\n",
|
||||
j >> 16, (j >> 8) & 0xff, j & 0xff);
|
||||
|
||||
|
||||
}
|
||||
printf(" %d accounted for\n", bootinfo.bi_n_bios_used);
|
||||
}
|
||||
@ -421,7 +421,7 @@ static void
|
||||
identifycpu()
|
||||
{
|
||||
printf("CPU: ");
|
||||
if (cpu >= 0
|
||||
if (cpu >= 0
|
||||
&& cpu < (sizeof i386_cpus/sizeof(struct cpu_nameclass))) {
|
||||
cpu_class = i386_cpus[cpu].cpu_class;
|
||||
strncpy(cpu_model, i386_cpus[cpu].cpu_name, sizeof cpu_model);
|
||||
@ -442,8 +442,8 @@ identifycpu()
|
||||
cpu_model[0] = '\0';
|
||||
|
||||
switch (cpu_id & 0x3000) {
|
||||
case 0x1000:
|
||||
strcpy(cpu_model, "Overdrive ");
|
||||
case 0x1000:
|
||||
strcpy(cpu_model, "Overdrive ");
|
||||
break;
|
||||
case 0x2000:
|
||||
strcpy(cpu_model, "Dual ");
|
||||
@ -478,7 +478,7 @@ identifycpu()
|
||||
case 0x480:
|
||||
strcat(cpu_model, "DX4"); break;
|
||||
#if defined(I586_CPU)
|
||||
case 0x510:
|
||||
case 0x510:
|
||||
if (pentium_mhz == 60) {
|
||||
strcat(cpu_model, "510\\60");
|
||||
} else if (pentium_mhz == 66) {
|
||||
@ -630,7 +630,7 @@ sendsig(catcher, sig, mask, code)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Build the argument list for the signal handler.
|
||||
*/
|
||||
if (p->p_sysent->sv_sigtbl) {
|
||||
@ -868,7 +868,7 @@ boot(arghowto)
|
||||
if (howto & RB_DUMP) {
|
||||
savectx(&dumppcb, 0);
|
||||
dumppcb.pcb_ptd = rcr3();
|
||||
dumpsys();
|
||||
dumpsys();
|
||||
|
||||
if (PANIC_REBOOT_WAIT_TIME != 0) {
|
||||
if (PANIC_REBOOT_WAIT_TIME != -1) {
|
||||
@ -1321,7 +1321,7 @@ init386(first)
|
||||
#ifdef COMPAT_LINUX
|
||||
setidt(0x80, &IDTVEC(linux_syscall), SDT_SYS386TGT, SEL_UPL);
|
||||
#endif
|
||||
|
||||
|
||||
#include "isa.h"
|
||||
#if NISA >0
|
||||
isa_defaultirq();
|
||||
@ -1507,7 +1507,7 @@ init386(first)
|
||||
proc0.p_addr->u_pcb.pcb_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL) ;
|
||||
gsel_tss = GSEL(GPROC0_SEL, SEL_KPL);
|
||||
|
||||
((struct i386tss *)gdt_segs[GPROC0_SEL].ssd_base)->tss_ioopt =
|
||||
((struct i386tss *)gdt_segs[GPROC0_SEL].ssd_base)->tss_ioopt =
|
||||
(sizeof(tss))<<16;
|
||||
|
||||
ltr(gsel_tss);
|
||||
|
@ -39,7 +39,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.56 1995/04/09 05:40:38 davidg Exp $
|
||||
* $Id: pmap.c,v 1.57 1995/05/11 19:26:11 rgrimes Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -167,7 +167,7 @@ struct msgbuf *msgbufp;
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
void
|
||||
init_pv_entries(int);
|
||||
|
||||
/*
|
||||
@ -178,7 +178,7 @@ init_pv_entries(int);
|
||||
* [ what about induced faults -wfj]
|
||||
*/
|
||||
|
||||
inline pt_entry_t * const
|
||||
inline pt_entry_t * const
|
||||
pmap_pte(pmap, va)
|
||||
register pmap_t pmap;
|
||||
vm_offset_t va;
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
|
||||
* $Id: sys_machdep.c,v 1.7 1995/03/04 02:25:36 davidg Exp $
|
||||
* $Id: sys_machdep.c,v 1.8 1995/03/10 08:13:07 davidg Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -64,11 +64,11 @@ sysarch(p, uap, retval)
|
||||
|
||||
switch(uap->op) {
|
||||
#ifdef USER_LDT
|
||||
case I386_GET_LDT:
|
||||
case I386_GET_LDT:
|
||||
error = i386_get_ldt(p, uap->parms, retval);
|
||||
break;
|
||||
|
||||
case I386_SET_LDT:
|
||||
case I386_SET_LDT:
|
||||
error = i386_set_ldt(p, uap->parms, retval);
|
||||
break;
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.50 1995/03/21 07:02:51 davidg Exp $
|
||||
* $Id: trap.c,v 1.51 1995/03/21 07:16:12 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -174,7 +174,7 @@ trap(frame)
|
||||
|
||||
type = frame.tf_trapno;
|
||||
code = frame.tf_err;
|
||||
|
||||
|
||||
if (ISPL(frame.tf_cs) == SEL_UPL) {
|
||||
/* user trap */
|
||||
|
||||
@ -262,7 +262,7 @@ trap(frame)
|
||||
return;
|
||||
#endif /* NNPX > 0 */
|
||||
|
||||
#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE)
|
||||
#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE)
|
||||
i = math_emulate(&frame);
|
||||
if (i == 0) {
|
||||
if (!(frame.tf_eflags & PSL_T))
|
||||
@ -352,7 +352,7 @@ trap(frame)
|
||||
frame.tf_eflags &= ~PSL_T;
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
||||
#if NISA > 0
|
||||
case T_NMI:
|
||||
#ifdef DDB
|
||||
@ -376,7 +376,7 @@ trap(frame)
|
||||
#ifdef DEBUG
|
||||
eva = rcr2();
|
||||
if (type <= MAX_TRAP_MSG) {
|
||||
uprintf("fatal process exception: %s",
|
||||
uprintf("fatal process exception: %s",
|
||||
trap_msg[type]);
|
||||
if ((type == T_PAGEFLT) || (type == T_PROTFLT))
|
||||
uprintf(", fault VA = 0x%x", eva);
|
||||
@ -464,7 +464,7 @@ trap_pfault(frame, usermode)
|
||||
v = (vm_offset_t) vtopte(va);
|
||||
|
||||
/* Fault the pte only if needed: */
|
||||
*(volatile char *)v += 0;
|
||||
*(volatile char *)v += 0;
|
||||
|
||||
pmap_use_pt( vm_map_pmap(map), va);
|
||||
|
||||
@ -580,7 +580,7 @@ trap_pfault(frame, usermode)
|
||||
*/
|
||||
|
||||
/* Fault the pte only if needed: */
|
||||
*(volatile char *)v += 0;
|
||||
*(volatile char *)v += 0;
|
||||
|
||||
pmap_use_pt( vm_map_pmap(map), va);
|
||||
|
||||
@ -804,7 +804,7 @@ syscall(frame)
|
||||
|
||||
if (p->p_sysent->sv_mask)
|
||||
code = code & p->p_sysent->sv_mask;
|
||||
|
||||
|
||||
if (code >= p->p_sysent->sv_size)
|
||||
callp = &p->p_sysent->sv_table[0];
|
||||
else
|
||||
@ -852,7 +852,7 @@ syscall(frame)
|
||||
if (p->p_sysent->sv_errsize)
|
||||
if (error >= p->p_sysent->sv_errsize)
|
||||
error = -1; /* XXX */
|
||||
else
|
||||
else
|
||||
error = p->p_sysent->sv_errtbl[error];
|
||||
frame.tf_eax = error;
|
||||
frame.tf_eflags |= PSL_C; /* carry bit */
|
||||
@ -966,7 +966,7 @@ linux_syscall(frame)
|
||||
if (p->p_sysent->sv_errsize)
|
||||
if (error >= p->p_sysent->sv_errsize)
|
||||
error = -1; /* XXX */
|
||||
else
|
||||
else
|
||||
error = p->p_sysent->sv_errtbl[error];
|
||||
frame.tf_eax = -error;
|
||||
frame.tf_eflags |= PSL_C; /* carry bit */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.32 1995/03/16 18:11:58 bde Exp $
|
||||
* $Id: clock.c,v 1.33 1995/05/11 07:44:40 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -193,7 +193,7 @@ int
|
||||
acquire_timer0(int rate, void (*function) __P((struct clockframe *frame)))
|
||||
{
|
||||
if (timer0_state || TIMER_DIV(rate) < TIMER0_MIN_MAX_COUNT ||
|
||||
!function)
|
||||
!function)
|
||||
return -1;
|
||||
new_function = function;
|
||||
new_rate = rate;
|
||||
@ -204,7 +204,7 @@ acquire_timer0(int rate, void (*function) __P((struct clockframe *frame)))
|
||||
int
|
||||
acquire_timer2(int mode)
|
||||
{
|
||||
if (timer2_state)
|
||||
if (timer2_state)
|
||||
return -1;
|
||||
timer2_state = 1;
|
||||
outb(TIMER_MODE, TIMER_SEL2 | (mode &0x3f));
|
||||
@ -265,7 +265,7 @@ printrtc(void)
|
||||
#endif
|
||||
|
||||
static int
|
||||
getit()
|
||||
getit()
|
||||
{
|
||||
int high, low;
|
||||
|
||||
@ -307,7 +307,7 @@ calibrate_cyclecounter(void)
|
||||
|
||||
/*
|
||||
* Wait "n" microseconds.
|
||||
* Relies on timer 1 counting down from (TIMER_FREQ / hz)
|
||||
* Relies on timer 1 counting down from (TIMER_FREQ / hz)
|
||||
* Note: timer had better have been programmed before this is first used!
|
||||
*/
|
||||
void
|
||||
@ -339,7 +339,7 @@ DELAY(int n)
|
||||
prev_tick = getit(0, 0);
|
||||
n -= 20;
|
||||
/*
|
||||
* Calculate (n * (TIMER_FREQ / 1e6)) without using floating point
|
||||
* Calculate (n * (TIMER_FREQ / 1e6)) without using floating point
|
||||
* and without any avoidable overflows.
|
||||
*/
|
||||
sec = n / 1000000;
|
||||
@ -375,11 +375,11 @@ sysbeepstop(void *chan)
|
||||
beeping = 0;
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
sysbeep(int pitch, int period)
|
||||
{
|
||||
|
||||
if (acquire_timer2(TIMER_SQWAVE|TIMER_16BIT))
|
||||
if (acquire_timer2(TIMER_SQWAVE|TIMER_16BIT))
|
||||
return -1;
|
||||
disable_intr();
|
||||
outb(TIMER_CNTR2, pitch);
|
||||
@ -426,7 +426,7 @@ readrtc(int port)
|
||||
* XXX initialization of other timers is unintentionally left blank.
|
||||
*/
|
||||
void
|
||||
startrtclock()
|
||||
startrtclock()
|
||||
{
|
||||
timer0_max_count = hardclock_max_count = TIMER_DIV(hz);
|
||||
timer0_overflow_threshold = timer0_max_count - TIMER0_LATCH_COUNT;
|
||||
|
@ -38,7 +38,7 @@
|
||||
*
|
||||
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
|
||||
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
|
||||
* $Id: vm_machdep.c,v 1.37 1995/05/01 23:32:30 dyson Exp $
|
||||
* $Id: vm_machdep.c,v 1.38 1995/05/18 09:17:07 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -232,7 +232,7 @@ vm_bounce_kva(size, waitok)
|
||||
* same as vm_bounce_kva -- but really allocate (but takes pages as arg)
|
||||
*/
|
||||
vm_offset_t
|
||||
vm_bounce_kva_alloc(count)
|
||||
vm_bounce_kva_alloc(count)
|
||||
int count;
|
||||
{
|
||||
int i;
|
||||
@ -308,7 +308,7 @@ vm_bounce_alloc(bp)
|
||||
* printf("size: %d, count: %d\n", bp->b_bufsize, bp->b_bcount);
|
||||
* }
|
||||
*/
|
||||
|
||||
|
||||
|
||||
vastart = (vm_offset_t) bp->b_data;
|
||||
vaend = (vm_offset_t) bp->b_data + bp->b_bufsize;
|
||||
@ -332,7 +332,7 @@ vm_bounce_alloc(bp)
|
||||
if (dobounceflag == 0)
|
||||
return;
|
||||
|
||||
if (bouncepages < dobounceflag)
|
||||
if (bouncepages < dobounceflag)
|
||||
panic("Not enough bounce buffers!!!");
|
||||
|
||||
/*
|
||||
@ -445,7 +445,7 @@ vm_bounce_free(bp)
|
||||
/*
|
||||
* free the bounce allocation
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
printf("(kva: %x, pa: %x)", bouncekva, mybouncepa);
|
||||
*/
|
||||
@ -463,7 +463,7 @@ vm_bounce_free(bp)
|
||||
/*
|
||||
* add the old kva into the "to free" list
|
||||
*/
|
||||
|
||||
|
||||
bouncekva= i386_trunc_page((vm_offset_t) bp->b_data);
|
||||
bouncekvaend= i386_round_page((vm_offset_t)bp->b_data + bp->b_bufsize);
|
||||
|
||||
@ -491,7 +491,7 @@ vm_bounce_init()
|
||||
|
||||
if (bouncepages == 0)
|
||||
return;
|
||||
|
||||
|
||||
bounceallocarraysize = (bouncepages + BITS_IN_UNSIGNED - 1) / BITS_IN_UNSIGNED;
|
||||
bounceallocarray = malloc(bounceallocarraysize * sizeof(unsigned), M_TEMP, M_NOWAIT);
|
||||
|
||||
@ -552,7 +552,7 @@ cpu_fork(p1, p2)
|
||||
int offset;
|
||||
|
||||
/*
|
||||
* Copy pcb and stack from proc p1 to p2.
|
||||
* Copy pcb and stack from proc p1 to p2.
|
||||
* We do this as cheaply as possible, copying only the active
|
||||
* part of the stack. The stack and pcb need to agree;
|
||||
* this is tricky, as the final pcb is constructed by savectx,
|
||||
@ -571,7 +571,7 @@ cpu_fork(p1, p2)
|
||||
pmap_activate(&p2->p_vmspace->vm_pmap, &up->u_pcb);
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Arrange for a non-local goto when the new process
|
||||
* is started, to resume here, returning nonzero from setjmp.
|
||||
*/
|
||||
@ -588,7 +588,7 @@ void
|
||||
cpu_exit(p)
|
||||
register struct proc *p;
|
||||
{
|
||||
|
||||
|
||||
#if NNPX > 0
|
||||
npxexit(p);
|
||||
#endif /* NNPX */
|
||||
@ -765,7 +765,7 @@ vunmapbuf(bp)
|
||||
addr < bp->b_data + bp->b_bufsize;
|
||||
addr += NBPG)
|
||||
pmap_kremove((vm_offset_t) addr);
|
||||
|
||||
|
||||
bp->b_data = bp->b_saveaddr;
|
||||
bp->b_saveaddr = NULL;
|
||||
|
||||
@ -806,7 +806,7 @@ cpu_reset() {
|
||||
bzero((caddr_t) PTD, NBPG);
|
||||
|
||||
/* "good night, sweet prince .... <THUNK!>" */
|
||||
pmap_update();
|
||||
pmap_update();
|
||||
/* NOTREACHED */
|
||||
while(1);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cpufunc.h,v 1.35 1995/05/11 07:24:35 bde Exp $
|
||||
* $Id: cpufunc.h,v 1.36 1995/05/14 22:25:11 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -279,7 +279,7 @@ read_eflags(void)
|
||||
{
|
||||
u_long ef;
|
||||
|
||||
__asm __volatile("pushfl; popl %0" : "=r" (ef));
|
||||
__asm __volatile("pushfl; popl %0" : "=r" (ef));
|
||||
return (ef);
|
||||
}
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie Mellon
|
||||
* the rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_machdep.h,v 1.6 1994/10/19 21:13:51 bde Exp $
|
||||
* $Id: db_machdep.h,v 1.7 1995/01/14 10:34:52 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_DB_MACHDEP_H_
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: md_var.h,v 1.1 1995/03/16 18:11:43 bde Exp $
|
||||
* $Id: md_var.h,v 1.2 1995/03/28 07:55:08 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_MD_VAR_H_
|
||||
@ -41,7 +41,7 @@ extern u_long cpu_feature;
|
||||
extern u_long cpu_high;
|
||||
extern u_long cpu_id;
|
||||
extern char cpu_vendor[];
|
||||
extern char etext[];
|
||||
extern char etext[];
|
||||
extern vm_offset_t isaphysmem;
|
||||
extern char kstack[];
|
||||
extern void (*netisrs[32]) __P((void));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 1991 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -42,7 +42,7 @@
|
||||
*
|
||||
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
|
||||
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
|
||||
* $Id: pmap.h,v 1.24 1995/03/16 18:11:44 bde Exp $
|
||||
* $Id: pmap.h,v 1.25 1995/03/26 23:42:55 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_PMAP_H_
|
||||
@ -108,12 +108,12 @@ extern int IdlePTD; /* physical address of "Idle" state directory */
|
||||
*/
|
||||
#define vtopte(va) (PTmap + i386_btop(va))
|
||||
#define kvtopte(va) vtopte(va)
|
||||
#define ptetov(pt) (i386_ptob(pt - PTmap))
|
||||
#define ptetov(pt) (i386_ptob(pt - PTmap))
|
||||
#define vtophys(va) (((int) (*vtopte(va))&PG_FRAME) | ((int)(va) & PGOFSET))
|
||||
#define ispt(va) ((va) >= UPT_MIN_ADDRESS && (va) <= KPT_MAX_ADDRESS)
|
||||
|
||||
#define avtopte(va) (APTmap + i386_btop(va))
|
||||
#define ptetoav(pt) (i386_ptob(pt - APTmap))
|
||||
#define ptetoav(pt) (i386_ptob(pt - APTmap))
|
||||
#define avtophys(va) (((int) (*avtopte(va))&PG_FRAME) | ((int)(va) & PGOFSET))
|
||||
|
||||
#ifdef KERNEL
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)segments.h 7.1 (Berkeley) 5/9/91
|
||||
* $Id: segments.h,v 1.7 1994/11/15 14:12:40 bde Exp $
|
||||
* $Id: segments.h,v 1.8 1995/02/14 19:21:15 sos Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_SEGMENTS_H_
|
||||
@ -51,10 +51,10 @@
|
||||
*/
|
||||
|
||||
#define ISPL(s) ((s)&3) /* what is the priority level of a selector */
|
||||
#define SEL_KPL 0 /* kernel priority level */
|
||||
#define SEL_UPL 3 /* user priority level */
|
||||
#define SEL_KPL 0 /* kernel priority level */
|
||||
#define SEL_UPL 3 /* user priority level */
|
||||
#define ISLDT(s) ((s)&SEL_LDT) /* is it local or global */
|
||||
#define SEL_LDT 4 /* local descriptor table */
|
||||
#define SEL_LDT 4 /* local descriptor table */
|
||||
#define IDXSEL(s) (((s)>>3) & 0x1fff) /* index of selector */
|
||||
#define LSEL(s,r) (((s)<<3) | SEL_LDT | r) /* a local selector */
|
||||
#define GSEL(s,r) (((s)<<3) | r) /* a global selector */
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91
|
||||
* $Id: specialreg.h,v 1.5 1994/09/04 23:10:27 davidg Exp $
|
||||
* $Id: specialreg.h,v 1.6 1995/01/14 10:44:55 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_SPECIALREG_H_
|
||||
@ -84,7 +84,7 @@
|
||||
* NCRx+0: A31-A24 of starting address
|
||||
* NCRx+1: A23-A16 of starting address
|
||||
* NCRx+2: A15-A12 of starting address | NCR_SIZE_xx.
|
||||
*
|
||||
*
|
||||
* The non-cacheable region's starting address must be aligned to the
|
||||
* size indicated by the NCR_SIZE_xx field.
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)tss.h 5.4 (Berkeley) 1/18/91
|
||||
* $Id: tss.h,v 1.3 1993/11/07 17:43:16 wollman Exp $
|
||||
* $Id: tss.h,v 1.4 1993/11/17 23:25:04 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_TSS_H_
|
||||
@ -59,16 +59,16 @@ struct i386tss {
|
||||
#define tss_pc tss_eip
|
||||
int tss_eflags; /* program status longword */
|
||||
#define tss_psl tss_eflags
|
||||
int tss_eax;
|
||||
int tss_ecx;
|
||||
int tss_edx;
|
||||
int tss_ebx;
|
||||
int tss_eax;
|
||||
int tss_ecx;
|
||||
int tss_edx;
|
||||
int tss_ebx;
|
||||
int tss_esp; /* user stack pointer */
|
||||
#define tss_usp tss_esp
|
||||
int tss_ebp; /* user frame pointer */
|
||||
#define tss_fp tss_ebp
|
||||
int tss_esi;
|
||||
int tss_edi;
|
||||
int tss_esi;
|
||||
int tss_edi;
|
||||
int tss_es; /* actually 16 bits: top 16 bits must be zero */
|
||||
int tss_cs; /* actually 16 bits: top 16 bits must be zero */
|
||||
int tss_ss; /* actually 16 bits: top 16 bits must be zero */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.32 1995/03/16 18:11:58 bde Exp $
|
||||
* $Id: clock.c,v 1.33 1995/05/11 07:44:40 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -193,7 +193,7 @@ int
|
||||
acquire_timer0(int rate, void (*function) __P((struct clockframe *frame)))
|
||||
{
|
||||
if (timer0_state || TIMER_DIV(rate) < TIMER0_MIN_MAX_COUNT ||
|
||||
!function)
|
||||
!function)
|
||||
return -1;
|
||||
new_function = function;
|
||||
new_rate = rate;
|
||||
@ -204,7 +204,7 @@ acquire_timer0(int rate, void (*function) __P((struct clockframe *frame)))
|
||||
int
|
||||
acquire_timer2(int mode)
|
||||
{
|
||||
if (timer2_state)
|
||||
if (timer2_state)
|
||||
return -1;
|
||||
timer2_state = 1;
|
||||
outb(TIMER_MODE, TIMER_SEL2 | (mode &0x3f));
|
||||
@ -265,7 +265,7 @@ printrtc(void)
|
||||
#endif
|
||||
|
||||
static int
|
||||
getit()
|
||||
getit()
|
||||
{
|
||||
int high, low;
|
||||
|
||||
@ -307,7 +307,7 @@ calibrate_cyclecounter(void)
|
||||
|
||||
/*
|
||||
* Wait "n" microseconds.
|
||||
* Relies on timer 1 counting down from (TIMER_FREQ / hz)
|
||||
* Relies on timer 1 counting down from (TIMER_FREQ / hz)
|
||||
* Note: timer had better have been programmed before this is first used!
|
||||
*/
|
||||
void
|
||||
@ -339,7 +339,7 @@ DELAY(int n)
|
||||
prev_tick = getit(0, 0);
|
||||
n -= 20;
|
||||
/*
|
||||
* Calculate (n * (TIMER_FREQ / 1e6)) without using floating point
|
||||
* Calculate (n * (TIMER_FREQ / 1e6)) without using floating point
|
||||
* and without any avoidable overflows.
|
||||
*/
|
||||
sec = n / 1000000;
|
||||
@ -375,11 +375,11 @@ sysbeepstop(void *chan)
|
||||
beeping = 0;
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
sysbeep(int pitch, int period)
|
||||
{
|
||||
|
||||
if (acquire_timer2(TIMER_SQWAVE|TIMER_16BIT))
|
||||
if (acquire_timer2(TIMER_SQWAVE|TIMER_16BIT))
|
||||
return -1;
|
||||
disable_intr();
|
||||
outb(TIMER_CNTR2, pitch);
|
||||
@ -426,7 +426,7 @@ readrtc(int port)
|
||||
* XXX initialization of other timers is unintentionally left blank.
|
||||
*/
|
||||
void
|
||||
startrtclock()
|
||||
startrtclock()
|
||||
{
|
||||
timer0_max_count = hardclock_max_count = TIMER_DIV(hz);
|
||||
timer0_overflow_threshold = timer0_max_count - TIMER0_LATCH_COUNT;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
|
||||
* $Id: isa.c,v 1.48 1995/05/11 05:20:43 jkh Exp $
|
||||
* $Id: isa.c,v 1.49 1995/05/13 00:09:38 jkh Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -334,7 +334,7 @@ isa_configure() {
|
||||
* SLIPDISC. No need to block out ALL ttys during a splimp when only one
|
||||
* of them is running slip.
|
||||
*
|
||||
* XXX actually, blocking all ttys during a splimp doesn't matter so much
|
||||
* XXX actually, blocking all ttys during a splimp doesn't matter so much
|
||||
* with sio because the serial interrupt layer doesn't use tty_imask. Only
|
||||
* non-serial ttys suffer. It's more stupid that ALL 'net's are blocked
|
||||
* during spltty.
|
||||
@ -372,8 +372,8 @@ isa_configure() {
|
||||
/*
|
||||
* Configure an ISA device.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
config_isadev(isdp, mp)
|
||||
struct isa_device *isdp;
|
||||
@ -381,7 +381,7 @@ config_isadev(isdp, mp)
|
||||
{
|
||||
config_isadev_c(isdp, mp, 0);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
reconfig_isadev(isdp, mp)
|
||||
struct isa_device *isdp;
|
||||
@ -400,7 +400,7 @@ config_isadev_c(isdp, mp, reconfig)
|
||||
int id_alive;
|
||||
int last_alive;
|
||||
struct isa_driver *dp = isdp->id_driver;
|
||||
|
||||
|
||||
checkbits = 0;
|
||||
checkbits |= CC_DRQ;
|
||||
checkbits |= CC_IOADDR;
|
||||
@ -464,11 +464,11 @@ config_isadev_c(isdp, mp, reconfig)
|
||||
}
|
||||
printf("\n");
|
||||
/*
|
||||
* Check for conflicts again. The driver may have
|
||||
* changed *dvp. We should weaken the early check
|
||||
* since the driver may have been able to change
|
||||
* *dvp to avoid conflicts if given a chance. We
|
||||
* already skip the early check for IRQs and force
|
||||
* Check for conflicts again. The driver may have
|
||||
* changed *dvp. We should weaken the early check
|
||||
* since the driver may have been able to change
|
||||
* *dvp to avoid conflicts if given a chance. We
|
||||
* already skip the early check for IRQs and force
|
||||
* a check for IRQs in the next group of checks.
|
||||
*/
|
||||
checkbits |= CC_IRQ;
|
||||
@ -497,12 +497,12 @@ config_isadev_c(isdp, mp, reconfig)
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* This code has not been tested.... */
|
||||
if (isdp->id_irq) {
|
||||
INTRDIS(isdp->id_irq);
|
||||
unregister_intr(ffs(isdp->id_irq) - 1,
|
||||
unregister_intr(ffs(isdp->id_irq) - 1,
|
||||
isdp->id_intr);
|
||||
if (mp)
|
||||
INTRUNMASK(*mp, isdp->id_irq);
|
||||
@ -593,7 +593,7 @@ eisa_generic_externalize(struct proc *p, struct kern_devconf *kdc,
|
||||
* during configuration of kernel, setup interrupt control unit
|
||||
*/
|
||||
void
|
||||
isa_defaultirq()
|
||||
isa_defaultirq()
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -643,7 +643,7 @@ static short dmapageport[8] =
|
||||
void isa_dmacascade(unsigned chan)
|
||||
{
|
||||
if (chan > 7)
|
||||
panic("isa_dmacascade: impossible request");
|
||||
panic("isa_dmacascade: impossible request");
|
||||
|
||||
/* set dma channel mode, and set dma channel mode */
|
||||
if ((chan & 4) == 0) {
|
||||
@ -670,7 +670,7 @@ void isa_dmastart(int flags, caddr_t addr, unsigned nbytes, unsigned chan)
|
||||
if ( chan > 7
|
||||
|| (chan < 4 && nbytes > (1<<16))
|
||||
|| (chan >= 4 && (nbytes > (1<<17) || (u_int)addr & 1)))
|
||||
panic("isa_dmastart: impossible request");
|
||||
panic("isa_dmastart: impossible request");
|
||||
|
||||
if (isa_dmarangecheck(addr, nbytes, chan)) {
|
||||
if (dma_bounce[chan] == 0)
|
||||
@ -818,7 +818,7 @@ static void (*isaphysmemunblock)(); /* needs to be a list */
|
||||
*/
|
||||
caddr_t
|
||||
isa_allocphysmem(caddr_t va, unsigned length, void (*func)()) {
|
||||
|
||||
|
||||
isaphysmemunblock = func;
|
||||
while (isaphysmemflag & B_BUSY) {
|
||||
isaphysmemflag |= B_WANTED;
|
||||
@ -844,7 +844,7 @@ isa_freephysmem(caddr_t va, unsigned length) {
|
||||
(*isaphysmemunblock)();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define NMI_PARITY (1 << 7)
|
||||
#define NMI_IOCHAN (1 << 6)
|
||||
#define ENMI_WATCHDOG (1 << 7)
|
||||
@ -856,7 +856,7 @@ isa_freephysmem(caddr_t va, unsigned length) {
|
||||
* return true to panic system, false to ignore.
|
||||
*/
|
||||
int
|
||||
isa_nmi(cd)
|
||||
isa_nmi(cd)
|
||||
int cd;
|
||||
{
|
||||
int isa_port = inb(0x61);
|
||||
@ -930,7 +930,7 @@ struct isa_device *find_isadev(table, driverp, unit)
|
||||
while ((table->id_driver != driverp) || (table->id_unit != unit)) {
|
||||
if (table->id_driver == 0)
|
||||
return NULL;
|
||||
|
||||
|
||||
table++;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: npx.c,v 1.21 1995/03/05 04:06:44 wpaul Exp $
|
||||
* $Id: npx.c,v 1.22 1995/04/12 20:48:01 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -280,7 +280,7 @@ npxprobe1(dvp)
|
||||
/*
|
||||
* Good, now check for a proper control word.
|
||||
*/
|
||||
control = 0x5a5a;
|
||||
control = 0x5a5a;
|
||||
fnstcw(&control);
|
||||
if ((control & 0x1f3f) == 0x033f) {
|
||||
hw_float = npx_exists = 1;
|
||||
@ -344,7 +344,7 @@ npxattach(dvp)
|
||||
printf("npx%d: INT 16 interface\n", dvp->id_unit);
|
||||
else if (npx_irq13)
|
||||
; /* higher level has printed "irq 13" */
|
||||
#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE)
|
||||
#if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE)
|
||||
else if (npx_exists) {
|
||||
printf("npx%d: error reporting broken; using 387 emulator\n",
|
||||
dvp->id_unit);
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1990 W. Jolitz
|
||||
# from: @(#)Makefile.i386 7.1 5/10/91
|
||||
# $Id: Makefile.i386,v 1.62 1995/04/05 04:10:58 nate Exp $
|
||||
# $Id: Makefile.i386,v 1.63 1995/05/11 19:48:45 wollman Exp $
|
||||
#
|
||||
# Makefile for FreeBSD
|
||||
#
|
||||
@ -14,7 +14,7 @@
|
||||
# /sys/i386/conf/Makefile.i386
|
||||
# after which config should be rerun for all machines.
|
||||
#
|
||||
CC?= cc
|
||||
CC?= cc
|
||||
CPP?= cpp
|
||||
LD?= /usr/bin/ld
|
||||
|
||||
@ -61,7 +61,7 @@ SFILES= ${I386}/i386/exception.s ${I386}/i386/microtime.s \
|
||||
${I386}/i386/support.s ${I386}/i386/swtch.s ${I386}/apm/apm_setup.s
|
||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c
|
||||
SYSTEM_SFILES= ${I386}/i386/locore.s
|
||||
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o
|
||||
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o
|
||||
SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${SYSTEM_OBJS} libkern.a
|
||||
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
|
||||
SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o $@ -X ${SYSTEM_OBJS} vers.o libkern.a
|
||||
@ -145,7 +145,7 @@ trap.o cons.o: Makefile
|
||||
assym.s: genassym
|
||||
./genassym >assym.s
|
||||
|
||||
# Some of the defines that genassym outputs may well depend on the
|
||||
# Some of the defines that genassym outputs may well depend on the
|
||||
# value of kernel options.
|
||||
genassym.o: ${I386}/i386/genassym.c Makefile
|
||||
${CC} -c ${CFLAGS} ${PARAM} -UKERNEL ${I386}/i386/genassym.c
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1990 W. Jolitz
|
||||
# from: @(#)Makefile.i386 7.1 5/10/91
|
||||
# $Id: Makefile.i386,v 1.62 1995/04/05 04:10:58 nate Exp $
|
||||
# $Id: Makefile.i386,v 1.63 1995/05/11 19:48:45 wollman Exp $
|
||||
#
|
||||
# Makefile for FreeBSD
|
||||
#
|
||||
@ -14,7 +14,7 @@
|
||||
# /sys/i386/conf/Makefile.i386
|
||||
# after which config should be rerun for all machines.
|
||||
#
|
||||
CC?= cc
|
||||
CC?= cc
|
||||
CPP?= cpp
|
||||
LD?= /usr/bin/ld
|
||||
|
||||
@ -61,7 +61,7 @@ SFILES= ${I386}/i386/exception.s ${I386}/i386/microtime.s \
|
||||
${I386}/i386/support.s ${I386}/i386/swtch.s ${I386}/apm/apm_setup.s
|
||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c
|
||||
SYSTEM_SFILES= ${I386}/i386/locore.s
|
||||
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o
|
||||
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o
|
||||
SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${SYSTEM_OBJS} libkern.a
|
||||
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
|
||||
SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o $@ -X ${SYSTEM_OBJS} vers.o libkern.a
|
||||
@ -145,7 +145,7 @@ trap.o cons.o: Makefile
|
||||
assym.s: genassym
|
||||
./genassym >assym.s
|
||||
|
||||
# Some of the defines that genassym outputs may well depend on the
|
||||
# Some of the defines that genassym outputs may well depend on the
|
||||
# value of kernel options.
|
||||
genassym.o: ${I386}/i386/genassym.c Makefile
|
||||
${CC} -c ${CFLAGS} ${PARAM} -UKERNEL ${I386}/i386/genassym.c
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_access.c,v 1.5 1994/08/13 03:49:13 wollman Exp $
|
||||
* $Id: db_access.c,v 1.6 1994/08/18 22:34:18 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -68,7 +68,7 @@ db_get_value(addr, size, is_signed)
|
||||
{
|
||||
value = (value << 8) + (data[i] & 0xFF);
|
||||
}
|
||||
|
||||
|
||||
if (size < 4) {
|
||||
if (is_signed && (value & db_extend[size]) != 0)
|
||||
value |= db_extend[size];
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_access.h,v 1.2 1993/10/16 16:47:05 rgrimes Exp $
|
||||
* $Id: db_access.h,v 1.3 1993/11/07 17:39:20 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DDB_DB_ACCESS_H_
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_aout.c,v 1.9 1994/09/27 03:34:52 phk Exp $
|
||||
* $Id: db_aout.c,v 1.10 1995/01/25 21:37:04 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -243,7 +243,7 @@ X_db_line_at_pc(symtab, cursym, filename, linenum, off)
|
||||
if (sp->n_value <= off && (off - sp->n_value) <= sodiff &&
|
||||
NEWSRC(sp->n_un.n_name)) {
|
||||
#endif
|
||||
if ((sp->n_type & N_TYPE) == N_FN || NEWSRC(sp->n_un.n_name)) {
|
||||
if ((sp->n_type & N_TYPE) == N_FN || NEWSRC(sp->n_un.n_name)) {
|
||||
sodiff = lndiff = -1UL;
|
||||
ln = 0;
|
||||
fname = NULL;
|
||||
@ -392,7 +392,7 @@ read_symtab_from_file(fp, symtab_name)
|
||||
X_db_sym_init((int *)symtab,
|
||||
(char *)(symtab + table_size),
|
||||
symtab_name);
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_break.c,v 1.4 1994/08/13 03:49:15 wollman Exp $
|
||||
* $Id: db_break.c,v 1.5 1994/08/18 22:34:19 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: db_break.h,v 1.2 1993/10/16 16:47:09 rgrimes Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_command.c,v 1.11 1995/03/16 18:10:59 bde Exp $
|
||||
* $Id: db_command.c,v 1.12 1995/03/19 14:28:28 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_command.h,v 1.4 1994/08/13 03:49:16 wollman Exp $
|
||||
* $Id: db_command.h,v 1.5 1994/08/18 22:34:21 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DDB_DB_COMMAND_H_
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_examine.c,v 1.6 1994/08/18 22:34:22 wollman Exp $
|
||||
* $Id: db_examine.c,v 1.7 1995/05/22 13:07:11 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_expr.c,v 1.3 1993/11/25 01:30:06 wollman Exp $
|
||||
* $Id: db_expr.c,v 1.4 1994/08/13 03:49:18 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_input.c,v 1.5 1994/08/13 03:49:19 wollman Exp $
|
||||
* $Id: db_input.c,v 1.6 1994/08/18 22:34:23 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -253,4 +253,4 @@ void
|
||||
cnpollc (flag)
|
||||
int flag;
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_lex.c,v 1.4 1994/08/13 03:49:20 wollman Exp $
|
||||
* $Id: db_lex.c,v 1.5 1994/08/18 22:34:23 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -76,7 +76,7 @@ db_read_char()
|
||||
}
|
||||
else if (db_lp >= db_endlp)
|
||||
c = -1;
|
||||
else
|
||||
else
|
||||
c = *db_lp++;
|
||||
return (c);
|
||||
}
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_lex.h,v 1.3 1993/11/07 17:39:23 wollman Exp $
|
||||
* $Id: db_lex.h,v 1.4 1994/08/18 22:34:24 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DDB_DB_LEX_H_
|
||||
@ -45,7 +45,7 @@ extern void db_unread_token(/* int t */);
|
||||
extern void db_flush_lex();
|
||||
|
||||
extern int db_tok_number;
|
||||
#define TOK_STRING_SIZE 120
|
||||
#define TOK_STRING_SIZE 120
|
||||
extern char db_tok_string[TOK_STRING_SIZE];
|
||||
|
||||
#define tEOF (-1)
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_output.c,v 1.9 1994/09/27 03:34:54 phk Exp $
|
||||
* $Id: db_output.c,v 1.10 1994/10/30 20:55:44 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_output.h,v 1.5 1994/09/27 03:34:55 phk Exp $
|
||||
* $Id: db_output.h,v 1.6 1994/09/27 12:15:53 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DDB_DB_OUTPUT_H_
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_print.c,v 1.5 1994/08/18 22:34:25 wollman Exp $
|
||||
* $Id: db_print.c,v 1.6 1994/09/27 03:34:56 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: db_ps.c,v 1.4 1995/03/28 23:29:52 davidg Exp $
|
||||
* $Id: db_ps.c,v 1.5 1995/04/04 01:35:33 davidg Exp $
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -62,7 +62,7 @@ db_ps() {
|
||||
pp = p;
|
||||
if (p->p_stat) {
|
||||
db_printf("%5d %06x %06x %4d %5d %5d %06x %d",
|
||||
p->p_pid, ap, p->p_addr, p->p_cred->p_ruid, pp->p_pid,
|
||||
p->p_pid, ap, p->p_addr, p->p_cred->p_ruid, pp->p_pid,
|
||||
p->p_pgrp->pg_id, p->p_flag, p->p_stat);
|
||||
if (p->p_wchan) {
|
||||
db_printf(" %6s %08x %s\n", p->p_wmesg, p->p_wchan, p->p_comm);
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_run.c,v 1.3 1993/11/25 01:30:10 wollman Exp $
|
||||
* $Id: db_run.c,v 1.4 1994/08/13 03:49:22 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -103,7 +103,7 @@ db_stop_at_pc(is_breakpoint)
|
||||
} else if (*is_breakpoint) {
|
||||
ddb_regs.tf_eip += 1;
|
||||
}
|
||||
|
||||
|
||||
*is_breakpoint = FALSE;
|
||||
|
||||
if (db_run_mode == STEP_INVISIBLE) {
|
||||
@ -236,7 +236,7 @@ db_single_step(regs)
|
||||
* db_getreg_val(); return the value of a user register,
|
||||
* as indicated in the hardware instruction
|
||||
* encoding, e.g. 8 for r8
|
||||
*
|
||||
*
|
||||
* next_instr_address(pc,bd) returns the address of the first
|
||||
* instruction following the one at "pc",
|
||||
* which is either in the taken path of
|
||||
@ -248,7 +248,7 @@ db_single_step(regs)
|
||||
* If one of these addresses does not already have a breakpoint,
|
||||
* we allocate a breakpoint and save it here.
|
||||
* These breakpoints are deleted on return.
|
||||
*/
|
||||
*/
|
||||
db_breakpoint_t db_not_taken_bkpt = 0;
|
||||
db_breakpoint_t db_taken_bkpt = 0;
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_sym.c,v 1.7 1994/09/27 03:34:57 phk Exp $
|
||||
* $Id: db_sym.c,v 1.8 1995/05/22 13:07:12 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_sym.h,v 1.6 1994/09/27 03:34:57 phk Exp $
|
||||
* $Id: db_sym.h,v 1.7 1995/03/16 18:11:00 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DDB_DB_SYM_H_
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_trap.c,v 1.5 1994/08/18 22:34:27 wollman Exp $
|
||||
* $Id: db_trap.c,v 1.6 1994/10/02 19:36:21 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -65,7 +65,7 @@ db_trap(type, code)
|
||||
db_printf("Watchpoint at\t");
|
||||
else
|
||||
db_printf("Stopped at\t");
|
||||
|
||||
|
||||
db_print_loc_and_inst(db_dot);
|
||||
}
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_variables.c,v 1.5 1994/08/18 22:34:27 wollman Exp $
|
||||
* $Id: db_variables.c,v 1.6 1994/09/27 03:34:58 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_variables.h,v 1.2 1993/10/16 16:47:31 rgrimes Exp $
|
||||
* $Id: db_variables.h,v 1.3 1993/11/25 01:30:14 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_watch.c,v 1.4 1994/08/13 03:49:25 wollman Exp $
|
||||
* $Id: db_watch.c,v 1.5 1994/08/18 22:34:28 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_watch.h,v 1.2 1993/10/16 16:47:33 rgrimes Exp $
|
||||
* $Id: db_watch.h,v 1.3 1994/08/18 22:34:29 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
* All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and its
|
||||
* documentation is hereby granted, provided that both the copyright
|
||||
* notice and this permission notice appear in all copies of the
|
||||
* software, derivative works or modified versions, and any portions
|
||||
* thereof, and that both notices appear in supporting documentation.
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
*
|
||||
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
||||
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
||||
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Carnegie Mellon requests users of this software to return to
|
||||
*
|
||||
*
|
||||
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
* School of Computer Science
|
||||
* Carnegie Mellon University
|
||||
* Pittsburgh PA 15213-3890
|
||||
*
|
||||
*
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_write_cmd.c,v 1.3 1993/11/25 01:30:16 wollman Exp $
|
||||
* $Id: db_write_cmd.c,v 1.4 1994/08/13 03:49:26 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,7 +27,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ddb.h,v 1.4 1994/09/27 12:15:56 davidg Exp $
|
||||
* $Id: ddb.h,v 1.5 1995/03/16 18:11:01 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -55,8 +55,8 @@ extern int db_tab_stop_width;
|
||||
/*
|
||||
* Functions...
|
||||
*/
|
||||
extern void
|
||||
db_read_bytes(vm_offset_t addr, register int size, register char *data);
|
||||
extern void
|
||||
db_read_bytes(vm_offset_t addr, register int size, register char *data);
|
||||
/* machine-dependent */
|
||||
|
||||
extern void
|
||||
|
@ -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 @@ getl(int *n)
|
||||
else
|
||||
error("too many tokens");
|
||||
if (quote) {
|
||||
quote++;
|
||||
quote++;
|
||||
p = strchr(quote, '\"');
|
||||
if (!p)
|
||||
error("unterminated string constant");
|
||||
@ -256,7 +256,7 @@ getl(int *n)
|
||||
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;
|
||||
|
@ -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 @@ getl(int *n)
|
||||
else
|
||||
error("too many tokens");
|
||||
if (quote) {
|
||||
quote++;
|
||||
quote++;
|
||||
p = strchr(quote, '\"');
|
||||
if (!p)
|
||||
error("unterminated string constant");
|
||||
@ -256,7 +256,7 @@ getl(int *n)
|
||||
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;
|
||||
|
@ -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 @@ getl(int *n)
|
||||
else
|
||||
error("too many tokens");
|
||||
if (quote) {
|
||||
quote++;
|
||||
quote++;
|
||||
p = strchr(quote, '\"');
|
||||
if (!p)
|
||||
error("unterminated string constant");
|
||||
@ -256,7 +256,7 @@ getl(int *n)
|
||||
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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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) */
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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 @@ epintr(unit)
|
||||
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 @@ epintr(unit)
|
||||
|
||||
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;
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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 */
|
||||
|
||||
|
||||
|
@ -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 ^
|
||||
|
@ -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 ();
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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_
|
||||
|
@ -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 @@ scd_doread(int state, struct scd_mbx *mbxin)
|
||||
(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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 @@ snpwrite(dev, uio, flag)
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
||||
|
@ -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 */
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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;
|
||||
|
@ -38,7 +38,7 @@
|
||||
* from: @(#)ufs_lookup.c 7.33 (Berkeley) 5/19/91
|
||||
*
|
||||
* @(#)cd9660_lookup.c 8.2 (Berkeley) 1/23/94
|
||||
* $Id: cd9660_lookup.c,v 1.5 1994/09/26 00:32:54 gpalmer Exp $
|
||||
* $Id: cd9660_lookup.c,v 1.6 1995/01/16 17:03:23 joerg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -126,7 +126,7 @@ cd9660_lookup(ap)
|
||||
struct ucred *cred = cnp->cn_cred;
|
||||
int flags = cnp->cn_flags;
|
||||
int nameiop = cnp->cn_nameiop;
|
||||
|
||||
|
||||
bp = NULL;
|
||||
*vpp = NULL;
|
||||
vdp = ap->a_dvp;
|
||||
@ -134,7 +134,7 @@ cd9660_lookup(ap)
|
||||
imp = dp->i_mnt;
|
||||
lockparent = flags & LOCKPARENT;
|
||||
wantparent = flags & (LOCKPARENT|WANTPARENT);
|
||||
|
||||
|
||||
/*
|
||||
* Check accessiblity of directory.
|
||||
*/
|
||||
@ -142,7 +142,7 @@ cd9660_lookup(ap)
|
||||
return (ENOTDIR);
|
||||
if ((error = VOP_ACCESS(vdp, VEXEC, cred, cnp->cn_proc)))
|
||||
return (error);
|
||||
|
||||
|
||||
/*
|
||||
* We now have a segment name to search for, and a directory to search.
|
||||
*
|
||||
@ -197,7 +197,7 @@ cd9660_lookup(ap)
|
||||
vdp = ITOV(dp);
|
||||
*vpp = NULL;
|
||||
}
|
||||
|
||||
|
||||
len = cnp->cn_namelen;
|
||||
name = cnp->cn_nameptr;
|
||||
/*
|
||||
@ -208,7 +208,7 @@ cd9660_lookup(ap)
|
||||
len--;
|
||||
name++;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If there is cached information on a previous search of
|
||||
* this directory, pick up where we last left off.
|
||||
@ -236,7 +236,7 @@ cd9660_lookup(ap)
|
||||
iso_nchstats.ncs_2passes++;
|
||||
}
|
||||
endsearch = roundup(dp->i_size, imp->logical_block_size);
|
||||
|
||||
|
||||
searchloop:
|
||||
while (dp->i_offset < endsearch) {
|
||||
/*
|
||||
@ -256,7 +256,7 @@ cd9660_lookup(ap)
|
||||
*/
|
||||
ep = (struct iso_directory_record *)
|
||||
(bp->b_un.b_addr + entryoffsetinblock);
|
||||
|
||||
|
||||
reclen = isonum_711 (ep->length);
|
||||
if (reclen == 0) {
|
||||
/* skip to next block, if any */
|
||||
@ -264,26 +264,26 @@ cd9660_lookup(ap)
|
||||
roundup(dp->i_offset, imp->logical_block_size);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (reclen < ISO_DIRECTORY_RECORD_SIZE)
|
||||
/* illegal entry, stop */
|
||||
break;
|
||||
|
||||
|
||||
if (entryoffsetinblock + reclen > imp->logical_block_size)
|
||||
/* entries are not allowed to cross boundaries */
|
||||
break;
|
||||
|
||||
|
||||
/*
|
||||
* Check for a name match.
|
||||
*/
|
||||
namelen = isonum_711(ep->name_len);
|
||||
isoflags = isonum_711(imp->iso_ftype == ISO_FTYPE_HIGH_SIERRA?
|
||||
&ep->date[6]: ep->flags);
|
||||
|
||||
|
||||
if (reclen < ISO_DIRECTORY_RECORD_SIZE + namelen)
|
||||
/* illegal entry, stop */
|
||||
break;
|
||||
|
||||
|
||||
switch (imp->iso_ftype) {
|
||||
default:
|
||||
if (!(isoflags & 4) == !assoc) {
|
||||
@ -375,13 +375,13 @@ cd9660_lookup(ap)
|
||||
if (nameiop == CREATE || nameiop == RENAME)
|
||||
return (EJUSTRETURN);
|
||||
return (ENOENT);
|
||||
|
||||
|
||||
found:
|
||||
if (numdirpasses == 2)
|
||||
iso_nchstats.ncs_pass2++;
|
||||
if (bp != NULL)
|
||||
brelse(bp);
|
||||
|
||||
|
||||
/*
|
||||
* Found component in pathname.
|
||||
* If the final component of path name, save information
|
||||
@ -389,7 +389,7 @@ cd9660_lookup(ap)
|
||||
*/
|
||||
if ((flags & ISLASTCN) && nameiop == LOOKUP)
|
||||
dp->i_diroff = dp->i_offset;
|
||||
|
||||
|
||||
/*
|
||||
* Step through the translation in the name. We do not `iput' the
|
||||
* directory because we may need it again if a symbolic link
|
||||
@ -435,7 +435,7 @@ cd9660_lookup(ap)
|
||||
ISO_IUNLOCK(pdp);
|
||||
*vpp = ITOV(tdp);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Insert name into cache if appropriate.
|
||||
*/
|
||||
@ -461,13 +461,13 @@ iso_blkatoff(ip, offset, bpp)
|
||||
int bsize = iso_blksize(imp,ip,lbn);
|
||||
struct buf *bp;
|
||||
int error;
|
||||
|
||||
|
||||
if ((error = bread(ITOV(ip),lbn,bsize,NOCRED,&bp))) {
|
||||
brelse(bp);
|
||||
*bpp = 0;
|
||||
return (error);
|
||||
}
|
||||
*bpp = bp;
|
||||
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94
|
||||
* $Id: cd9660_node.c,v 1.9 1995/02/21 18:41:30 bde Exp $
|
||||
* $Id: cd9660_node.c,v 1.10 1995/03/16 18:12:15 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -117,7 +117,7 @@ iso_dmap(dev,ino,create)
|
||||
{
|
||||
struct iso_dnode *dp;
|
||||
union iso_dhead *dh;
|
||||
|
||||
|
||||
dh = &iso_dhead[DNOHASH(dev, ino)];
|
||||
for (dp = dh->dh_chain[0];
|
||||
dp != (struct iso_dnode *)dh;
|
||||
@ -132,7 +132,7 @@ iso_dmap(dev,ino,create)
|
||||
dp->i_dev = dev;
|
||||
dp->i_number = ino;
|
||||
insque(dp,dh);
|
||||
|
||||
|
||||
return dp;
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ iso_dunmap(dev)
|
||||
{
|
||||
struct iso_dnode *dp, *dq;
|
||||
union iso_dhead *dh;
|
||||
|
||||
|
||||
for (dh = iso_dhead; dh < iso_dhead + DNOHSZ; dh++) {
|
||||
for (dp = dh->dh_chain[0];
|
||||
dp != (struct iso_dnode *)dh;
|
||||
@ -184,7 +184,7 @@ iso_iget(xp, ino, relocated, ipp, isodir)
|
||||
union iso_ihead *ih;
|
||||
int error, result;
|
||||
struct iso_mnt *imp;
|
||||
|
||||
|
||||
ih = &iso_ihead[INOHASH(dev, ino)];
|
||||
loop:
|
||||
for (ip = ih->ih_chain[0];
|
||||
@ -218,7 +218,7 @@ iso_iget(xp, ino, relocated, ipp, isodir)
|
||||
ip->i_devvp = 0;
|
||||
ip->i_diroff = 0;
|
||||
ip->i_lockf = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Put it onto its hash chain and lock it so that other requests for
|
||||
* this inode will block if they arrive while we are sleeping waiting
|
||||
@ -234,7 +234,7 @@ iso_iget(xp, ino, relocated, ipp, isodir)
|
||||
ip->i_mnt = imp;
|
||||
ip->i_devvp = imp->im_devvp;
|
||||
VREF(ip->i_devvp);
|
||||
|
||||
|
||||
if (relocated) {
|
||||
/*
|
||||
* On relocated directories we must
|
||||
@ -252,13 +252,13 @@ iso_iget(xp, ino, relocated, ipp, isodir)
|
||||
}
|
||||
isodir = (struct iso_directory_record *)bp->b_un.b_addr;
|
||||
}
|
||||
|
||||
|
||||
ip->iso_extent = isonum_733(isodir->extent);
|
||||
ip->i_size = isonum_733(isodir->size);
|
||||
ip->iso_start = isonum_711(isodir->ext_attr_length) + ip->iso_extent;
|
||||
|
||||
|
||||
vp = ITOV(ip);
|
||||
|
||||
|
||||
/*
|
||||
* Setup time stamp, attribute
|
||||
*/
|
||||
@ -280,12 +280,12 @@ iso_iget(xp, ino, relocated, ipp, isodir)
|
||||
brelse(bp2);
|
||||
if (bp)
|
||||
brelse(bp);
|
||||
|
||||
|
||||
/*
|
||||
* Initialize the associated vnode
|
||||
*/
|
||||
vp->v_type = IFTOVT(ip->inode.iso_mode);
|
||||
|
||||
|
||||
if ( vp->v_type == VFIFO ) {
|
||||
vp->v_op = cd9660_fifoop_p;
|
||||
} else if ( vp->v_type == VCHR || vp->v_type == VBLK ) {
|
||||
@ -321,10 +321,10 @@ iso_iget(xp, ino, relocated, ipp, isodir)
|
||||
ip = iq;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ip->iso_extent == imp->root_extent)
|
||||
vp->v_flag |= VROOT;
|
||||
|
||||
|
||||
*ipp = ip;
|
||||
return 0;
|
||||
}
|
||||
@ -336,7 +336,7 @@ int
|
||||
iso_iput(ip)
|
||||
register struct iso_node *ip;
|
||||
{
|
||||
|
||||
|
||||
if ((ip->i_flag & ILOCKED) == 0)
|
||||
panic("iso_iput");
|
||||
ISO_IUNLOCK(ip);
|
||||
@ -357,10 +357,10 @@ cd9660_inactive(ap)
|
||||
struct vnode *vp = ap->a_vp;
|
||||
register struct iso_node *ip = VTOI(vp);
|
||||
int error = 0;
|
||||
|
||||
|
||||
if (prtactive && vp->v_usecount != 0)
|
||||
vprint("cd9660_inactive: pushing active", vp);
|
||||
|
||||
|
||||
ip->i_flag = 0;
|
||||
/*
|
||||
* If we are done with the inode, reclaim it
|
||||
@ -382,7 +382,7 @@ cd9660_reclaim(ap)
|
||||
{
|
||||
register struct vnode *vp = ap->a_vp;
|
||||
register struct iso_node *ip = VTOI(vp);
|
||||
|
||||
|
||||
if (prtactive && vp->v_usecount != 0)
|
||||
vprint("cd9660_reclaim: pushing active", vp);
|
||||
/*
|
||||
@ -411,7 +411,7 @@ int
|
||||
iso_ilock(ip)
|
||||
register struct iso_node *ip;
|
||||
{
|
||||
|
||||
|
||||
while (ip->i_flag & ILOCKED) {
|
||||
ip->i_flag |= IWANT;
|
||||
if (ip->i_spare0 == curproc->p_pid)
|
||||
@ -458,7 +458,7 @@ cd9660_defattr(isodir,inop,bp,ftype)
|
||||
struct iso_mnt *imp;
|
||||
struct iso_extended_attributes *ap = NULL;
|
||||
int off;
|
||||
|
||||
|
||||
/* high sierra does not have timezone data, flag is one byte ahead */
|
||||
if (isonum_711(ftype == ISO_FTYPE_HIGH_SIERRA?
|
||||
&isodir->date[6]: isodir->flags)&2) {
|
||||
@ -480,7 +480,7 @@ cd9660_defattr(isodir,inop,bp,ftype)
|
||||
}
|
||||
if (bp) {
|
||||
ap = (struct iso_extended_attributes *)bp->b_un.b_addr;
|
||||
|
||||
|
||||
if (isonum_711(ap->version) == 1) {
|
||||
if (!(ap->perm[0]&0x40))
|
||||
inop->inode.iso_mode |= VEXEC >> 6;
|
||||
@ -522,7 +522,7 @@ cd9660_deftstamp(isodir,inop,bp,ftype)
|
||||
struct iso_mnt *imp;
|
||||
struct iso_extended_attributes *ap = NULL;
|
||||
int off;
|
||||
|
||||
|
||||
if (!bp
|
||||
&& ((imp = inop->i_mnt)->im_flags&ISOFSMNT_EXTATT)
|
||||
&& (off = isonum_711(isodir->ext_attr_length))) {
|
||||
@ -531,7 +531,7 @@ cd9660_deftstamp(isodir,inop,bp,ftype)
|
||||
}
|
||||
if (bp) {
|
||||
ap = (struct iso_extended_attributes *)bp->b_un.b_addr;
|
||||
|
||||
|
||||
if (ftype != ISO_FTYPE_HIGH_SIERRA
|
||||
&& isonum_711(ap->version) == 1) {
|
||||
if (!cd9660_tstamp_conv17(ap->ftime,&inop->inode.iso_atime))
|
||||
@ -560,7 +560,7 @@ enum ISO_FTYPE ftype;
|
||||
{
|
||||
int crtime, days;
|
||||
int y, m, d, hour, minute, second, tz;
|
||||
|
||||
|
||||
y = pi[0] + 1900;
|
||||
m = pi[1];
|
||||
d = pi[2];
|
||||
@ -572,7 +572,7 @@ enum ISO_FTYPE ftype;
|
||||
else
|
||||
/* original high sierra misses timezone data */
|
||||
tz = 0;
|
||||
|
||||
|
||||
if (y < 1970) {
|
||||
pu->ts_sec = 0;
|
||||
pu->ts_nsec = 0;
|
||||
@ -590,7 +590,7 @@ enum ISO_FTYPE ftype;
|
||||
days = 367*(y-1960)-7*(y+(m+9)/12)/4-3*((y+(m+9)/12-1)/100+1)/4+275*m/9+d-239;
|
||||
#endif
|
||||
crtime = ((((days * 24) + hour) * 60 + minute) * 60) + second;
|
||||
|
||||
|
||||
/* timezone offset is unreliable on some disks */
|
||||
if (-48 <= tz && tz <= 52)
|
||||
crtime -= tz * 15 * 60;
|
||||
@ -606,7 +606,7 @@ cd9660_chars2ui(begin,len)
|
||||
int len;
|
||||
{
|
||||
unsigned rc;
|
||||
|
||||
|
||||
for (rc = 0; --len >= 0;) {
|
||||
rc *= 10;
|
||||
rc += *begin++ - '0';
|
||||
@ -620,28 +620,28 @@ cd9660_tstamp_conv17(pi,pu)
|
||||
struct timespec *pu;
|
||||
{
|
||||
unsigned char buf[7];
|
||||
|
||||
|
||||
/* year:"0001"-"9999" -> -1900 */
|
||||
buf[0] = cd9660_chars2ui(pi,4) - 1900;
|
||||
|
||||
|
||||
/* month: " 1"-"12" -> 1 - 12 */
|
||||
buf[1] = cd9660_chars2ui(pi + 4,2);
|
||||
|
||||
|
||||
/* day: " 1"-"31" -> 1 - 31 */
|
||||
buf[2] = cd9660_chars2ui(pi + 6,2);
|
||||
|
||||
|
||||
/* hour: " 0"-"23" -> 0 - 23 */
|
||||
buf[3] = cd9660_chars2ui(pi + 8,2);
|
||||
|
||||
|
||||
/* minute:" 0"-"59" -> 0 - 59 */
|
||||
buf[4] = cd9660_chars2ui(pi + 10,2);
|
||||
|
||||
|
||||
/* second:" 0"-"59" -> 0 - 59 */
|
||||
buf[5] = cd9660_chars2ui(pi + 12,2);
|
||||
|
||||
|
||||
/* difference of GMT */
|
||||
buf[6] = pi[16];
|
||||
|
||||
|
||||
return cd9660_tstamp_conv7(buf, pu, ISO_FTYPE_DEFAULT);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cd9660_rrip.c 8.2 (Berkeley) 1/23/94
|
||||
* $Id: cd9660_rrip.c,v 1.5 1994/09/26 00:32:57 gpalmer Exp $
|
||||
* $Id: cd9660_rrip.c,v 1.6 1995/01/16 17:03:26 joerg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -95,13 +95,13 @@ cd9660_rrip_slink(p,ana)
|
||||
register ISO_RRIP_SLINK_COMPONENT *pcompe;
|
||||
int len, wlen, cont;
|
||||
char *outbuf, *inbuf;
|
||||
|
||||
|
||||
pcomp = (ISO_RRIP_SLINK_COMPONENT *)p->component;
|
||||
pcompe = (ISO_RRIP_SLINK_COMPONENT *)((char *)p + isonum_711(p->h.length));
|
||||
len = *ana->outlen;
|
||||
outbuf = ana->outbuf;
|
||||
cont = ana->cont;
|
||||
|
||||
|
||||
/*
|
||||
* Gathering a Symbolic name from each component with path
|
||||
*/
|
||||
@ -109,7 +109,7 @@ cd9660_rrip_slink(p,ana)
|
||||
pcomp < pcompe;
|
||||
pcomp = (ISO_RRIP_SLINK_COMPONENT *)((char *)pcomp + ISO_RRIP_SLSIZ
|
||||
+ isonum_711(pcomp->clen))) {
|
||||
|
||||
|
||||
if (!cont) {
|
||||
if (len < ana->maxlen) {
|
||||
len++;
|
||||
@ -117,29 +117,29 @@ cd9660_rrip_slink(p,ana)
|
||||
}
|
||||
}
|
||||
cont = 0;
|
||||
|
||||
|
||||
inbuf = "..";
|
||||
wlen = 0;
|
||||
|
||||
|
||||
switch (*pcomp->cflag) {
|
||||
|
||||
|
||||
case ISO_SUSP_CFLAG_CURRENT:
|
||||
/* Inserting Current */
|
||||
wlen = 1;
|
||||
break;
|
||||
|
||||
|
||||
case ISO_SUSP_CFLAG_PARENT:
|
||||
/* Inserting Parent */
|
||||
wlen = 2;
|
||||
break;
|
||||
|
||||
|
||||
case ISO_SUSP_CFLAG_ROOT:
|
||||
/* Inserting slash for ROOT */
|
||||
/* start over from beginning(?) */
|
||||
outbuf -= len;
|
||||
len = 0;
|
||||
break;
|
||||
|
||||
|
||||
case ISO_SUSP_CFLAG_VOLROOT:
|
||||
/* Inserting a mount point i.e. "/cdrom" */
|
||||
/* same as above */
|
||||
@ -148,13 +148,13 @@ cd9660_rrip_slink(p,ana)
|
||||
inbuf = ana->imp->im_mountp->mnt_stat.f_mntonname;
|
||||
wlen = strlen(inbuf);
|
||||
break;
|
||||
|
||||
|
||||
case ISO_SUSP_CFLAG_HOST:
|
||||
/* Inserting hostname i.e. "kurt.tools.de" */
|
||||
inbuf = hostname;
|
||||
wlen = hostnamelen;
|
||||
break;
|
||||
|
||||
|
||||
case ISO_SUSP_CFLAG_CONTINUE:
|
||||
cont = 1;
|
||||
/* fall thru */
|
||||
@ -168,7 +168,7 @@ cd9660_rrip_slink(p,ana)
|
||||
wlen = ana->maxlen + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (len + wlen > ana->maxlen) {
|
||||
/* indicate error to caller */
|
||||
ana->cont = 1;
|
||||
@ -177,16 +177,16 @@ cd9660_rrip_slink(p,ana)
|
||||
*ana->outlen = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
bcopy(inbuf,outbuf,wlen);
|
||||
outbuf += wlen;
|
||||
len += wlen;
|
||||
|
||||
|
||||
}
|
||||
ana->outbuf = outbuf;
|
||||
*ana->outlen = len;
|
||||
ana->cont = cont;
|
||||
|
||||
|
||||
if (!isonum_711(p->flags)) {
|
||||
ana->fields &= ~ISO_SUSP_SLINK;
|
||||
return ISO_SUSP_SLINK;
|
||||
@ -205,28 +205,28 @@ cd9660_rrip_altname(p,ana)
|
||||
char *inbuf;
|
||||
int wlen;
|
||||
int cont;
|
||||
|
||||
|
||||
inbuf = "..";
|
||||
wlen = 0;
|
||||
cont = 0;
|
||||
|
||||
|
||||
switch (*p->flags) {
|
||||
case ISO_SUSP_CFLAG_CURRENT:
|
||||
/* Inserting Current */
|
||||
wlen = 1;
|
||||
break;
|
||||
|
||||
|
||||
case ISO_SUSP_CFLAG_PARENT:
|
||||
/* Inserting Parent */
|
||||
wlen = 2;
|
||||
break;
|
||||
|
||||
|
||||
case ISO_SUSP_CFLAG_HOST:
|
||||
/* Inserting hostname i.e. "kurt.tools.de" */
|
||||
inbuf = hostname;
|
||||
wlen = hostnamelen;
|
||||
break;
|
||||
|
||||
|
||||
case ISO_SUSP_CFLAG_CONTINUE:
|
||||
cont = 1;
|
||||
/* fall thru */
|
||||
@ -235,13 +235,13 @@ cd9660_rrip_altname(p,ana)
|
||||
wlen = isonum_711(p->h.length) - 5;
|
||||
inbuf = (char *)p + 5;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
printf("RRIP with incorrect NM flags?\n");
|
||||
wlen = ana->maxlen + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if ((*ana->outlen += wlen) > ana->maxlen) {
|
||||
/* treat as no name field */
|
||||
ana->fields &= ~ISO_SUSP_ALTNAME;
|
||||
@ -249,10 +249,10 @@ cd9660_rrip_altname(p,ana)
|
||||
*ana->outlen = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
bcopy(inbuf,ana->outbuf,wlen);
|
||||
ana->outbuf += wlen;
|
||||
|
||||
|
||||
if (!cont) {
|
||||
ana->fields &= ~ISO_SUSP_ALTNAME;
|
||||
return ISO_SUSP_ALTNAME;
|
||||
@ -314,55 +314,55 @@ cd9660_rrip_tstamp(p,ana)
|
||||
ISO_RRIP_ANALYZE *ana;
|
||||
{
|
||||
unsigned char *ptime;
|
||||
|
||||
|
||||
ptime = p->time;
|
||||
|
||||
|
||||
/* Check a format of time stamp (7bytes/17bytes) */
|
||||
if (!(*p->flags&ISO_SUSP_TSTAMP_FORM17)) {
|
||||
if (*p->flags&ISO_SUSP_TSTAMP_CREAT)
|
||||
ptime += 7;
|
||||
|
||||
|
||||
if (*p->flags&ISO_SUSP_TSTAMP_MODIFY) {
|
||||
cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_mtime,
|
||||
ISO_FTYPE_RRIP);
|
||||
ptime += 7;
|
||||
} else
|
||||
bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec));
|
||||
|
||||
|
||||
if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) {
|
||||
cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_atime,
|
||||
ISO_FTYPE_RRIP);
|
||||
ptime += 7;
|
||||
} else
|
||||
ana->inop->inode.iso_atime = ana->inop->inode.iso_mtime;
|
||||
|
||||
|
||||
if (*p->flags&ISO_SUSP_TSTAMP_ATTR)
|
||||
cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_ctime,
|
||||
ISO_FTYPE_RRIP);
|
||||
else
|
||||
ana->inop->inode.iso_ctime = ana->inop->inode.iso_mtime;
|
||||
|
||||
|
||||
} else {
|
||||
if (*p->flags&ISO_SUSP_TSTAMP_CREAT)
|
||||
ptime += 17;
|
||||
|
||||
|
||||
if (*p->flags&ISO_SUSP_TSTAMP_MODIFY) {
|
||||
cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_mtime);
|
||||
ptime += 17;
|
||||
} else
|
||||
bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec));
|
||||
|
||||
|
||||
if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) {
|
||||
cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_atime);
|
||||
ptime += 17;
|
||||
} else
|
||||
ana->inop->inode.iso_atime = ana->inop->inode.iso_mtime;
|
||||
|
||||
|
||||
if (*p->flags&ISO_SUSP_TSTAMP_ATTR)
|
||||
cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_ctime);
|
||||
else
|
||||
ana->inop->inode.iso_ctime = ana->inop->inode.iso_mtime;
|
||||
|
||||
|
||||
}
|
||||
ana->fields &= ~ISO_SUSP_TSTAMP;
|
||||
return ISO_SUSP_TSTAMP;
|
||||
@ -385,10 +385,10 @@ cd9660_rrip_device(p,ana)
|
||||
ISO_RRIP_ANALYZE *ana;
|
||||
{
|
||||
unsigned high, low;
|
||||
|
||||
|
||||
high = isonum_733(p->dev_t_high_l);
|
||||
low = isonum_733(p->dev_t_low_l);
|
||||
|
||||
|
||||
if ( high == 0 ) {
|
||||
ana->inop->inode.iso_rdev = makedev( major(low), minor(low) );
|
||||
} else {
|
||||
@ -410,7 +410,7 @@ cd9660_rrip_idflag(p,ana)
|
||||
/* special handling of RE field */
|
||||
if (ana->fields&ISO_SUSP_RELDIR)
|
||||
return cd9660_rrip_reldir(p,ana);
|
||||
|
||||
|
||||
return ISO_SUSP_IDFLAG;
|
||||
}
|
||||
|
||||
@ -476,7 +476,7 @@ cd9660_rrip_loop(isodir,ana,table)
|
||||
struct buf *bp = NULL;
|
||||
char *pwhead;
|
||||
int result;
|
||||
|
||||
|
||||
/*
|
||||
* Note: If name length is odd,
|
||||
* it will be padding 1 byte after the name
|
||||
@ -484,23 +484,23 @@ cd9660_rrip_loop(isodir,ana,table)
|
||||
pwhead = isodir->name + isonum_711(isodir->name_len);
|
||||
if (!(isonum_711(isodir->name_len)&1))
|
||||
pwhead++;
|
||||
|
||||
|
||||
/* If it's not the '.' entry of the root dir obey SP field */
|
||||
if (*isodir->name != 0
|
||||
|| isonum_733(isodir->extent) != ana->imp->root_extent)
|
||||
pwhead += ana->imp->rr_skip;
|
||||
else
|
||||
pwhead += ana->imp->rr_skip0;
|
||||
|
||||
|
||||
phead = (ISO_SUSP_HEADER *)pwhead;
|
||||
pend = (ISO_SUSP_HEADER *)((char *)isodir + isonum_711(isodir->length));
|
||||
|
||||
|
||||
result = 0;
|
||||
while (1) {
|
||||
ana->iso_ce_len = 0;
|
||||
/*
|
||||
* Note: "pend" should be more than one SUSP header
|
||||
*/
|
||||
*/
|
||||
while (pend >= phead + 1) {
|
||||
if (isonum_711(phead->version) == 1) {
|
||||
for (ptable = table; ptable->func; ptable++) {
|
||||
@ -519,7 +519,7 @@ cd9660_rrip_loop(isodir,ana,table)
|
||||
*/
|
||||
phead = (ISO_SUSP_HEADER *)((char *)phead + isonum_711(phead->length));
|
||||
}
|
||||
|
||||
|
||||
if ( ana->fields && ana->iso_ce_len ) {
|
||||
if (ana->iso_ce_blk >= ana->imp->volume_space_size
|
||||
|| ana->iso_ce_off + ana->iso_ce_len > ana->imp->logical_block_size
|
||||
@ -542,7 +542,7 @@ cd9660_rrip_loop(isodir,ana,table)
|
||||
for (ptable = table; ptable->func2; ptable++)
|
||||
if (!(ptable->result&result))
|
||||
ptable->func2(isodir,ana);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -563,17 +563,17 @@ cd9660_rrip_analyze(isodir,inop,imp)
|
||||
struct iso_mnt *imp;
|
||||
{
|
||||
ISO_RRIP_ANALYZE analyze;
|
||||
|
||||
|
||||
analyze.inop = inop;
|
||||
analyze.imp = imp;
|
||||
analyze.fields = ISO_SUSP_ATTR|ISO_SUSP_TSTAMP|ISO_SUSP_DEVICE;
|
||||
|
||||
|
||||
return cd9660_rrip_loop(isodir,&analyze,rrip_table_analyze);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get Alternate Name from 'AL' record
|
||||
* If either no AL record or 0 length,
|
||||
/*
|
||||
* Get Alternate Name from 'AL' record
|
||||
* If either no AL record or 0 length,
|
||||
* it will be return the translated ISO9660 name,
|
||||
*/
|
||||
static RRIP_TABLE rrip_table_getname[] = {
|
||||
@ -597,7 +597,7 @@ cd9660_rrip_getname(isodir,outbuf,outlen,inump,imp)
|
||||
{
|
||||
ISO_RRIP_ANALYZE analyze;
|
||||
RRIP_TABLE *tab;
|
||||
|
||||
|
||||
analyze.outbuf = outbuf;
|
||||
analyze.outlen = outlen;
|
||||
analyze.maxlen = NAME_MAX;
|
||||
@ -605,21 +605,21 @@ cd9660_rrip_getname(isodir,outbuf,outlen,inump,imp)
|
||||
analyze.imp = imp;
|
||||
analyze.fields = ISO_SUSP_ALTNAME|ISO_SUSP_RELDIR|ISO_SUSP_CLINK|ISO_SUSP_PLINK;
|
||||
*outlen = 0;
|
||||
|
||||
|
||||
tab = rrip_table_getname;
|
||||
if (*isodir->name == 0
|
||||
|| *isodir->name == 1) {
|
||||
cd9660_rrip_defname(isodir,&analyze);
|
||||
|
||||
|
||||
analyze.fields &= ~ISO_SUSP_ALTNAME;
|
||||
tab++;
|
||||
}
|
||||
|
||||
|
||||
return cd9660_rrip_loop(isodir,&analyze,tab);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get Symbolic Name from 'SL' record
|
||||
/*
|
||||
* Get Symbolic Name from 'SL' record
|
||||
*
|
||||
* Note: isodir should contains SL record!
|
||||
*/
|
||||
@ -639,7 +639,7 @@ cd9660_rrip_getsymname(isodir,outbuf,outlen,imp)
|
||||
struct iso_mnt *imp;
|
||||
{
|
||||
ISO_RRIP_ANALYZE analyze;
|
||||
|
||||
|
||||
analyze.outbuf = outbuf;
|
||||
analyze.outlen = outlen;
|
||||
*outlen = 0;
|
||||
@ -647,7 +647,7 @@ cd9660_rrip_getsymname(isodir,outbuf,outlen,imp)
|
||||
analyze.cont = 1; /* don't start with a slash */
|
||||
analyze.imp = imp;
|
||||
analyze.fields = ISO_SUSP_SLINK;
|
||||
|
||||
|
||||
return (cd9660_rrip_loop(isodir,&analyze,rrip_table_getsymname)&ISO_SUSP_SLINK);
|
||||
}
|
||||
|
||||
@ -669,7 +669,7 @@ cd9660_rrip_offset(isodir,imp)
|
||||
{
|
||||
ISO_RRIP_OFFSET *p;
|
||||
ISO_RRIP_ANALYZE analyze;
|
||||
|
||||
|
||||
imp->rr_skip0 = 0;
|
||||
p = (ISO_RRIP_OFFSET *)(isodir->name + 1);
|
||||
if (bcmp(p,"SP\7\1\276\357",6)) {
|
||||
@ -679,11 +679,11 @@ cd9660_rrip_offset(isodir,imp)
|
||||
if (bcmp(p,"SP\7\1\276\357",6))
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
analyze.imp = imp;
|
||||
analyze.fields = ISO_SUSP_EXTREF;
|
||||
if (!(cd9660_rrip_loop(isodir,&analyze,rrip_table_extref)&ISO_SUSP_EXTREF))
|
||||
return -1;
|
||||
|
||||
|
||||
return isonum_711(p->skip);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cd9660_util.c 8.1 (Berkeley) 1/21/94
|
||||
* $Id$
|
||||
* $Id: cd9660_util.c,v 1.3 1994/08/02 07:41:31 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -159,7 +159,7 @@ isofncmp(unsigned char *fn,int fnlen,unsigned char *isofn,int isolen)
|
||||
{
|
||||
int i, j;
|
||||
unsigned char c;
|
||||
|
||||
|
||||
while (--fnlen >= 0) {
|
||||
if (--isolen < 0)
|
||||
return *fn;
|
||||
@ -216,14 +216,14 @@ isofntrans(unsigned char *infn,int infnlen,
|
||||
int original,int assoc)
|
||||
{
|
||||
int fnidx = 0;
|
||||
|
||||
|
||||
if (assoc) {
|
||||
*outfn++ = ASSOCCHAR;
|
||||
fnidx++;
|
||||
}
|
||||
for (; fnidx < infnlen; fnidx++) {
|
||||
char c = *infn++;
|
||||
|
||||
|
||||
if (!original && c >= 'A' && c <= 'Z')
|
||||
*outfn++ = c + ('a' - 'A');
|
||||
else if (!original && c == '.' && *infn == ';')
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cd9660_vfsops.c 8.3 (Berkeley) 1/31/94
|
||||
* $Id: cd9660_vfsops.c,v 1.11 1995/03/16 20:23:24 wollman Exp $
|
||||
* $Id: cd9660_vfsops.c,v 1.12 1995/05/19 03:25:35 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -92,7 +92,7 @@ cd9660_mountroot()
|
||||
u_int size;
|
||||
int error;
|
||||
struct iso_args args;
|
||||
|
||||
|
||||
/*
|
||||
* Get vnode for rootdev.
|
||||
*/
|
||||
@ -152,13 +152,13 @@ cd9660_mount(mp, path, data, ndp, p)
|
||||
u_int size;
|
||||
int error;
|
||||
struct iso_mnt *imp = 0;
|
||||
|
||||
|
||||
if ((error = copyin(data, (caddr_t)&args, sizeof (struct iso_args))))
|
||||
return (error);
|
||||
|
||||
|
||||
if ((mp->mnt_flag & MNT_RDONLY) == 0)
|
||||
return (EROFS);
|
||||
|
||||
|
||||
/*
|
||||
* If updating, check whether changing from read-only to
|
||||
* read/write; if there is no device name, that's all we do.
|
||||
@ -233,10 +233,10 @@ iso_mountfs(devvp, mp, p, argp)
|
||||
struct iso_sierra_primary_descriptor *pri_sierra;
|
||||
struct iso_directory_record *rootp;
|
||||
int logical_block_size;
|
||||
|
||||
|
||||
if (!ronly)
|
||||
return EROFS;
|
||||
|
||||
|
||||
/*
|
||||
* Disallow multiple mounts of the same device.
|
||||
* Disallow mounting of a device that is currently in use
|
||||
@ -253,18 +253,18 @@ iso_mountfs(devvp, mp, p, argp)
|
||||
if ((error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p)))
|
||||
return error;
|
||||
needclose = 1;
|
||||
|
||||
|
||||
/* This is the "logical sector size". The standard says this
|
||||
* should be 2048 or the physical sector size on the device,
|
||||
* whichever is greater. For now, we'll just use a constant.
|
||||
*/
|
||||
iso_bsize = ISO_DEFAULT_BLOCK_SIZE;
|
||||
|
||||
|
||||
for (iso_blknum = 16; iso_blknum < 100; iso_blknum++) {
|
||||
if ((error = bread (devvp, btodb(iso_blknum * iso_bsize),
|
||||
iso_bsize, NOCRED, &bp)))
|
||||
goto out;
|
||||
|
||||
|
||||
vdp = (struct iso_volume_descriptor *)bp->b_un.b_addr;
|
||||
if (bcmp (vdp->id, ISO_STANDARD_ID, sizeof vdp->id) != 0) {
|
||||
if (bcmp (vdp->id_sierra, ISO_SIERRA_ID,
|
||||
@ -274,41 +274,41 @@ iso_mountfs(devvp, mp, p, argp)
|
||||
} else
|
||||
high_sierra = 1;
|
||||
}
|
||||
|
||||
|
||||
if (isonum_711 (high_sierra? vdp->type_sierra: vdp->type) == ISO_VD_END) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
if (isonum_711 (high_sierra? vdp->type_sierra: vdp->type) == ISO_VD_PRIMARY)
|
||||
break;
|
||||
brelse(bp);
|
||||
}
|
||||
|
||||
|
||||
if (isonum_711 (high_sierra? vdp->type_sierra: vdp->type) != ISO_VD_PRIMARY) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
pri = (struct iso_primary_descriptor *)vdp;
|
||||
pri_sierra = (struct iso_sierra_primary_descriptor *)vdp;
|
||||
|
||||
|
||||
logical_block_size =
|
||||
isonum_723 (high_sierra?
|
||||
pri_sierra->logical_block_size:
|
||||
pri->logical_block_size);
|
||||
|
||||
|
||||
if (logical_block_size < DEV_BSIZE || logical_block_size > MAXBSIZE
|
||||
|| (logical_block_size & (logical_block_size - 1)) != 0) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
rootp = (struct iso_directory_record *)
|
||||
(high_sierra?
|
||||
pri_sierra->root_directory_record:
|
||||
pri->root_directory_record);
|
||||
|
||||
|
||||
isomp = malloc(sizeof *isomp, M_ISOFSMNT, M_WAITOK);
|
||||
bzero((caddr_t)isomp, sizeof *isomp);
|
||||
isomp->logical_block_size = logical_block_size;
|
||||
@ -319,16 +319,16 @@ iso_mountfs(devvp, mp, p, argp)
|
||||
bcopy (rootp, isomp->root, sizeof isomp->root);
|
||||
isomp->root_extent = isonum_733 (rootp->extent);
|
||||
isomp->root_size = isonum_733 (rootp->size);
|
||||
|
||||
|
||||
isomp->im_bmask = logical_block_size - 1;
|
||||
isomp->im_bshift = 0;
|
||||
while ((1 << isomp->im_bshift) < isomp->logical_block_size)
|
||||
isomp->im_bshift++;
|
||||
|
||||
|
||||
bp->b_flags |= B_AGE;
|
||||
brelse(bp);
|
||||
bp = NULL;
|
||||
|
||||
|
||||
mp->mnt_data = (qaddr_t)isomp;
|
||||
mp->mnt_stat.f_fsid.val[0] = (long)dev;
|
||||
mp->mnt_stat.f_fsid.val[1] = MOUNT_CD9660;
|
||||
@ -337,9 +337,9 @@ iso_mountfs(devvp, mp, p, argp)
|
||||
isomp->im_mountp = mp;
|
||||
isomp->im_dev = dev;
|
||||
isomp->im_devvp = devvp;
|
||||
|
||||
|
||||
devvp->v_specflags |= SI_MOUNTEDON;
|
||||
|
||||
|
||||
/* Check the Rock Ridge Extention support */
|
||||
if (!(argp->flags & ISOFSMNT_NORRIP)) {
|
||||
if ((error = bread (isomp->im_devvp,
|
||||
@ -347,15 +347,15 @@ iso_mountfs(devvp, mp, p, argp)
|
||||
* isomp->logical_block_size / DEV_BSIZE,
|
||||
isomp->logical_block_size,NOCRED,&bp)))
|
||||
goto out;
|
||||
|
||||
|
||||
rootp = (struct iso_directory_record *)bp->b_un.b_addr;
|
||||
|
||||
|
||||
if ((isomp->rr_skip = cd9660_rrip_offset(rootp,isomp)) < 0) {
|
||||
argp->flags |= ISOFSMNT_NORRIP;
|
||||
} else {
|
||||
argp->flags &= ~ISOFSMNT_GENS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The contents are valid,
|
||||
* but they will get reread as part of another vnode, so...
|
||||
@ -381,7 +381,7 @@ iso_mountfs(devvp, mp, p, argp)
|
||||
isomp->iso_ftype = ISO_FTYPE_RRIP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
out:
|
||||
if (bp)
|
||||
@ -420,7 +420,7 @@ cd9660_unmount(mp, mntflags, p)
|
||||
{
|
||||
register struct iso_mnt *isomp;
|
||||
int error, flags = 0;
|
||||
|
||||
|
||||
if (mntflags & MNT_FORCE) {
|
||||
if (!iso_doforce)
|
||||
return (EINVAL);
|
||||
@ -440,7 +440,7 @@ cd9660_unmount(mp, mntflags, p)
|
||||
if (isomp->iso_ftype == ISO_FTYPE_RRIP)
|
||||
iso_dunmap(isomp->im_dev);
|
||||
#endif
|
||||
|
||||
|
||||
isomp->im_devvp->v_specflags &= ~SI_MOUNTEDON;
|
||||
error = VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, p);
|
||||
vrele(isomp->im_devvp);
|
||||
@ -464,7 +464,7 @@ cd9660_root(mp, vpp)
|
||||
int error;
|
||||
struct iso_mnt *imp = VFSTOISOFS (mp);
|
||||
struct iso_directory_record *dp;
|
||||
|
||||
|
||||
tvp.v_mount = mp;
|
||||
tvp.v_data = &tip;
|
||||
ip = VTOI(&tvp);
|
||||
@ -473,7 +473,7 @@ cd9660_root(mp, vpp)
|
||||
ip->i_diroff = 0;
|
||||
dp = (struct iso_directory_record *)imp->root;
|
||||
isodirino(&ip->i_number,dp,imp);
|
||||
|
||||
|
||||
/*
|
||||
* With RRIP we must use the `.' entry of the root directory.
|
||||
* Simply tell iget, that it's a relocated directory.
|
||||
@ -513,9 +513,9 @@ cd9660_statfs(mp, sbp, p)
|
||||
struct proc *p;
|
||||
{
|
||||
register struct iso_mnt *isomp;
|
||||
|
||||
|
||||
isomp = VFSTOISOFS(mp);
|
||||
|
||||
|
||||
sbp->f_type = MOUNT_CD9660;
|
||||
sbp->f_bsize = isomp->logical_block_size;
|
||||
sbp->f_iosize = sbp->f_bsize; /* XXX */
|
||||
@ -597,15 +597,15 @@ cd9660_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
|
||||
struct iso_directory_record *dirp;
|
||||
struct iso_node tip, *ip, *nip;
|
||||
struct netcred *np;
|
||||
|
||||
|
||||
imp = VFSTOISOFS (mp);
|
||||
ifhp = (struct ifid *)fhp;
|
||||
|
||||
|
||||
#ifdef ISOFS_DBG
|
||||
printf("fhtovp: ino %d, start %ld\n",
|
||||
ifhp->ifid_ino, ifhp->ifid_start);
|
||||
#endif
|
||||
|
||||
|
||||
np = vfs_export_lookup(mp, &imp->im_export, nam);
|
||||
if (np == NULL)
|
||||
return (EACCES);
|
||||
@ -615,14 +615,14 @@ cd9660_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
|
||||
printf("fhtovp: lbn exceed volume space %d\n", lbn);
|
||||
return (ESTALE);
|
||||
}
|
||||
|
||||
|
||||
off = iso_blkoff(imp, ifhp->ifid_ino);
|
||||
if (off + ISO_DIRECTORY_RECORD_SIZE > imp->logical_block_size) {
|
||||
printf("fhtovp: crosses block boundary %d\n",
|
||||
off + ISO_DIRECTORY_RECORD_SIZE);
|
||||
return (ESTALE);
|
||||
}
|
||||
|
||||
|
||||
error = bread(imp->im_devvp, btodb(lbn * imp->logical_block_size),
|
||||
imp->logical_block_size, NOCRED, &bp);
|
||||
if (error) {
|
||||
@ -630,7 +630,7 @@ cd9660_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
dirp = (struct iso_directory_record *)(bp->b_un.b_addr + off);
|
||||
if (off + isonum_711(dirp->length) > imp->logical_block_size) {
|
||||
brelse(bp);
|
||||
@ -639,7 +639,7 @@ cd9660_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
|
||||
isonum_711(dirp->length));
|
||||
return (ESTALE);
|
||||
}
|
||||
|
||||
|
||||
if (isonum_733(dirp->extent) + isonum_711(dirp->ext_attr_length) !=
|
||||
ifhp->ifid_start) {
|
||||
brelse(bp);
|
||||
@ -649,7 +649,7 @@ cd9660_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
|
||||
return (ESTALE);
|
||||
}
|
||||
brelse(bp);
|
||||
|
||||
|
||||
ip = &tip;
|
||||
tvp.v_mount = mp;
|
||||
tvp.v_data = ip;
|
||||
@ -687,13 +687,13 @@ cd9660_vptofh(vp, fhp)
|
||||
{
|
||||
register struct iso_node *ip = VTOI(vp);
|
||||
register struct ifid *ifhp;
|
||||
|
||||
|
||||
ifhp = (struct ifid *)fhp;
|
||||
ifhp->ifid_len = sizeof(struct ifid);
|
||||
|
||||
|
||||
ifhp->ifid_ino = ip->i_number;
|
||||
ifhp->ifid_start = ip->iso_start;
|
||||
|
||||
|
||||
#ifdef ISOFS_DBG
|
||||
printf("vptofh: ino %d, start %ld\n",
|
||||
ifhp->ifid_ino,ifhp->ifid_start);
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cd9660_vnops.c 8.3 (Berkeley) 1/23/94
|
||||
* $Id: cd9660_vnops.c,v 1.12 1995/02/13 06:12:32 phk Exp $
|
||||
* $Id: cd9660_vnops.c,v 1.13 1995/03/28 07:46:38 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -81,10 +81,10 @@ cd9660_mknod(ndp, vap, cred, p)
|
||||
struct iso_node *ip;
|
||||
struct iso_dnode *dp;
|
||||
int error;
|
||||
|
||||
|
||||
vp = ndp->ni_vp;
|
||||
ip = VTOI(vp);
|
||||
|
||||
|
||||
if (ip->i_mnt->iso_ftype != ISO_FTYPE_RRIP
|
||||
|| vap->va_type != vp->v_type
|
||||
|| (vap->va_type != VCHR && vap->va_type != VBLK)) {
|
||||
@ -93,7 +93,7 @@ cd9660_mknod(ndp, vap, cred, p)
|
||||
vput(ndp->ni_vp);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
|
||||
dp = iso_dmap(ip->i_dev,ip->i_number,1);
|
||||
if (ip->inode.iso_rdev == vap->va_rdev || vap->va_rdev == VNOVAL) {
|
||||
/* same as the unmapped one, delete the mapping */
|
||||
@ -102,7 +102,7 @@ cd9660_mknod(ndp, vap, cred, p)
|
||||
} else
|
||||
/* enter new mapping */
|
||||
dp->d_dev = vap->va_rdev;
|
||||
|
||||
|
||||
/*
|
||||
* Remove inode so that it will be reloaded by iget and
|
||||
* checked to see if it is an alias of an existing entry
|
||||
@ -237,7 +237,7 @@ cd9660_read(ap)
|
||||
off_t diff;
|
||||
int rasize, error = 0;
|
||||
long size, n, on;
|
||||
|
||||
|
||||
if (uio->uio_resid == 0)
|
||||
return (0);
|
||||
if (uio->uio_offset < 0)
|
||||
@ -260,7 +260,7 @@ cd9660_read(ap)
|
||||
if (iso_lblktosize(imp, rablock) <= ip->i_size)
|
||||
error = cluster_read(vp, (off_t)ip->i_size,
|
||||
lbn, size, NOCRED, &bp);
|
||||
else
|
||||
else
|
||||
error = bread(vp, lbn, size, NOCRED, &bp);
|
||||
} else {
|
||||
if (vp->v_lastr + 1 == lbn &&
|
||||
@ -380,25 +380,25 @@ iso_uiodir(idp,dp,off)
|
||||
off_t off;
|
||||
{
|
||||
int error;
|
||||
|
||||
|
||||
dp->d_name[dp->d_namlen] = 0;
|
||||
dp->d_reclen = DIRSIZ(dp);
|
||||
|
||||
|
||||
if (idp->uio->uio_resid < dp->d_reclen) {
|
||||
idp->eof = 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if (idp->cookiep) {
|
||||
if (idp->ncookies <= 0) {
|
||||
idp->eof = 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
*idp->cookiep++ = off;
|
||||
--idp->ncookies;
|
||||
}
|
||||
|
||||
|
||||
if ((error = uiomove((caddr_t)dp,dp->d_reclen,idp->uio)))
|
||||
return error;
|
||||
idp->uio_off = off;
|
||||
@ -413,7 +413,7 @@ iso_shipdir(idp)
|
||||
int cl, sl, assoc;
|
||||
int error;
|
||||
char *cname, *sname;
|
||||
|
||||
|
||||
cl = idp->current.d_namlen;
|
||||
cname = idp->current.d_name;
|
||||
assoc = (cl > 1) && (*cname == ASSOCCHAR);
|
||||
@ -421,7 +421,7 @@ assoc = (cl > 1) && (*cname == ASSOCCHAR);
|
||||
cl--;
|
||||
cname++;
|
||||
}
|
||||
|
||||
|
||||
dp = &idp->saveent;
|
||||
sname = dp->d_name;
|
||||
if (!(sl = dp->d_namlen)) {
|
||||
@ -483,10 +483,10 @@ cd9660_readdir(ap)
|
||||
u_short tmplen;
|
||||
int ncookies = 0;
|
||||
u_int *cookies = NULL;
|
||||
|
||||
|
||||
ip = VTOI(ap->a_vp);
|
||||
imp = ip->i_mnt;
|
||||
|
||||
|
||||
MALLOC(idp,struct isoreaddir *,sizeof(*idp),M_TEMP,M_WAITOK);
|
||||
idp->saveent.d_namlen = 0;
|
||||
idp->assocent.d_namlen = 0;
|
||||
@ -503,7 +503,7 @@ cd9660_readdir(ap)
|
||||
idp->cookiep = 0;
|
||||
idp->eof = 0;
|
||||
idp->curroff = uio->uio_offset;
|
||||
|
||||
|
||||
entryoffsetinblock = iso_blkoff(imp, idp->curroff);
|
||||
if (entryoffsetinblock != 0) {
|
||||
if ((error = iso_blkatoff(ip, idp->curroff, &bp))) {
|
||||
@ -511,16 +511,16 @@ cd9660_readdir(ap)
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
endsearch = ip->i_size;
|
||||
|
||||
|
||||
while (idp->curroff < endsearch) {
|
||||
/*
|
||||
* If offset is on a block boundary,
|
||||
* read the next directory block.
|
||||
* Release previous if it exists.
|
||||
*/
|
||||
|
||||
|
||||
if (iso_blkoff(imp, idp->curroff) == 0) {
|
||||
if (bp != NULL)
|
||||
brelse(bp);
|
||||
@ -531,10 +531,10 @@ cd9660_readdir(ap)
|
||||
/*
|
||||
* Get pointer to next entry.
|
||||
*/
|
||||
|
||||
|
||||
ep = (struct iso_directory_record *)
|
||||
(bp->b_un.b_addr + entryoffsetinblock);
|
||||
|
||||
|
||||
reclen = isonum_711 (ep->length);
|
||||
isoflags = isonum_711(imp->iso_ftype == ISO_FTYPE_HIGH_SIERRA?
|
||||
&ep->date[6]: ep->flags);
|
||||
@ -544,19 +544,19 @@ cd9660_readdir(ap)
|
||||
imp->logical_block_size);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (reclen < ISO_DIRECTORY_RECORD_SIZE) {
|
||||
error = EINVAL;
|
||||
/* illegal entry, stop */
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (entryoffsetinblock + reclen > imp->logical_block_size) {
|
||||
error = EINVAL;
|
||||
/* illegal directory, so stop looking */
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* XXX: be more intelligent if we can */
|
||||
idp->current.d_type = DT_UNKNOWN;
|
||||
|
||||
@ -566,13 +566,13 @@ cd9660_readdir(ap)
|
||||
else
|
||||
idp->current.d_fileno = dbtob(bp->b_blkno) +
|
||||
idp->curroff;
|
||||
|
||||
|
||||
if (reclen < ISO_DIRECTORY_RECORD_SIZE + idp->current.d_namlen) {
|
||||
error = EINVAL;
|
||||
/* illegal entry, stop */
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
idp->curroff += reclen;
|
||||
/*
|
||||
*
|
||||
@ -612,10 +612,10 @@ cd9660_readdir(ap)
|
||||
}
|
||||
if (error)
|
||||
break;
|
||||
|
||||
|
||||
entryoffsetinblock += reclen;
|
||||
}
|
||||
|
||||
|
||||
if (!error && imp->iso_ftype == ISO_FTYPE_DEFAULT) {
|
||||
idp->current.d_namlen = 0;
|
||||
error = iso_shipdir(idp);
|
||||
@ -634,16 +634,16 @@ cd9660_readdir(ap)
|
||||
*ap->a_cookies = cookies;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bp)
|
||||
brelse (bp);
|
||||
|
||||
uio->uio_offset = idp->uio_off;
|
||||
if (ap->a_eofflag)
|
||||
*ap->a_eofflag = idp->eof;
|
||||
|
||||
|
||||
FREE(idp,M_TEMP);
|
||||
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -665,19 +665,19 @@ cd9660_readlink(ap)
|
||||
} */ *ap;
|
||||
{
|
||||
ISONODE *ip;
|
||||
ISODIR *dirp;
|
||||
ISODIR *dirp;
|
||||
ISOMNT *imp;
|
||||
struct buf *bp;
|
||||
u_short symlen;
|
||||
int error;
|
||||
char *symname;
|
||||
|
||||
|
||||
ip = VTOI(ap->a_vp);
|
||||
imp = ip->i_mnt;
|
||||
|
||||
|
||||
if (imp->iso_ftype != ISO_FTYPE_RRIP)
|
||||
return EINVAL;
|
||||
|
||||
|
||||
/*
|
||||
* Get parents directory record block that this inode included.
|
||||
*/
|
||||
@ -706,7 +706,7 @@ cd9660_readlink(ap)
|
||||
ip->i_number,
|
||||
ip->i_number & imp->im_bmask );
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Just make sure, we have a right one....
|
||||
* 1: Check not cross boundary on block
|
||||
@ -716,13 +716,13 @@ cd9660_readlink(ap)
|
||||
brelse(bp);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Now get a buffer
|
||||
* Abuse a namei buffer for now.
|
||||
*/
|
||||
MALLOC(symname,char *,MAXPATHLEN,M_NAMEI,M_WAITOK);
|
||||
|
||||
|
||||
/*
|
||||
* Ok, we just gathering a symbolic name in SL record.
|
||||
*/
|
||||
@ -735,14 +735,14 @@ cd9660_readlink(ap)
|
||||
* Don't forget before you leave from home ;-)
|
||||
*/
|
||||
brelse(bp);
|
||||
|
||||
|
||||
/*
|
||||
* return with the symbolic name to caller's.
|
||||
*/
|
||||
error = uiomove(symname,symlen,ap->a_uio);
|
||||
|
||||
|
||||
FREE(symname,M_NAMEI);
|
||||
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)iso.h 8.2 (Berkeley) 1/23/94
|
||||
* $Id: iso.h,v 1.3 1994/09/09 11:11:01 dfr Exp $
|
||||
* $Id: iso.h,v 1.4 1995/01/16 17:03:29 joerg Exp $
|
||||
*/
|
||||
|
||||
#define ISODCL(from, to) (to - from + 1)
|
||||
@ -189,16 +189,16 @@ struct iso_mnt {
|
||||
int logical_block_size;
|
||||
int im_bshift;
|
||||
int im_bmask;
|
||||
|
||||
|
||||
int volume_space_size;
|
||||
char im_fsmnt[50];
|
||||
struct netexport im_export;
|
||||
|
||||
|
||||
char root[ISODCL (157, 190)];
|
||||
int root_extent;
|
||||
int root_size;
|
||||
enum ISO_FTYPE iso_ftype;
|
||||
|
||||
|
||||
int rr_skip;
|
||||
int rr_skip0;
|
||||
};
|
||||
@ -228,13 +228,13 @@ int cd9660_vptofh __P((struct vnode *, struct fid *));
|
||||
int cd9660_init __P(());
|
||||
|
||||
struct iso_node;
|
||||
int iso_blkatoff __P((struct iso_node *ip, long offset, struct buf **bpp));
|
||||
int iso_blkatoff __P((struct iso_node *ip, long offset, struct buf **bpp));
|
||||
int iso_iget __P((struct iso_node *xp, ino_t ino, int relocated,
|
||||
struct iso_node **ipp, struct iso_directory_record *isodir));
|
||||
int iso_iput __P((struct iso_node *ip));
|
||||
int iso_ilock __P((struct iso_node *ip));
|
||||
int iso_iunlock __P((struct iso_node *ip));
|
||||
int cd9660_mountroot __P((void));
|
||||
int iso_iput __P((struct iso_node *ip));
|
||||
int iso_ilock __P((struct iso_node *ip));
|
||||
int iso_iunlock __P((struct iso_node *ip));
|
||||
int cd9660_mountroot __P((void));
|
||||
|
||||
extern int (**cd9660_vnodeop_p)();
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
|
||||
*
|
||||
* $Id: fdesc_vnops.c,v 1.7 1994/10/06 21:06:42 davidg Exp $
|
||||
* $Id: fdesc_vnops.c,v 1.8 1995/03/28 07:56:44 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -138,7 +138,7 @@ fdesc_allocvp(ftype, ix, mp, vpp)
|
||||
/*
|
||||
* otherwise lock the array while we call getnewvnode
|
||||
* since that can block.
|
||||
*/
|
||||
*/
|
||||
if (fdcache_lock & FDL_LOCKED) {
|
||||
fdcache_lock |= FDL_WANT;
|
||||
(void) tsleep((caddr_t) &fdcache_lock, PINOD, "fdalvp", 0);
|
||||
@ -195,7 +195,7 @@ fdesc_lookup(ap)
|
||||
pname = ap->a_cnp->cn_nameptr;
|
||||
if (ap->a_cnp->cn_namelen == 1 && *pname == '.') {
|
||||
*vpp = dvp;
|
||||
VREF(dvp);
|
||||
VREF(dvp);
|
||||
VOP_LOCK(dvp);
|
||||
return (0);
|
||||
}
|
||||
@ -325,7 +325,7 @@ fdesc_open(ap)
|
||||
case Fdesc:
|
||||
/*
|
||||
* XXX Kludge: set p->p_dupfd to contain the value of the
|
||||
* the file descriptor being sought for duplication. The error
|
||||
* the file descriptor being sought for duplication. The error
|
||||
* return ensures that the vnode for this device will be
|
||||
* released by vn_open. Open will detect this special error and
|
||||
* take the actions in dupfdopen. Other callers of vn_open or
|
||||
@ -467,7 +467,7 @@ fdesc_getattr(ap)
|
||||
|
||||
default:
|
||||
panic("fdesc_getattr");
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
if (error == 0)
|
||||
@ -586,7 +586,7 @@ fdesc_readdir(ap)
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
|
||||
|
||||
switch (dt->d_fileno) {
|
||||
case FD_CTTY:
|
||||
if (cttyvp(uio->uio_procp) == NULL)
|
||||
@ -690,7 +690,7 @@ fdesc_read(ap)
|
||||
error = EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -714,7 +714,7 @@ fdesc_write(ap)
|
||||
error = EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -741,7 +741,7 @@ fdesc_ioctl(ap)
|
||||
error = EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ fdesc_select(ap)
|
||||
error = EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)fifo_vnops.c 8.2 (Berkeley) 1/4/94
|
||||
* $Id: fifo_vnops.c,v 1.7 1995/02/03 06:46:13 davidg Exp $
|
||||
* $Id: fifo_vnops.c,v 1.8 1995/03/16 18:13:13 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -124,7 +124,7 @@ fifo_lookup(ap)
|
||||
struct componentname * a_cnp;
|
||||
} */ *ap;
|
||||
{
|
||||
|
||||
|
||||
*ap->a_vpp = NULL;
|
||||
return (ENOTDIR);
|
||||
}
|
||||
@ -169,7 +169,7 @@ fifo_open(ap)
|
||||
return (error);
|
||||
}
|
||||
fip->fi_writesock = wso;
|
||||
error = unp_connect2(wso, rso);
|
||||
error = unp_connect2(wso, rso);
|
||||
if (error) {
|
||||
(void)soclose(wso);
|
||||
(void)soclose(rso);
|
||||
@ -251,7 +251,7 @@ fifo_read(ap)
|
||||
rso->so_state |= SS_NBIO;
|
||||
startresid = uio->uio_resid;
|
||||
VOP_UNLOCK(ap->a_vp);
|
||||
error = soreceive(rso, (struct mbuf **)0, uio,
|
||||
error = soreceive(rso, (struct mbuf **)0, uio,
|
||||
(struct mbuf **)0, (struct mbuf **)0, (int*)0);
|
||||
VOP_LOCK(ap->a_vp);
|
||||
/*
|
||||
|
@ -1,19 +1,19 @@
|
||||
/* $Id$ */
|
||||
/* $Id: bootsect.h,v 1.1 1994/09/19 15:41:36 dfr Exp $ */
|
||||
/* $NetBSD: bootsect.h,v 1.4 1994/06/29 06:35:28 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Paul Popelka (paulp@uts.amdahl.com)
|
||||
*
|
||||
*
|
||||
* You can do anything you want with this software, just don't say you wrote
|
||||
* it, and don't remove this notice.
|
||||
*
|
||||
*
|
||||
* This software is provided "as is".
|
||||
*
|
||||
*
|
||||
* The author supplies this software to be publicly redistributed on the
|
||||
* understanding that the author is not responsible for the correct
|
||||
* functioning of this software in any circumstances and is not liable for
|
||||
* any damages caused by this software.
|
||||
*
|
||||
*
|
||||
* October 1992
|
||||
*/
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
/* $Id$ */
|
||||
/* $Id: bpb.h,v 1.1 1994/09/19 15:41:37 dfr Exp $ */
|
||||
/* $NetBSD: bpb.h,v 1.3 1994/06/29 06:35:29 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Paul Popelka (paulp@uts.amdahl.com)
|
||||
*
|
||||
*
|
||||
* You can do anything you want with this software, just don't say you wrote
|
||||
* it, and don't remove this notice.
|
||||
*
|
||||
*
|
||||
* This software is provided "as is".
|
||||
*
|
||||
*
|
||||
* The author supplies this software to be publicly redistributed on the
|
||||
* understanding that the author is not responsible for the correct
|
||||
* functioning of this software in any circumstances and is not liable for
|
||||
* any damages caused by this software.
|
||||
*
|
||||
*
|
||||
* October 1992
|
||||
*/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: denode.h,v 1.3 1994/12/27 12:37:33 bde Exp $ */
|
||||
/* $Id: denode.h,v 1.4 1995/03/16 18:14:17 bde Exp $ */
|
||||
/* $NetBSD: denode.h,v 1.8 1994/08/21 18:43:49 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -34,17 +34,17 @@
|
||||
*/
|
||||
/*
|
||||
* Written by Paul Popelka (paulp@uts.amdahl.com)
|
||||
*
|
||||
*
|
||||
* You can do anything you want with this software, just don't say you wrote
|
||||
* it, and don't remove this notice.
|
||||
*
|
||||
*
|
||||
* This software is provided "as is".
|
||||
*
|
||||
*
|
||||
* The author supplies this software to be publicly redistributed on the
|
||||
* understanding that the author is not responsible for the correct
|
||||
* functioning of this software in any circumstances and is not liable for
|
||||
* any damages caused by this software.
|
||||
*
|
||||
*
|
||||
* October 1992
|
||||
*/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id$ */
|
||||
/* $Id: direntry.h,v 1.1 1994/09/19 15:41:39 dfr Exp $ */
|
||||
/* $NetBSD: direntry.h,v 1.7 1994/08/21 18:43:54 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -34,17 +34,17 @@
|
||||
*/
|
||||
/*
|
||||
* Written by Paul Popelka (paulp@uts.amdahl.com)
|
||||
*
|
||||
*
|
||||
* You can do anything you want with this software, just don't say you wrote
|
||||
* it, and don't remove this notice.
|
||||
*
|
||||
*
|
||||
* This software is provided "as is".
|
||||
*
|
||||
*
|
||||
* The author supplies this software to be publicly redistributed on the
|
||||
* understanding that the author is not responsible for the correct
|
||||
* functioning of this software in any circumstances and is not liable for
|
||||
* any damages caused by this software.
|
||||
*
|
||||
*
|
||||
* October 1992
|
||||
*/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: fat.h,v 1.1 1994/09/19 15:41:40 dfr Exp $ */
|
||||
/* $Id: fat.h,v 1.2 1994/09/27 20:42:41 phk Exp $ */
|
||||
/* $NetBSD: fat.h,v 1.4 1994/08/21 18:43:57 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -34,17 +34,17 @@
|
||||
*/
|
||||
/*
|
||||
* Written by Paul Popelka (paulp@uts.amdahl.com)
|
||||
*
|
||||
*
|
||||
* You can do anything you want with this software, just don't say you wrote
|
||||
* it, and don't remove this notice.
|
||||
*
|
||||
*
|
||||
* This software is provided "as is".
|
||||
*
|
||||
*
|
||||
* The author supplies this software to be publicly redistributed on the
|
||||
* understanding that the author is not responsible for the correct
|
||||
* functioning of this software in any circumstances and is not liable for
|
||||
* any damages caused by this software.
|
||||
*
|
||||
*
|
||||
* October 1992
|
||||
*/
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
/* $Id: msdosfs_conv.c,v 1.3 1994/12/12 12:35:42 bde Exp $ */
|
||||
/* $Id: msdosfs_conv.c,v 1.4 1995/03/29 18:48:06 ache Exp $ */
|
||||
/* $NetBSD: msdosfs_conv.c,v 1.6.2.1 1994/08/30 02:27:57 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Paul Popelka (paulp@uts.amdahl.com)
|
||||
*
|
||||
*
|
||||
* You can do anything you want with this software, just don't say you wrote
|
||||
* it, and don't remove this notice.
|
||||
*
|
||||
*
|
||||
* This software is provided "as is".
|
||||
*
|
||||
*
|
||||
* The author supplies this software to be publicly redistributed on the
|
||||
* understanding that the author is not responsible for the correct
|
||||
* functioning of this software in any circumstances and is not liable for
|
||||
* any damages caused by this software.
|
||||
*
|
||||
*
|
||||
* October 1992
|
||||
*/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_denode.c,v 1.10 1995/03/19 12:11:13 davidg Exp $ */
|
||||
/* $Id: msdosfs_denode.c,v 1.11 1995/04/11 17:13:17 bde Exp $ */
|
||||
/* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -34,17 +34,17 @@
|
||||
*/
|
||||
/*
|
||||
* Written by Paul Popelka (paulp@uts.amdahl.com)
|
||||
*
|
||||
*
|
||||
* You can do anything you want with this software, just don't say you wrote
|
||||
* it, and don't remove this notice.
|
||||
*
|
||||
*
|
||||
* This software is provided "as is".
|
||||
*
|
||||
*
|
||||
* The author supplies this software to be publicly redistributed on the
|
||||
* understanding that the author is not responsible for the correct
|
||||
* functioning of this software in any circumstances and is not liable for
|
||||
* any damages caused by this software.
|
||||
*
|
||||
*
|
||||
* October 1992
|
||||
*/
|
||||
|
||||
@ -83,7 +83,7 @@ msdosfs_hashget(dev, dirclust, diroff)
|
||||
u_long diroff;
|
||||
{
|
||||
struct denode *dep;
|
||||
|
||||
|
||||
for (;;)
|
||||
for (dep = dehashtbl[DEHASH(dev, dirclust + diroff)];;
|
||||
dep = dep->de_next) {
|
||||
@ -111,7 +111,7 @@ msdosfs_hashins(dep)
|
||||
struct denode *dep;
|
||||
{
|
||||
struct denode **depp, *deq;
|
||||
|
||||
|
||||
depp = &dehashtbl[DEHASH(dep->de_dev, dep->de_dirclust + dep->de_diroffset)];
|
||||
deq = *depp;
|
||||
if (deq)
|
||||
@ -137,17 +137,17 @@ msdosfs_hashrem(dep)
|
||||
}
|
||||
|
||||
/*
|
||||
* If deget() succeeds it returns with the gotten denode locked().
|
||||
* If deget() succeeds it returns with the gotten denode locked().
|
||||
*
|
||||
* pmp - address of msdosfsmount structure of the filesystem containing
|
||||
* the denode of interest. The pm_dev field and the address of
|
||||
* the msdosfsmount structure are used.
|
||||
* the msdosfsmount structure are used.
|
||||
* dirclust - which cluster bp contains, if dirclust is 0 (root directory)
|
||||
* diroffset is relative to the beginning of the root directory,
|
||||
* otherwise it is cluster relative.
|
||||
* diroffset - offset past begin of cluster of denode we want
|
||||
* otherwise it is cluster relative.
|
||||
* diroffset - offset past begin of cluster of denode we want
|
||||
* direntptr - address of the direntry structure of interest. If direntptr is
|
||||
* NULL, the block is read if necessary.
|
||||
* NULL, the block is read if necessary.
|
||||
* depp - returns the address of the gotten denode.
|
||||
*/
|
||||
int
|
||||
@ -187,7 +187,7 @@ deget(pmp, dirclust, diroffset, direntptr, depp)
|
||||
* the directory entry to compute the hash value. For subdir use
|
||||
* address of "." entry. for root dir use cluster MSDOSFSROOT,
|
||||
* offset MSDOSFSROOT_OFS
|
||||
*
|
||||
*
|
||||
* NOTE: The check for de_refcnt > 0 below insures the denode being
|
||||
* examined does not represent an unlinked but still open file.
|
||||
* These files are not to be accessible even when the directory
|
||||
@ -337,7 +337,7 @@ deupdat(dep, tp, waitfor)
|
||||
* update.
|
||||
*/
|
||||
error = readde(dep, &bp, &dirp);
|
||||
if (error)
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
/*
|
||||
@ -535,7 +535,7 @@ deextend(dep, length, cred)
|
||||
u_long count;
|
||||
int error;
|
||||
struct timespec ts;
|
||||
|
||||
|
||||
/*
|
||||
* The root of a DOS filesystem cannot be extended.
|
||||
*/
|
||||
@ -554,7 +554,7 @@ deextend(dep, length, cred)
|
||||
|
||||
if (length <= dep->de_FileSize)
|
||||
panic("deextend: file too large");
|
||||
|
||||
|
||||
/*
|
||||
* Compute the number of clusters to allocate.
|
||||
*/
|
||||
@ -569,7 +569,7 @@ deextend(dep, length, cred)
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dep->de_flag |= DE_UPDATE;
|
||||
dep->de_FileSize = length;
|
||||
TIMEVAL_TO_TIMESPEC(&time, &ts);
|
||||
@ -606,7 +606,7 @@ msdosfs_reclaim(ap)
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct denode *dep = VTODE(vp);
|
||||
|
||||
|
||||
#ifdef MSDOSFS_DEBUG
|
||||
printf("msdosfs_reclaim(): dep %p, file %s, refcnt %ld\n",
|
||||
dep, dep->de_Name, dep->de_refcnt);
|
||||
@ -630,10 +630,10 @@ msdosfs_reclaim(ap)
|
||||
}
|
||||
|
||||
dep->de_flag = 0;
|
||||
|
||||
|
||||
FREE(dep, M_MSDOSFSNODE);
|
||||
vp->v_data = NULL;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -647,7 +647,7 @@ msdosfs_inactive(ap)
|
||||
struct denode *dep = VTODE(vp);
|
||||
int error = 0;
|
||||
struct timespec ts;
|
||||
|
||||
|
||||
#ifdef MSDOSFS_DEBUG
|
||||
printf("msdosfs_inactive(): dep %p, de_Name[0] %x\n", dep, dep->de_Name[0]);
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_fat.c,v 1.5 1995/02/10 18:39:45 bde Exp $ */
|
||||
/* $Id: msdosfs_fat.c,v 1.6 1995/04/11 16:43:20 bde Exp $ */
|
||||
/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -34,17 +34,17 @@
|
||||
*/
|
||||
/*
|
||||
* Written by Paul Popelka (paulp@uts.amdahl.com)
|
||||
*
|
||||
*
|
||||
* You can do anything you want with this software, just don't say you wrote
|
||||
* it, and don't remove this notice.
|
||||
*
|
||||
*
|
||||
* This software is provided "as is".
|
||||
*
|
||||
*
|
||||
* The author supplies this software to be publicly redistributed on the
|
||||
* understanding that the author is not responsible for the correct
|
||||
* functioning of this software in any circumstances and is not liable for
|
||||
* any damages caused by this software.
|
||||
*
|
||||
*
|
||||
* October 1992
|
||||
*/
|
||||
|
||||
@ -251,7 +251,7 @@ hiteof:;
|
||||
* Find the closest entry in the fat cache to the cluster we are looking
|
||||
* for.
|
||||
*/
|
||||
void
|
||||
void
|
||||
fc_lookup(dep, findcn, frcnp, fsrcnp)
|
||||
struct denode *dep;
|
||||
u_long findcn;
|
||||
@ -344,22 +344,22 @@ updatefats(pmp, bp, fatbn)
|
||||
|
||||
/*
|
||||
* Updating entries in 12 bit fats is a pain in the butt.
|
||||
*
|
||||
*
|
||||
* The following picture shows where nibbles go when moving from a 12 bit
|
||||
* cluster number into the appropriate bytes in the FAT.
|
||||
*
|
||||
*
|
||||
* byte m byte m+1 byte m+2
|
||||
* +----+----+ +----+----+ +----+----+
|
||||
* | 0 1 | | 2 3 | | 4 5 | FAT bytes
|
||||
* +----+----+ +----+----+ +----+----+
|
||||
*
|
||||
*
|
||||
* +----+----+----+ +----+----+----+
|
||||
* | 3 0 1 | | 4 5 2 |
|
||||
* +----+----+----+ +----+----+----+
|
||||
* cluster n cluster n+1
|
||||
*
|
||||
*
|
||||
* Where n is even. m = n + (n >> 2)
|
||||
*
|
||||
*
|
||||
*/
|
||||
static inline void
|
||||
usemap_alloc(pmp, cn)
|
||||
@ -414,10 +414,10 @@ clusterfree(pmp, cluster, oldcnp)
|
||||
* cluster'th entry if this is a get function
|
||||
* newcontents - the new value to be written into the cluster'th element of
|
||||
* the fat if this is a set function.
|
||||
*
|
||||
*
|
||||
* This function can also be used to free a cluster by setting the fat entry
|
||||
* for a cluster to 0.
|
||||
*
|
||||
*
|
||||
* All copies of the fat are updated if this is a set function. NOTE: If
|
||||
* fatentry() marks a cluster as free it does not update the inusemap in
|
||||
* the msdosfsmount structure. This is left to the caller.
|
||||
@ -470,7 +470,7 @@ fatentry(function, pmp, cn, oldcontents, newcontents)
|
||||
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
||||
if (function & FAT_GET) {
|
||||
readcn = getushort(&bp->b_data[bo]);
|
||||
if (FAT12(pmp)) {
|
||||
@ -523,7 +523,7 @@ fatchain(pmp, start, count, fillwith)
|
||||
int error;
|
||||
u_long bn, bo, bsize, byteoffset, readcn, newc;
|
||||
struct buf *bp;
|
||||
|
||||
|
||||
#ifdef MSDOSFS_DEBUG
|
||||
printf("fatchain(pmp %p, start %ld, count %ld, fillwith %ld)\n",
|
||||
pmp, start, count, fillwith);
|
||||
@ -533,7 +533,7 @@ fatchain(pmp, start, count, fillwith)
|
||||
*/
|
||||
if (start < CLUST_FIRST || start + count - 1 > pmp->pm_maxcluster)
|
||||
return EINVAL;
|
||||
|
||||
|
||||
while (count > 0) {
|
||||
byteoffset = FATOFS(pmp, start);
|
||||
fatblock(pmp, byteoffset, &bn, &bsize, &bo);
|
||||
@ -585,7 +585,7 @@ chainlength(pmp, start, count)
|
||||
u_long idx, max_idx;
|
||||
u_int map;
|
||||
u_long len;
|
||||
|
||||
|
||||
max_idx = pmp->pm_maxcluster / N_INUSEBITS;
|
||||
idx = start / N_INUSEBITS;
|
||||
start %= N_INUSEBITS;
|
||||
@ -632,7 +632,7 @@ chainalloc(pmp, start, count, fillwith, retcluster, got)
|
||||
u_long *got;
|
||||
{
|
||||
int error;
|
||||
|
||||
|
||||
error = fatchain(pmp, start, count, fillwith);
|
||||
if (error == 0) {
|
||||
#ifdef MSDOSFS_DEBUG
|
||||
@ -672,7 +672,7 @@ clusteralloc(pmp, start, count, fillwith, retcluster, got)
|
||||
u_long idx;
|
||||
u_long len, newst, foundcn, foundl, cn, l;
|
||||
u_int map;
|
||||
|
||||
|
||||
#ifdef MSDOSFS_DEBUG
|
||||
printf("clusteralloc(): find %d clusters\n",count);
|
||||
#endif
|
||||
@ -684,19 +684,19 @@ clusteralloc(pmp, start, count, fillwith, retcluster, got)
|
||||
* This is a new file, initialize start
|
||||
*/
|
||||
struct timeval tv;
|
||||
|
||||
|
||||
microtime(&tv);
|
||||
start = (tv.tv_usec >> 10)|tv.tv_usec;
|
||||
len = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Start at a (pseudo) random place to maximize cluster runs
|
||||
* under multiple writers.
|
||||
*/
|
||||
foundcn = newst = (start * 1103515245 + 12345) % (pmp->pm_maxcluster + 1);
|
||||
foundl = 0;
|
||||
|
||||
|
||||
for (cn = newst; cn <= pmp->pm_maxcluster;) {
|
||||
idx = cn / N_INUSEBITS;
|
||||
map = pmp->pm_inusemap[idx];
|
||||
@ -759,7 +759,7 @@ freeclusterchain(pmp, cluster)
|
||||
struct buf *bp = NULL;
|
||||
u_long bn, bo, bsize, byteoffset;
|
||||
u_long readcn, lbn = -1;
|
||||
|
||||
|
||||
while (cluster >= CLUST_FIRST && cluster <= pmp->pm_maxcluster) {
|
||||
byteoffset = FATOFS(pmp, cluster);
|
||||
fatblock(pmp, byteoffset, &bn, &bsize, &bo);
|
||||
@ -878,7 +878,7 @@ extendfile(dep, count, bpp, ncp, flags)
|
||||
u_long cn, got;
|
||||
struct msdosfsmount *pmp = dep->de_pmp;
|
||||
struct buf *bp;
|
||||
|
||||
|
||||
/*
|
||||
* Don't try to extend the root directory
|
||||
*/
|
||||
@ -901,7 +901,7 @@ extendfile(dep, count, bpp, ncp, flags)
|
||||
return error;
|
||||
error = 0;
|
||||
}
|
||||
|
||||
|
||||
while (count > 0) {
|
||||
/*
|
||||
* Allocate a new cluster chain and cat onto the end of the file.
|
||||
@ -918,9 +918,9 @@ extendfile(dep, count, bpp, ncp, flags)
|
||||
error = clusteralloc(pmp, cn, count, CLUST_EOFE, &cn, &got);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
||||
count -= got;
|
||||
|
||||
|
||||
/*
|
||||
* Give them the filesystem relative cluster number if they want
|
||||
* it.
|
||||
@ -929,7 +929,7 @@ extendfile(dep, count, bpp, ncp, flags)
|
||||
*ncp = cn;
|
||||
ncp = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (dep->de_StartCluster == 0) {
|
||||
dep->de_StartCluster = cn;
|
||||
frcn = 0;
|
||||
@ -940,16 +940,16 @@ extendfile(dep, count, bpp, ncp, flags)
|
||||
clusterfree(pmp, cn, NULL);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
frcn = dep->de_fc[FC_LASTFC].fc_frcn + 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Update the "last cluster of the file" entry in the denode's fat
|
||||
* cache.
|
||||
*/
|
||||
fc_setcache(dep, FC_LASTFC, frcn + got - 1, cn + got - 1);
|
||||
|
||||
|
||||
if (flags & DE_CLEAR) {
|
||||
while (got-- > 0) {
|
||||
/*
|
||||
@ -979,6 +979,6 @@ extendfile(dep, count, bpp, ncp, flags)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user