add directory Minix
This commit is contained in:
57
Minix/2.0.0/fixes/fix-1
Normal file
57
Minix/2.0.0/fixes/fix-1
Normal file
@@ -0,0 +1,57 @@
|
||||
This fix repairs a bug in the code handling the resetting of an Adaptec
|
||||
host adapter. Some adapters, notably the old 1540A type, do not set all
|
||||
the expected status bits immediately after the reset is done. This will
|
||||
keep the driver from recognizing the card.
|
||||
|
||||
To apply this fix do the following as bin:
|
||||
|
||||
! cd /usr
|
||||
! patch -p0 < "this-file"
|
||||
|
||||
And build a new kernel normally. You will find the original aha_scsi.c
|
||||
file renamed to aha_scsi.c~ in src/kernel/. You may wish to delete it
|
||||
to clean things up.
|
||||
|
||||
diff -c -r /save/std/2.0.0/src/kernel/aha_scsi.c ./src/kernel/aha_scsi.c
|
||||
*** /save/std/2.0.0/src/kernel/aha_scsi.c Sun Apr 21 21:54:49 1996
|
||||
--- ./src/kernel/aha_scsi.c Wed Oct 23 22:09:08 1996
|
||||
***************
|
||||
*** 1852,1872 ****
|
||||
/* Reset controller, wait for self test to complete. */
|
||||
out_byte(AHA_CNTLREG, AHA_HRST);
|
||||
milli_start(&ms);
|
||||
! while ((stat = in_byte(AHA_STATREG)) & AHA_STST) {
|
||||
if (milli_elapsed(&ms) >= AHA_TIMEOUT) {
|
||||
! printf("aha0: AHA154x controller not responding\n");
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
-
|
||||
- /* Check for self-test failure. */
|
||||
- if ((stat & (AHA_DIAGF | AHA_INIT | AHA_IDLE | AHA_CDF | AHA_DF))
|
||||
- != (AHA_INIT | AHA_IDLE)) {
|
||||
- printf("aha0: AHA154x controller failed self-test\n");
|
||||
- return(0);
|
||||
- }
|
||||
-
|
||||
- /* !! maybe a santity check here: make sure IDLE and INIT are set? */
|
||||
|
||||
/* Get information about controller type and configuration. */
|
||||
cmd[0] = AHACOM_HAINQUIRY;
|
||||
--- 1852,1867 ----
|
||||
/* Reset controller, wait for self test to complete. */
|
||||
out_byte(AHA_CNTLREG, AHA_HRST);
|
||||
milli_start(&ms);
|
||||
! while (((stat = in_byte(AHA_STATREG)) & (AHA_STST | AHA_DIAGF | AHA_INIT
|
||||
! | AHA_IDLE | AHA_CDF | AHA_DF)) != (AHA_INIT | AHA_IDLE))
|
||||
! {
|
||||
if (milli_elapsed(&ms) >= AHA_TIMEOUT) {
|
||||
! printf(
|
||||
! "aha0: AHA154x controller not responding, status = 0x%02x\n",
|
||||
! stat);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get information about controller type and configuration. */
|
||||
cmd[0] = AHACOM_HAINQUIRY;
|
||||
37
Minix/2.0.0/fixes/fix-2
Normal file
37
Minix/2.0.0/fixes/fix-2
Normal file
@@ -0,0 +1,37 @@
|
||||
This fix avoids a crash of the TCP/IP server if it is sent a huge "ping"
|
||||
packet. This only works for Minix in 32-bit mode, because we simply
|
||||
increase the number of buffers inside inet to allow it to handle a big
|
||||
packet. 16-bit Minix can't have more buffers.
|
||||
|
||||
To apply this fix do the following as bin:
|
||||
|
||||
! cd /usr
|
||||
! patch -p0 < "this-file"
|
||||
|
||||
And build a new kernel normally. You will find the original buf.c
|
||||
file renamed to buf.c~ in src/inet/. You may wish to delete it
|
||||
to clean things up.
|
||||
|
||||
Note that it is much quicker and easier to simple change "128" in "192"
|
||||
in buf.c with an editor.
|
||||
|
||||
diff -c -r /save/std/2.0.0/src/inet/buf.c ./src/inet/buf.c
|
||||
*** /save/std/2.0.0/src/inet/buf.c Fri Dec 29 18:08:10 1995
|
||||
--- ./src/inet/buf.c Thu Oct 24 19:26:02 1996
|
||||
***************
|
||||
*** 20,26 ****
|
||||
#define USE_MALLOCS 0
|
||||
|
||||
#ifndef BUF512_NR
|
||||
! #define BUF512_NR (sizeof(int) == 2 ? 40 : 128)
|
||||
#endif
|
||||
|
||||
#define ACC_NR 200
|
||||
--- 20,26 ----
|
||||
#define USE_MALLOCS 0
|
||||
|
||||
#ifndef BUF512_NR
|
||||
! #define BUF512_NR (sizeof(int) == 2 ? 40 : 192)
|
||||
#endif
|
||||
|
||||
#define ACC_NR 200
|
||||
50
Minix/2.0.0/fixes/fix-3
Normal file
50
Minix/2.0.0/fixes/fix-3
Normal file
@@ -0,0 +1,50 @@
|
||||
This fix repairs a bug in a routine in the isoread command that matches
|
||||
filenames. The exact nature of the bug has been lost in the mist of time,
|
||||
but it is for certain that isoread works badly without this fix.
|
||||
|
||||
To apply this this do the following as bin:
|
||||
|
||||
! cd /usr
|
||||
! patch -p0 < "this-file"
|
||||
! cd src/commands/simple
|
||||
! make install
|
||||
|
||||
You will find the original isoread.c file renamed to isoread.c~ in
|
||||
src/commands/simple/. You may wish to delete it to clean things up.
|
||||
|
||||
diff -c -r /save/std/2.0.0/src/commands/simple/isoread.c ./src/commands/simple/isoread.c
|
||||
*** /save/std/2.0.0/src/commands/simple/isoread.c Mon Aug 07 20:33:32 1995
|
||||
--- ./src/commands/simple/isoread.c Sat Nov 16 12:15:41 1996
|
||||
***************
|
||||
*** 175,187 ****
|
||||
int dir_flag;
|
||||
{
|
||||
int i;
|
||||
|
||||
/* First match the filename */
|
||||
! for (i = 0; (i < strlen(name) && i < iso_711(dir_ptr->name_length)); i++)
|
||||
{
|
||||
! if (dir_ptr->name[i] == ';') break;
|
||||
if (name[i] != LOWER_CASE(dir_ptr->name[i])) return 1;
|
||||
}
|
||||
|
||||
/* The filename is ok, now look at the file type */
|
||||
if (dir_flag && !IS_DIR(dir_ptr)) return 1; /* File type not correct */
|
||||
--- 175,191 ----
|
||||
int dir_flag;
|
||||
{
|
||||
int i;
|
||||
+ int len;
|
||||
|
||||
/* First match the filename */
|
||||
! len = strlen(name);
|
||||
! if (len > iso_711(dir_ptr->name_length)) return 1;
|
||||
! for (i = 0; i < len; i++)
|
||||
{
|
||||
! if (dir_ptr->name[i] == ';') return 1;
|
||||
if (name[i] != LOWER_CASE(dir_ptr->name[i])) return 1;
|
||||
}
|
||||
+ if (dir_ptr->name[i] != ';' && dir_ptr->name[i] != 0) return 1;
|
||||
|
||||
/* The filename is ok, now look at the file type */
|
||||
if (dir_flag && !IS_DIR(dir_ptr)) return 1; /* File type not correct */
|
||||
329
Minix/2.0.0/fixes/fix-4
Normal file
329
Minix/2.0.0/fixes/fix-4
Normal file
@@ -0,0 +1,329 @@
|
||||
This fix repairs an insidious problem with the make command that plagues
|
||||
people with fast machines. ("Fast" being defined as faster than what
|
||||
KJB has been using until now, i.e. better than a 486/66.) The problem
|
||||
is that make doesn't add everything to the library if 'make install' is
|
||||
run to rebuild /usr/src/lib/ from scratch. It may happen that the next
|
||||
bit of the library is compiled in the same second as a previous bit.
|
||||
The new bit doesn't look new (same timestamp), and is thus not added.
|
||||
|
||||
This fix also adds an "include some-file" statement to the makefile
|
||||
syntax that allows one to include the contents of one makefile into
|
||||
another. KJB happened to have implemented this feature when he fixed
|
||||
the time bug.
|
||||
|
||||
To apply this fix and recompile make do the following as bin:
|
||||
|
||||
! cd /usr
|
||||
! patch -p0 < "this-file"
|
||||
|
||||
! cp -p /usr/bin/make /usr/bin/make.old # Just in case.
|
||||
! cd src/commands/make
|
||||
! make install
|
||||
|
||||
You will find several files in the make directory that end in ~ that are
|
||||
the originals of the patched files. You can delete them, and the
|
||||
make.old binary once you have verified that the new make works. (That
|
||||
make is needed to remake make should ring your "be careful" bells.)
|
||||
|
||||
diff -c -r /save/std/2.0.0/src/commands/make/h.h ./src/commands/make/h.h
|
||||
*** /save/std/2.0.0/src/commands/make/h.h Sat Nov 13 14:37:40 1993
|
||||
--- ./src/commands/make/h.h Sat Jan 18 15:52:02 1997
|
||||
***************
|
||||
*** 28,33 ****
|
||||
--- 28,34 ----
|
||||
#include <time.h>
|
||||
#include <utime.h>
|
||||
#include <stdio.h>
|
||||
+ #include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifdef eon
|
||||
***************
|
||||
*** 221,227 ****
|
||||
EXTERN bool quest INIT(FALSE); /* Question up-to-dateness of file */
|
||||
EXTERN bool useenv INIT(FALSE); /* Env. macro def. overwrite makefile def.*/
|
||||
EXTERN bool dbginfo INIT(FALSE); /* Print lot of debugging information */
|
||||
! EXTERN bool ambigmac INIT(FALSE); /* guess undef. ambiguous macros (*,<) */
|
||||
EXTERN struct name *firstname;
|
||||
EXTERN char *str1;
|
||||
EXTERN char *str2;
|
||||
--- 222,228 ----
|
||||
EXTERN bool quest INIT(FALSE); /* Question up-to-dateness of file */
|
||||
EXTERN bool useenv INIT(FALSE); /* Env. macro def. overwrite makefile def.*/
|
||||
EXTERN bool dbginfo INIT(FALSE); /* Print lot of debugging information */
|
||||
! EXTERN bool ambigmac INIT(TRUE); /* guess undef. ambiguous macros (*,<) */
|
||||
EXTERN struct name *firstname;
|
||||
EXTERN char *str1;
|
||||
EXTERN char *str2;
|
||||
***************
|
||||
*** 232,237 ****
|
||||
--- 233,239 ----
|
||||
EXTERN int maxsuffarray INIT(0); /* last used entry in suffarray */
|
||||
EXTERN struct macro *macrohead;
|
||||
EXTERN bool expmake; /* TRUE if $(MAKE) has been expanded */
|
||||
+ EXTERN char *makefile; /* The make file */
|
||||
EXTERN int lineno;
|
||||
|
||||
#ifdef tos
|
||||
diff -c -r /save/std/2.0.0/src/commands/make/input.c ./src/commands/make/input.c
|
||||
*** /save/std/2.0.0/src/commands/make/input.c Mon Dec 21 18:56:29 1992
|
||||
--- ./src/commands/make/input.c Sat Nov 23 12:08:22 1996
|
||||
***************
|
||||
*** 346,351 ****
|
||||
--- 346,380 ----
|
||||
expand(&str1s);
|
||||
p = str1;
|
||||
|
||||
+ while (isspace(*p)) p++;
|
||||
+
|
||||
+ /* include? */
|
||||
+ if (strncmp(p, "include", 7) == 0 && isspace(p[7])) {
|
||||
+ char *old_makefile = makefile;
|
||||
+ int old_lineno = lineno;
|
||||
+ FILE *ifd;
|
||||
+
|
||||
+ if ((q = malloc(strlen(p+8)+1)) == (char *)0)
|
||||
+ fatal("No memory for include",(char *)0,0);
|
||||
+
|
||||
+ strcpy(q, p+8);
|
||||
+ p = q;
|
||||
+ while ((makefile = gettok(&q)) != (char *)0) {
|
||||
+ if ((ifd = fopen(makefile, "r")) == (FILE *)0)
|
||||
+ fatal("Can't open %s: %s", makefile, errno);
|
||||
+ lineno = 0;
|
||||
+ input(ifd);
|
||||
+ fclose(ifd);
|
||||
+ }
|
||||
+ free(p);
|
||||
+ makefile = old_makefile;
|
||||
+ lineno = old_lineno;
|
||||
+
|
||||
+ if (getline(&str1s, fd))
|
||||
+ return;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
while (((q = strchr(p, ':')) != (char *)0) &&
|
||||
(p != q) && (q[-1] == '\\')) /* Find dependents */
|
||||
{
|
||||
diff -c -r /save/std/2.0.0/src/commands/make/main.c ./src/commands/make/main.c
|
||||
*** /save/std/2.0.0/src/commands/make/main.c Wed Mar 09 12:39:05 1994
|
||||
--- ./src/commands/make/main.c Sat Nov 23 12:07:25 1996
|
||||
***************
|
||||
*** 44,50 ****
|
||||
|
||||
static char version[]= "2.0";
|
||||
|
||||
- static char *makefile; /* The make file */
|
||||
static FILE *ifd; /* Input file desciptor */
|
||||
static char *ptrmakeflags;
|
||||
|
||||
--- 44,49 ----
|
||||
***************
|
||||
*** 141,153 ****
|
||||
else if (!makefile) { /* If no file, then use default */
|
||||
if ((ifd = fopen(DEFN1, "r")) == (FILE *)0) {
|
||||
if (errno != MNOENT || !DEFN2)
|
||||
! fatal("Can't open %s; error %02x", DEFN1, errno);
|
||||
else if ((ifd = fopen(DEFN2, "r")) == (FILE *)0)
|
||||
! fatal("Can't open %s; error %02x", DEFN2, errno);
|
||||
}
|
||||
}
|
||||
else if ((ifd = fopen(makefile, "r")) == (FILE *)0)
|
||||
! fatal("Can't open %s; error %2x", makefile, errno);
|
||||
|
||||
init();
|
||||
|
||||
--- 140,152 ----
|
||||
else if (!makefile) { /* If no file, then use default */
|
||||
if ((ifd = fopen(DEFN1, "r")) == (FILE *)0) {
|
||||
if (errno != MNOENT || !DEFN2)
|
||||
! fatal("Can't open %s: %s", DEFN1, errno);
|
||||
else if ((ifd = fopen(DEFN2, "r")) == (FILE *)0)
|
||||
! fatal("Can't open %s: %s", DEFN2, errno);
|
||||
}
|
||||
}
|
||||
else if ((ifd = fopen(makefile, "r")) == (FILE *)0)
|
||||
! fatal("Can't open %s: %s", makefile, errno);
|
||||
|
||||
init();
|
||||
|
||||
***************
|
||||
*** 283,289 ****
|
||||
int a2;
|
||||
{
|
||||
fprintf(stderr, "%s: ", myname);
|
||||
! fprintf(stderr, msg, a1, a2);
|
||||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
--- 282,288 ----
|
||||
int a2;
|
||||
{
|
||||
fprintf(stderr, "%s: ", myname);
|
||||
! fprintf(stderr, msg, a1, strerror(a2));
|
||||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
diff -c -r /save/std/2.0.0/src/commands/make/make.c ./src/commands/make/make.c
|
||||
*** /save/std/2.0.0/src/commands/make/make.c Tue Feb 13 19:52:22 1996
|
||||
--- ./src/commands/make/make.c Sat Jan 18 15:50:59 1997
|
||||
***************
|
||||
*** 24,29 ****
|
||||
--- 24,32 ----
|
||||
|
||||
#include "h.h"
|
||||
|
||||
+ /* Files made with a make rule newer than the youngest file. */
|
||||
+ #define NEWER ((time_t) -1 < 0 ? (time_t) LONG_MAX : (time_t) -1)
|
||||
+
|
||||
static bool execflag;
|
||||
|
||||
/*
|
||||
***************
|
||||
*** 68,74 ****
|
||||
#ifdef unix
|
||||
/*
|
||||
* Make a file look very outdated after an error trying to make it.
|
||||
! * This keeps hard links intact. (kjb)
|
||||
*/
|
||||
int makeold(name) char *name;
|
||||
{
|
||||
--- 71,77 ----
|
||||
#ifdef unix
|
||||
/*
|
||||
* Make a file look very outdated after an error trying to make it.
|
||||
! * Don't remove, this keeps hard links intact. (kjb)
|
||||
*/
|
||||
int makeold(name) char *name;
|
||||
{
|
||||
***************
|
||||
*** 390,396 ****
|
||||
}
|
||||
if (r < 0) {
|
||||
if (errno != ENOENT)
|
||||
! fatal("Can't open %s; error %d", np->n_name, errno);
|
||||
|
||||
np->n_time = 0L;
|
||||
} else {
|
||||
--- 393,399 ----
|
||||
}
|
||||
if (r < 0) {
|
||||
if (errno != ENOENT)
|
||||
! fatal("Can't open %s: %s", np->n_name, errno);
|
||||
|
||||
np->n_time = 0L;
|
||||
} else {
|
||||
***************
|
||||
*** 418,429 ****
|
||||
|
||||
if ((fd = open(np->n_name, 0)) < 0) {
|
||||
if (errno != ER_NOTF)
|
||||
! fatal("Can't open %s; error %02x", np->n_name, errno);
|
||||
|
||||
np->n_time = 0L;
|
||||
}
|
||||
else if (getstat(fd, &info) < 0)
|
||||
! fatal("Can't getstat %s; error %02x", np->n_name, errno);
|
||||
else {
|
||||
np->n_time = info.st_mod;
|
||||
np->n_flag |= N_EXISTS;
|
||||
--- 421,432 ----
|
||||
|
||||
if ((fd = open(np->n_name, 0)) < 0) {
|
||||
if (errno != ER_NOTF)
|
||||
! fatal("Can't open %s: %s", np->n_name, errno);
|
||||
|
||||
np->n_time = 0L;
|
||||
}
|
||||
else if (getstat(fd, &info) < 0)
|
||||
! fatal("Can't getstat %s: %s", np->n_name, errno);
|
||||
else {
|
||||
np->n_time = info.st_mod;
|
||||
np->n_flag |= N_EXISTS;
|
||||
***************
|
||||
*** 437,448 ****
|
||||
|
||||
if ((fd = open(np->n_name, 0)) < 0) {
|
||||
if (errno != E_PNNF)
|
||||
! fatal("Can't open %s; error %02x", np->n_name, errno);
|
||||
|
||||
np->n_time = 0L;
|
||||
}
|
||||
else if (getmdate(fd, &info) < 0)
|
||||
! fatal("Can't getstat %s; error %02x", np->n_name, errno);
|
||||
else {
|
||||
np->n_time = cnvtime(&info);
|
||||
np->n_flag |= N_EXISTS;
|
||||
--- 440,451 ----
|
||||
|
||||
if ((fd = open(np->n_name, 0)) < 0) {
|
||||
if (errno != E_PNNF)
|
||||
! fatal("Can't open %s: %s", np->n_name, errno);
|
||||
|
||||
np->n_time = 0L;
|
||||
}
|
||||
else if (getmdate(fd, &info) < 0)
|
||||
! fatal("Can't getstat %s: %s", np->n_name, errno);
|
||||
else {
|
||||
np->n_time = cnvtime(&info);
|
||||
np->n_flag |= N_EXISTS;
|
||||
***************
|
||||
*** 584,601 ****
|
||||
time_t t;
|
||||
|
||||
t = np->n_time;
|
||||
! time(&np->n_time);
|
||||
return (t < dtime);
|
||||
}
|
||||
else if ((np->n_time < dtime || !( np->n_flag & N_EXISTS))
|
||||
&& !(np->n_flag & N_DOUBLE)) {
|
||||
execflag = FALSE;
|
||||
make1(np, (struct line *)0, qdp, basename, inputname); /* free()'s qdp */
|
||||
! time(&np->n_time);
|
||||
if ( execflag) np->n_flag |= N_EXEC;
|
||||
}
|
||||
else if ( np->n_flag & N_EXEC ) {
|
||||
! time(&np->n_time);
|
||||
}
|
||||
|
||||
if (dbginfo) {
|
||||
--- 587,604 ----
|
||||
time_t t;
|
||||
|
||||
t = np->n_time;
|
||||
! np->n_time = NEWER;
|
||||
return (t < dtime);
|
||||
}
|
||||
else if ((np->n_time < dtime || !( np->n_flag & N_EXISTS))
|
||||
&& !(np->n_flag & N_DOUBLE)) {
|
||||
execflag = FALSE;
|
||||
make1(np, (struct line *)0, qdp, basename, inputname); /* free()'s qdp */
|
||||
! np->n_time = NEWER;
|
||||
if ( execflag) np->n_flag |= N_EXEC;
|
||||
}
|
||||
else if ( np->n_flag & N_EXEC ) {
|
||||
! np->n_time = NEWER;
|
||||
}
|
||||
|
||||
if (dbginfo) {
|
||||
diff -c -r /save/std/2.0.0/src/commands/make/reader.c ./src/commands/make/reader.c
|
||||
*** /save/std/2.0.0/src/commands/make/reader.c Mon Nov 15 20:12:14 1993
|
||||
--- ./src/commands/make/reader.c Sat Nov 23 11:37:41 1996
|
||||
***************
|
||||
*** 28,34 ****
|
||||
{
|
||||
fprintf(stderr, "%s: ", myname);
|
||||
fprintf(stderr, msg, a1);
|
||||
! if (lineno) fprintf(stderr, " near line %d", lineno);
|
||||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
--- 28,34 ----
|
||||
{
|
||||
fprintf(stderr, "%s: ", myname);
|
||||
fprintf(stderr, msg, a1);
|
||||
! if (lineno) fprintf(stderr, " in %s near line %d", makefile, lineno);
|
||||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
35
Minix/2.0.0/fixes/fix-5
Normal file
35
Minix/2.0.0/fixes/fix-5
Normal file
@@ -0,0 +1,35 @@
|
||||
This fix repairs a bug in the interpretation of the "MCD" boot variable.
|
||||
Right now it simply doesn't work, so the Mitsumi driver is locked to
|
||||
I/O 300, IRQ 10. (Note that this is a driver for the old and obsolete
|
||||
proprietary Mitsumi interface. Newer Mitsumi devices are IDE, so don't
|
||||
go to the trouble to patch mcd.c to find out that it won't work anyway.)
|
||||
|
||||
To apply this fix do the following as bin:
|
||||
|
||||
! cd /usr
|
||||
! patch -p0 < "this-file"
|
||||
|
||||
And build a new kernel normally. You will find the original mcd.c file
|
||||
renamed to mcd.c~ in src/kernel/. You may wish to delete it to clean
|
||||
things up.
|
||||
|
||||
diff -c -r /save/std/2.0.0/src/kernel/mcd.c ./src/kernel/mcd.c
|
||||
*** /save/std/2.0.0/src/kernel/mcd.c Fri Dec 08 17:23:23 1995
|
||||
--- ./src/kernel/mcd.c Thu Dec 12 20:35:58 1996
|
||||
***************
|
||||
*** 199,205 ****
|
||||
mcd_io_base = v;
|
||||
|
||||
v = MCD_IRQ;
|
||||
! (void) env_parse(var, fmt, 0, &v, 0L, (long) NR_IRQ_VECTORS - 1);
|
||||
mcd_irq = v;
|
||||
|
||||
driver_task(&mcd_dtab); /* Start driver task for cdrom */
|
||||
--- 199,205 ----
|
||||
mcd_io_base = v;
|
||||
|
||||
v = MCD_IRQ;
|
||||
! (void) env_parse(var, fmt, 1, &v, 0L, (long) NR_IRQ_VECTORS - 1);
|
||||
mcd_irq = v;
|
||||
|
||||
driver_task(&mcd_dtab); /* Start driver task for cdrom */
|
||||
Reference in New Issue
Block a user