Commit Graph

9245 Commits

Author SHA1 Message Date
Jordan K. Hubbard
156547674a Round this out. Now seems to transfer packages properly over ftp
as it was supposed to.  PKG_PATH more sorely needed than ever now..
Hmmmm.
1995-08-01 09:49:27 +00:00
Jordan K. Hubbard
118e410749 Argh! I hate my life! I can't seem to do anything right here today.
This should restore functionality to the pkg_install suite.
1995-08-01 07:16:51 +00:00
Jordan K. Hubbard
d660e3ae8d Sync to author's Version 1.3.
Submitted by:	james
1995-08-01 07:07:42 +00:00
Jordan K. Hubbard
a2048b9c26 Sync to reality for the Gravis Ultrasound MAX card. 1995-08-01 07:05:16 +00:00
Andrey A. Chernov
263ac6e4b1 Reduce passed speed to 38400, like telnet does too.
Remote rlogind may not understand speeds > 38400.
1995-08-01 02:23:21 +00:00
Bruce Evans
19829865ca Obtained from: partly from ancient patches of mine via 1.1.5
Change all short variables in `struct tty' to int.  Shorts were only
right on ancient systems with ints optimized for vaxness over
efficiency.
1995-07-31 22:50:08 +00:00
Bruce Evans
35b46c174c Obtained from: partly from ancient patches of mine via 1.1.5
Handle MDMBUF a little better.  Prepare to handle 4 different kinds of
output flow control.
1995-07-31 22:48:46 +00:00
Jordan K. Hubbard
8f5171930e Reserve space for Jim Lowe's impending Matrox Meteor card driver.
Submitted by:	james
1995-07-31 22:06:55 +00:00
Bruce Evans
0d0e55bbbd Obtained from: an ancient patch of mine via 1.1.5
Call output process whether or not there is any output.  The output
process may be overloaded to handle hardware flow control and
hardware output completions.
1995-07-31 21:54:46 +00:00
Bruce Evans
f91307e23d Obtained from: an ancient patch of mine via 1.1.5
Clear PENDIN when input is flushed so that the handling of future input
doesn't get pessimized.
1995-07-31 21:43:37 +00:00
Jordan K. Hubbard
8d542917cf Add Irish mirror site. 1995-07-31 21:39:47 +00:00
Bruce Evans
7922019b1c Eliminate the use of TS_TIMEOUT and ttstrt(). These are for handling
tab delays etc.  pcvt was using them to recover from a (rarely lost)
race.  Use a little more locking to avoid the race.
1995-07-31 21:35:17 +00:00
Bruce Evans
b42d2104dc Use tsleep() instead of ttysleep() to wait for carrier since a generation
change isn't an error.
1995-07-31 21:28:42 +00:00
Bruce Evans
1856afe955 Sleep on a better address to wait for output to drain out of the
hardware.  Set the sleep-on flag for the address so there is more
than a small chance that the sleep address is actually used (this
used to work by timing out).  Don't bother clearing the sleep-on
flag after a timeout here or elsewhere since leaving it set just
generates a few null calls to wakeup().
1995-07-31 21:10:36 +00:00
Bruce Evans
9fa18570a2 Obtained from: partly from ancient patches of mine via 1.1.5
Introduce TS_CONNECTED and TS_ZOMBIE states.  TS_CONNECTED is set
while a connection is established.  It is set while (TS_CARR_ON or
CLOCAL is set) and TS_ZOMBIE is clear.  TS_ZOMBIE is set for on to
off transitions of TS_CARR_ON that occur when CLOCAL is clear and
is cleared for off to on transitions of CLOCAL.  I/o can only occur
while TS_CONNECTED is set.  TS_ZOMBIE prevents further i/o.

Split the input-event sleep address TSA_CARR_ON(tp) into TSA_CARR_ON(tp)
and TSA_HUP_OR_INPUT(tp).  The former address is now used only for
off to on carrier transitions and equivalent CLOCAL transitions.
The latter is used for all input events, all carrier transitions
and certain CLOCAL transitions.  There are some harmless extra
wakeups for rare connection- related events.  Previously there were
too many extra wakeups for non-rare input events.

Drivers now call l_modem() instead of setting TS_CARR_ON directly
to handle even the initial off to on transition of carrier.  They
should always have done this.  l_modem() now handles TS_CONNECTED
and TS_ZOMBIE as well as TS_CARR_ON.

gnu/isdn/iitty.c:
Set TS_CONNECTED for first open ourself to go with bogusly setting
CLOCAL.

i386/isa/syscons.c, i386/isa/pcvt/pcvt_drv.c:
We fake carrier, so don't also fake CLOCAL.

kern/tty.c:
Testing TS_CONNECTED instead of TS_CARR_ON fixes TIOCCONS forgetting to
test CLOCAL.  TS_ISOPEN was tested instead, but that broke when we disabled
the clearing of TS_ISOPEN for certain transitions of CLOCAL.

Testing TS_CONNECTED fixes ttyselect() returning false success for output
to devices in state !TS_CARR_ON && !CLOCAL.

Optimize the other selwakeup() call (this is not related to the other
changes).

kern/tty_pty.c:
ptcopen() can be declared in traditional C now that dev_t isn't short.
1995-07-31 21:02:00 +00:00
Bruce Evans
177af312cd Assorted cosmetic changes:
Make more functions static.

tty.c:
Use tcflag_t (u_long) and cc_t instead of u_char and int/long.

Don't record values that are only evaluated once.

Compare ints using imin(), not min().  min() is for comparing u_ints.
Old versions of tty.c used the type-safe but multiple-evaluation-unsafe
macro MIN().  The args are apparently never negative; otherwise this
change would be non-cosmetic.

Don't repeat the loop test in ttywait().

tty.h:
Improve English in and formatting of comments.
1995-07-31 19:17:19 +00:00
Bruce Evans
f3b37f91c1 Improve input flow control.
Use input buffer watermarks of TTYHOG-512 (high) and (high)*7/8
(low) instead of TTYHOG/2 (high) and TTYHOG/5 (low) to agree with
some drivers.  512 is magic and some things depended on TTYHOG/2
>= TTYHOG-512 to work; now they depend on the 512 magic not changing
and TTYHOG-512 being significantly larger than 0.  This should be
handled in ttsetwater().

Separate the decision about whether to do input flow control from
doing it.  ttyblock() now just starts input flow control (hardware
and/or software) and there is a new function ttyunblock() to stop
it.  The decisions are the same except for the watermark changes
and allowing for input expansion for PARMRK.

When flushing input, try harder at first to send a start character
if required, but give up if the first attempt fails.

cy.c, rc.c, sio.c:
Simplify: let ttyinput() handle input flow control if it is not
being bypassed.  Use ttyblock() to start flow control otherwise.

rc.c:
Use same input flow control test as elsewhere: test in a more
efficient order and start flow control at >= highwater instead of
at > highwater.
1995-07-31 18:29:51 +00:00
Bill Paul
cca80d1fd8 The other day someone brought me an old Apple Laserwriter II with a serial
interface set at 57600 baud, and I found out the hard way that lpd doesn't
know about speeds greater than 38400, even though <sys/ttydev.h> also
permits 57600 and 115200 baud. Fix this by adding B57600 and B115200 to the
'bauds' table. (The Apple printer worked properly once I did this, BTW. :)
1995-07-31 13:59:45 +00:00
Gary Palmer
7d4aa0825d Try to make the `syn' blocking code act a bit more sensibly - don't
block `syn' packets that have `ack' set.
Reviewed by:
Submitted by:
Obtained from:
1995-07-31 13:58:35 +00:00
Peter Wemm
f0448ae4a2 Fix panic("ifpromisc failed") when shutting down a bpf tap when the attached
interface is no longer IFF_UP.
The test for IFF_UP in ifpromisc is only useful while enabling IFF_PROMISC
and the higher levels of the bpf code do not allow for the possibility of
failure while shutting down.  This is a trivial change.
Also, fixes PR#522.
1995-07-31 10:35:36 +00:00
Andras Olah
d3eede9d32 Remove a redundant `if' from tcp_reass().
Correct a typo in a comment (SEND_SYN -> NEEDSYN).

Reviewed by:	David Greenman
1995-07-31 10:24:22 +00:00
Mike Pritchard
a9680d7112 Null terminate all strings returned by the dummy uname() routine,
and make sure that the version string is somewhat sane.  This
closes out PR#462.

Reviewed by: Bruce Evans
1995-07-31 10:10:02 +00:00
Mike Pritchard
e145373611 Fix the sysctl string routines to return as much of the
string as possible and return ENOMEM if the entire string cannot
be returned.  This brings the routines in line with how the man
page says they work, and how the calling routines are expecting
them to work.  This allows the dummy uname() routine in libc to
obtain the version string, since the kernel version string is
longer than that normally returned by the uname() routine.
This is 3/4 of the fix for PR# 462.

Reviewed by: Bruce Evans
1995-07-31 10:07:31 +00:00
Mike Pritchard
3bc90ef89a Fix some incorrect comments that make reference to /dev/fd. 1995-07-31 09:52:21 +00:00
Peter Dufault
c8bb1269a8 Return the correct number of I/O ports as part of the probe so that the
conflict resolution works.
1995-07-31 09:38:21 +00:00
Mike Pritchard
f03dea9996 Fix various kernfs file system problems, which can result in
umountable file systems, hung processes, or system panics:

- Some operations could return without decrementing the vnode
  reference count.
- Some operations could leave the vnode locked.
- Generalize the /kern/rootdev & rrootdev files so that they
  are no longer special cased in kernfs_lookup().

Note: procfs, fdescfs, and most of the other miscfs/* file systems
also suffer from the same type of problems and I will work on
fixing them one at a time.
1995-07-31 08:52:02 +00:00
Justin T. Gibbs
185363acb2 Long overdue, more complete, reset code. These changes implement a
BUS DEVICE RESET followed by BUS RESET failure recovery strategy including
the necesary renegotiation of sync/wide transfers after recovery completes.

Clean up debugging code to make it more finely selectable.  Reset code
debugging is enabled for now so I can get more feedback on how this
code behaves in real life.
1995-07-31 08:25:36 +00:00
Justin T. Gibbs
4dc2fc9088 Pause the sequencer when message only requests complete. This allows the
kernel driver to know the exact state of the sequencer after a BUS DEVICE
RESET or ABORT completes so it can properly clean up the request.
1995-07-31 08:21:59 +00:00
Satoshi Asami
75f2898f9a Submitted by: Torbjorn Granlund <tege@matematik.su.se>
* /usr/bin/which doesn't work if a complete path is passed to it.  This is
  incompatible with other flavours of Unix, Here is a suggested patch:
1995-07-31 04:22:07 +00:00
Satoshi Asami
e7a7980c25 Sync this up with ftp.c. 1995-07-31 04:00:01 +00:00
Jordan K. Hubbard
d5285ad858 Remove dependency on sysinstall. 1995-07-31 02:27:58 +00:00
Jordan K. Hubbard
103ccee575 Add ftp.c to makefile - that might make it work better. Sheesh! 1995-07-31 01:26:58 +00:00
John Fieber
bf8f091b44 Minor corrections.
Submitted by:	joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
1995-07-31 01:18:46 +00:00
Bruce Evans
70eec7420c Ignore trailing slashes in pathnames that "refer to a directory",
as is required to be POSIXLY_CORRECT and "right".  I interpret
"referring to a directory" as being a directory or becoming a
directory.  E.g., the trailing slashes in mkdir("/nonesuch/"),
rename("/tmp", /nonesuch/") and link("/tmp", "/root_can_like_dirs/")
are ignored because the target will become a directory if the
syscall succeeds.  A trailing slash on a symlink causes the symlink
to be followed (this is a bug if the symlink doesn't point to a
directory; fix later).
1995-07-31 00:35:58 +00:00
David Greenman
2d691d7dbc Correct the mangled English when mentioning that the kernel config-file
"dump on" is deprecated...by removing the note completely.
1995-07-30 18:33:01 +00:00
David Greenman
a705fd3e48 Fix a bug in my disabled version of trap_pfault()...curpcb may be NULL even
when curproc isn't. This condition occurs at system startup and perhaps
at other times.
1995-07-30 17:49:24 +00:00
David Greenman
887f41183e Rewrote shutdown_nice() to fix the init-not-yet-started panic(). 1995-07-30 17:10:36 +00:00
Gary Palmer
4545963cd1 Typo in log message : errros -> errors 1995-07-30 15:18:29 +00:00
Bruce Evans
79ccb9aff3 Don't swap the queue headers to implement concatenation of the
queues for TIOCSETA[W].  Swapping an even number of times broke
the queue resource limits.  This would have broken CRTSCTS flow
control if the clist slush list was used up.

Don'concatenate the queues for TIOCSETA[W] if one of the queues
has a resource limit of 0.  Concatenation would cause a panic if
one of the queues is nonempty and the other is limited to length
0.  This may have caused panics in PPPDISC.

Wake up readers after all transitions of ICANON.  When ICANON is
turned off it is quite likely that characters will become available
to be read.

Reduce indentation near these changes.
1995-07-30 13:52:56 +00:00
Joerg Wunsch
5eae614b13 Remove a newline from the output of savecore(8), so the bogus number
1024 that used to remain on a line of its own after savecore completed
its job will be overwritten later in the /etc/rc process.

Reviewed by:
Submitted by:	graichen@sirius.physik.fu-berlin.de (Thomas Graichen)
Obtained from:
1995-07-30 13:10:56 +00:00
Joerg Wunsch
69c06b0c7f scsi(8) used to fall off the end of main(), returning an arbitrary
value.

Reviewed by:
Submitted by:
Obtained from:
1995-07-30 12:58:47 +00:00
Jordan K. Hubbard
55cc556c42 Fix the mknod for spigot. 1995-07-30 12:56:26 +00:00
Joerg Wunsch
4a04ac03ab Update the parts on how to take a kernel crash dump.
Reviewed by:
Submitted by:
Obtained from:
1995-07-30 12:53:39 +00:00
Bruce Evans
d7515ab5cf Split TS_ASLEEP (sleep on output [below low water])into TS_SO_OLOWAT (sleep
on output below low water) and TS_SO_OCOMPLETE (sleep on output complete).
Most of the support for this has already been committed.  Drivers should
call ttwwakeup() to handle wakeups whenever output is below low water
(and some output event causes this condition to be checked) or TS_BUSY is
cleared.

tty.c:
Fix the livelock in ttywait() properly by sleeping on output complete, not
on output below low water.

Use ttwwakeup() instead of separate select and output wakeups for all
wakeups of writers.

Add wakeups of writers for output flushes and carrier/clocal transitions.

Don't go to sleep in ttycheckoutq() if ttstart() reduces the queue to below
low water.

Use the timeout built into tsleep() in ttycheckoutq().

Optimize the select wakeup in ttwwakeup().  It seems reasonable to know
too much about the internals of tp->t_wsel now that the knowledge is
localised in tty.c.
1995-07-30 12:39:42 +00:00
Jordan K. Hubbard
70ad39a5d4 Change the environment variable this looks for from FTP_PASSIVE to
FTP_PASSIVE_MODE.  It would be really nice if we could standardise on
this name so that all tools (like ncftp) that offer passive/active
ftp selection would work seamlessly with one user environment variable
setting.
1995-07-30 09:41:21 +00:00
Jordan K. Hubbard
a2d09e69b2 Document how to get pkg_add to use PASSIVE MODE ftp in such transfers. 1995-07-30 09:37:31 +00:00
Jordan K. Hubbard
4366f12ca2 Totally eliminate the dependency on libftp (which will be removed from the
FreeBSD source tree) and switch to the internal ftp routines developed
by Poul-Henning and used in sysinstall.
1995-07-30 09:33:31 +00:00
Jordan K. Hubbard
d8003c2a59 o Fix PR# bin/643 - always set "where_to" properly.
o Nuke dependence on libftp - it's about to die!
1995-07-30 09:11:20 +00:00
Bruce Evans
8b9a408f3f Rename GZIP to GZIPCMD to match previous change in bsd.doc.mk.
Submitted by:	John Hay (jhay@mikom.csir.co.za)
1995-07-30 08:04:50 +00:00
Satoshi Asami
86e0f980c9 The default for temporary directory is /var/tmp, not /tmp. 1995-07-30 05:25:35 +00:00