diff options
Diffstat (limited to 'sys/arch/i386/boot.dos')
-rw-r--r-- | sys/arch/i386/boot.dos/Makefile | 66 | ||||
-rw-r--r-- | sys/arch/i386/boot.dos/dossys.c | 169 |
2 files changed, 0 insertions, 235 deletions
diff --git a/sys/arch/i386/boot.dos/Makefile b/sys/arch/i386/boot.dos/Makefile deleted file mode 100644 index 6be426a0114..00000000000 --- a/sys/arch/i386/boot.dos/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# $OpenBSD: Makefile,v 1.5 1997/04/27 20:56:26 millert Exp $ -# $NetBSD: Makefile,v 1.18 1995/03/23 19:46:45 jtc Exp $ -# -# Ported to boot 386BSD by Julian Elischer (julian@tfs.com) -# September 1992 -# -# 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. -# - -PROG= boot.com -NOMAN= noman -INSTALL_STRIP= - -S= ${.CURDIR}/../../.. - -CFLAGS+=-O2 -D_KERNEL -I${.CURDIR}/../stand/libsa -I${S}/lib/libsa -CFLAGS+=-DDO_BAD144 -I. -I$S -I${.CURDIR}/../.. -I${.CURDIR}/../boot -LDFLAGS=-Bstatic -e start -Wl,-N,-T100 - -# Uncomment this to make the boot block talk to a serial port. -#CPPFLAGS+=-DSERIAL -# Uncomment this to make boot blocks read DOS files -CPPFLAGS+= -DDOSREAD -DDEBUG - -# start.o should be first -SRCS+= start.S table.c boot.c disk.c io.c serial.S sys.c bios.S asm.S -SRCS+= dossys.c version.c -BINDIR= /usr/mdec - -.PATH: ${.CURDIR}/../boot - -all: machine-links - -machine-links: - -rm -f machine && ln -s ${.CURDIR}/../include machine - -rm -f ${MACHINE_ARCH} && ln -s ${.CURDIR}/../include ${MACHINE_ARCH} - -boot.com: ${OBJS} - ${LD} -Bstatic -e start -N -T 0x100 -o dosboot ${OBJS} - cp dosboot dosboot.sym - @strip dosboot - @sh ${.CURDIR}/../boot/rmaouthdr dosboot dosboot.tmp - @mv -f dosboot.tmp boot.com - @ls -l boot.com - -CLEANFILES+=dosboot dosboot.sym machine ${MACHINE_ARCH} - -.include <bsd.prog.mk> diff --git a/sys/arch/i386/boot.dos/dossys.c b/sys/arch/i386/boot.dos/dossys.c deleted file mode 100644 index d62157826fc..00000000000 --- a/sys/arch/i386/boot.dos/dossys.c +++ /dev/null @@ -1,169 +0,0 @@ -#ifdef DOSREAD - -#include <sys/param.h> - -short doserrno; -short doshandle = -1; -void bcopy(), pcpy(); - -void _read(); - -char iobuf[DEV_BSIZE]; - -char *doserrors[] ={ - /* 00 */ "no error", - /* 01 */ "function number invalid", - /* 02 */ "file not found", - /* 03 */ "path not found", - /* 04 */ "too many open files (no handles available)", - /* 05 */ "access denied", - /* 06 */ "invalid handle", - /* 07 */ "memory control block destroyed", - /* 08 */ "insufficient memory", - /* 09 */ "memory block address invalid", - /* 0A */ "environment invalid (usually >32K in length)", - /* 0B */ "format invalid", - /* 0C */ "access code invalid", - /* 0D */ "data invalid", - /* 0E */ "reserved", - /* 0F */ "invalid drive", - /* 10 */ "attempted to remove current directory", - /* 11 */ "not same device", - /* 12 */ "no more files", - /* 13 */ "disk write-protected", - /* 14 */ "unknown unit", - /* 15 */ "drive not ready", - /* 16 */ "unknown command", - /* 17 */ "data error (CRC)", - /* 18 */ "bad request structure length", - /* 19 */ "seek error", - /* 1A */ "unknown media type (non-DOS disk)", - /* 1B */ "sector not found", - /* 1C */ "printer out of paper", - /* 1D */ "write fault", - /* 1E */ "read fault", - /* 1F */ "general failure", - /* 20 */ "sharing violation", - /* 21 */ "lock violation", - /* 22 */ "disk change invalid (ES:DI -> media ID structure)(see #0839)", - /* 23 */ "FCB unavailable", - /* 24 */ "sharing buffer overflow", - /* 25 */ "(DOS 4+) code page mismatch", - /* 26 */ "(DOS 4+) cannot complete file operation (out of input)", - /* 27 */ "(DOS 4+) insufficient disk space", - /* 28 */ "Reserved error (0x28)", - /* 29 */ "Reserved error (0x29)", - /* 2A */ "Reserved error (0x2A)", - /* 2B */ "Reserved error (0x2B)", - /* 2C */ "Reserved error (0x2C)", - /* 2D */ "Reserved error (0x2D)", - /* 2E */ "Reserved error (0x2E)", - /* 2F */ "Reserved error (0x2F)", - /* 30 */ "Reserved error (0x30)", - /* 31 */ "Reserved error (0x31)", - /* 32 */ "network request not supported", - /* 33 */ "remote computer not listening", - /* 34 */ "duplicate name on network", - /* 35 */ "network name not found", - /* 36 */ "network busy", - /* 37 */ "network device no longer exists", - /* 38 */ "network BIOS command limit exceeded", - /* 39 */ "network adapter hardware error", - /* 3A */ "incorrect response from network", - /* 3B */ "unexpected network error", - /* 3C */ "incompatible remote adapter", - /* 3D */ "print queue full", - /* 3E */ "queue not full", - /* 3F */ "not enough space to print file", - /* 40 */ "network name was deleted", - /* 41 */ "network: Access denied", - /* 42 */ "network device type incorrect", - /* 43 */ "network name not found", - /* 44 */ "network name limit exceeded", - /* 45 */ "network BIOS session limit exceeded", - /* 46 */ "temporarily paused", - /* 47 */ "network request not accepted", - /* 48 */ "network print/disk redirection paused", - /* 49 */ "network software not installed", - /* 4A */ "unexpected adapter close", - /* 4B */ "(LANtastic) password expired", - /* 4C */ "(LANtastic) login attempt invalid at this time", - /* 4D */ "(LANtastic v3+) disk limit exceeded on network node", - /* 4E */ "(LANtastic v3+) not logged in to network node", - /* 4F */ "reserved", - /* 50 */ "file exists", - /* 51 */ "reserved", - /* 52 */ "cannot make directory", - /* 53 */ "fail on INT 24h", - /* 54 */ "(DOS 3.3+) too many redirections", - /* 55 */ "(DOS 3.3+) duplicate redirection", - /* 56 */ "(DOS 3.3+) invalid password", - /* 57 */ "(DOS 3.3+) invalid parameter", - /* 58 */ "(DOS 3.3+) network write fault", - /* 59 */ "(DOS 4+) function not supported on network", - /* 5A */ "(DOS 4+) required system component not installed", - /* 64 */ "(MSCDEX) unknown error", - /* 65 */ "(MSCDEX) not ready", - /* 66 */ "(MSCDEX) EMS memory no longer valid", - /* 67 */ "(MSCDEX) not High Sierra or ISO-9660 format", - /* 68 */ "(MSCDEX) door open", - }; - - -void __dosread(buffer, count, copy) - char *buffer; - int count; - void (*copy)(); -{ - int size; - int cnt2; - - while (count) { - size=count; - - if (size>DEV_BSIZE) - size=DEV_BSIZE; - - size=dosread(doshandle,iobuf,size); - twiddle(); - copy(iobuf , buffer, size); - buffer += size; - count -= size; - } -} - -char *printdoserror(char *header) -{ - static char buf[32]; - int max=sizeof(doserrors)/sizeof(doserrors[0]); - if (doserrno<max && doserrno>=0) - printf("%s: %s\n",header,doserrors[doserrno]); - else - printf("%s: Unknown error %d\n",header,doserrno); -} - -doclose() -{ - if (doshandle>=0) { - if (dosclose(doshandle)<0) { - printdoserror("Dosclose"); - doshandle = -1; - return -1; - } - } - return 0; -} - -dosopenrd(char *cp) -{ - if (doshandle<0) { - doshandle=dosopen(cp); - if (doshandle<0) { - printdoserror("dosopen"); - return -1; - } - } - return 0; -} - -#endif |