Commit Graph

9080 Commits

Author SHA1 Message Date
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
Ollivier Robert
bbe5babffc Corected a few typo which resulted in strange resulon results. Add URL
pointing to the Handbook. Changed a few entries to mention /etc/sysconfig.
Reviewed by:
Submitted by:
Obtained from:
1995-07-30 01:44:51 +00:00
Andrey A. Chernov
96d5140413 You can run pkg_info everywhere expect /var/db/pkg directory :-)
Running there you got any kind of strange errors from tar caused
by treating directories as tar files!
Fix it by adding new isfile(name) (check for reg. files) to simple fexists(name) calls.
1995-07-30 01:44:45 +00:00
Andrey A. Chernov
573999ad8a If some files lost in /var/db/pkg/<port>/ after system crash f.e.,
pkg_manage silently dumps core, pkg_info claims about them to
stderr, which makes very difficult to find what directory cause it via
tons of pkg_info -a output. I found solution which covers both variants,
now pkg_info claims about missing files to stdout among valid output
with ERROR: prefix. It heals pkg_manage to not dump core and makes
easy to find errors in pkg_info -a output by simple /ERROR 'more' command.
1995-07-30 01:08:34 +00:00
Ollivier Robert
3c9c802973 Corrected @@ into @. 1995-07-29 22:39:44 +00:00
Ollivier Robert
39f989e409 Put the name of the latest snapshot: 2.1.0-950726-SNAP. 1995-07-29 22:35:40 +00:00
David Greenman
3aa80b1d81 Output statistics as unsigned in the -w section.
Look at error return of kread() and stop on error.
Fix warning in kread() to not output "kvm_read:" twice.
Killed PCB cache misses stat as we no longer have it.
1995-07-29 22:34:15 +00:00
Andrey A. Chernov
61a65662e5 Restore tabs in inetd line
Submitted by:
Obtained from:
1995-07-29 22:22:08 +00:00
David Greenman
89d7f49a31 Add "connections dropped by persist timeout" statistic. 1995-07-29 18:49:16 +00:00
David Greenman
cc0964fb2b Add connection drop capability for persist timeouts.
Reviewed by:	Andras Olah
Obtained from:	4.4BSD-lite2 via W. Richard Stevens
1995-07-29 18:48:44 +00:00
Paul Traina
d242a09dae Only execute /usr/games/fortune if it's there. 1995-07-29 18:43:52 +00:00
Rodney W. Grimes
e48cd9fa52 Add new ``SNAPDATE=""'' for use in snapshot building.
Reviewed by:	jkh
1995-07-29 18:42:29 +00:00
David Greenman
fa8d3a82f4 Initialize "name" to quiet compiler. 1995-07-29 18:21:48 +00:00
Ollivier Robert
51104fd2da Change the `make depend all'' to make depend'' then `make all'' in
the kernel configuration section.
1995-07-29 18:12:50 +00:00
Ollivier Robert
f74d7c2f47 Major overhaul of the FAQ. I've added several contributions
specially from Darryl Okahata. I've rewritten several URL to the proper
<url url="" name=""> tag. There is still room for improvement but it
should be closer to 2.0.5R now. I'll try to be faster for future updates...

Obtained from: Mail messages from the lists.
1995-07-29 18:09:19 +00:00
Paul Traina
522aab930c Don't build xditview unless the actual include files for X11 are present.
Merely checking for the directory is -not- sufficient, since the XFree86
non-programmers distribution has that directory to hold bitmaps.
1995-07-29 17:47:53 +00:00