Commit Graph

29575 Commits

Author SHA1 Message Date
Steve Price
3630d9abff 'They They' -> 'They'
PR:		6912
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1998-06-14 16:06:00 +00:00
Bruce Evans
ed9c039078 Complete the switch to using gcc-2.4 features to declare fpos_t ,
as threatened in the 4-5 year old comment.  Most of the change is
in <machine/ansi.h>; this commit just removes cruft for the strict
ANSI case.  64-bit types couldn't actually be defined using
__attribute__(()) in gcc-2.4, since attribute names in the
implementation namespace only became available in gcc-2.7.  I've
probably just broken gcc-2.6 support by using the gcc-2.7 names
unconditionally.
1998-06-14 16:04:20 +00:00
Steve Price
a84507eabd sprintf -> snprintf to avoid potential buffer overflow.
PR:		6907
Submitted by:	Archie Cobbs <archie@whistle.com>
1998-06-14 16:03:40 +00:00
Bruce Evans
4c4918c9e4 Avoid an egcs pessimization for 64-bit signed division on i386's.
Pre-2.8 versions of gcc generate a call to __divdi3() for all 64-bit
signed divisions, but egcs optimizes them to a shift and fixup when
the divisor is a constant power of 2.  Unfortunately, it generates
a call to __cmpdi2() for the fixup, although all except possibly
ancient versions of gcc and egcs do ordinary 64-bit comparisons
inline.
1998-06-14 15:52:00 +00:00
Bruce Evans
a525aa3424 Added uoff_t. 1998-06-14 15:26:03 +00:00
Bruce Evans
f0c2a198e7 Removed LOCORE ifdef. This header isn't used for locore stuff.
Use uoff_t instead of `unsigned long long' for unsigned offsets.

Fixed some style bugs.
1998-06-14 15:21:27 +00:00
Bruce Evans
54968d29c0 Define 64-bit types in terms of __int64_t and __uint64_t.
Define an unsigned version of off_t (uoff_t) if KERNEL is defined.
This is useful for micro-optimizing expressions involving off_t's
where you know that the values are non-negative but the compiler
doesn't know it.

Fixed a gratuitous ANSIism.
1998-06-14 14:08:21 +00:00
Bruce Evans
23adf828d5 Added typedefs for __int64_t and __uint64_t. These will be used to avoid
explicit use of `[unsigned] long long' and `[u]quad_t'.

Fixed disorder of and lack of comments for the types added in the previous
two commits.  Improved some comments.  The comments should be elswhere
(not duplicated in every MD file).
1998-06-14 14:00:47 +00:00
Doug Rabson
2f41bd7203 Declare zs_cnattach. 1998-06-14 13:58:57 +00:00
Doug Rabson
b1bf661000 [Add missing files from previous commit]
Major changes to the generic device framework for FreeBSD/alpha:

* Eliminate bus_t and make it possible for all devices to have
  attached children.

* Support dynamically extendable interfaces for drivers to replace
  both the function pointers in driver_t and bus_ops_t (which has been
  removed entirely.  Two system defined interfaces have been defined,
  'device' which is mandatory for all devices and 'bus' which is
  recommended for all devices which support attached children.

* In addition, the alpha port defines two simple interfaces 'clock'
  for attaching various real time clocks to the system and 'mcclock'
  for the many different variations of mc146818 clocks which can be
  attached to different alpha platforms.  This eliminates two more
  function pointer tables in favour of the generic method dispatch
  system provided by the device framework.

Future device interfaces may include:

* cdev and bdev interfaces for devfs to use in replacement for specfs
  and the fixed interfaces bdevsw and cdevsw.

* scsi interface to replace struct scsi_adapter (not sure how this
  works in CAM but I imagine there is something similar there).

* various tailored interfaces for different bus types such as pci,
  isa, pccard etc.
1998-06-14 13:53:12 +00:00
Doug Rabson
99d11cde56 Major changes to the generic device framework for FreeBSD/alpha:
* Eliminate bus_t and make it possible for all devices to have
  attached children.

* Support dynamically extendable interfaces for drivers to replace
  both the function pointers in driver_t and bus_ops_t (which has been
  removed entirely.  Two system defined interfaces have been defined,
  'device' which is mandatory for all devices and 'bus' which is
  recommended for all devices which support attached children.

* In addition, the alpha port defines two simple interfaces 'clock'
  for attaching various real time clocks to the system and 'mcclock'
  for the many different variations of mc146818 clocks which can be
  attached to different alpha platforms.  This eliminates two more
  function pointer tables in favour of the generic method dispatch
  system provided by the device framework.

Future device interfaces may include:

* cdev and bdev interfaces for devfs to use in replacement for specfs
  and the fixed interfaces bdevsw and cdevsw.

* scsi interface to replace struct scsi_adapter (not sure how this
  works in CAM but I imagine there is something similar there).

* various tailored interfaces for different bus types such as pci,
  isa, pccard etc.
1998-06-14 13:46:10 +00:00
Bruce Evans
25874f75bc Don't define away __attribute__() for the non-gcc and old-gcc cases.
Using __attribute__() in non-ifdefed code is just wrong if it changes
the semantics, and there is no way to ignore __attribute__() only in
the benign cases.

Don't use __attribute__ in non-ifdefed code here.  It was a benign
case, but we already have a macro (__unused) for this case.

Expanded comment about gotchas for __CONCAT() in the non-ANSI case.
1998-06-14 13:40:01 +00:00
Doug Rabson
ef219789e1 Elf64_Shdr.sh_size should be Elf64_Size not Elf64_Word. 1998-06-14 13:24:09 +00:00
Bruce Evans
a395dbb153 Avoid a 64-bit division in procfs_readdir(). Fixed related overflows.
Check args using the same expression as in fdesc and kernfs.  The check
was actually already correct, modulo overflow.  It could be tightened
up to either allow huge (aligned) offsets, treating them as EOF, or
disallow all offsets beyond EOF.

Didn't fix invalid address calculation &foo[i] where i may be out of
bounds.

Didn't fix shooting of foot using a private unportable dirent struct.
1998-06-14 12:53:39 +00:00
Bruce Evans
ecf723aa39 Avoid a 64-bit division in kernfs_readdir(). Fixed related overflows
and arg checking.
1998-06-14 12:34:42 +00:00
Peter Wemm
02a93d74e0 Don't compile in the use of poll() when building libc_r. This isn't
so much a "fix", rather a bandaid to buy time to fix it properly
within the thread engine.
1998-06-14 11:25:46 +00:00
Bruce Evans
26d7294956 Avoid 64-bit divisions and modulos. Fixed related overflows for weird
args.

This driver should not be used, since it calls uiomove() with interrupts
disabled.
1998-06-14 10:52:52 +00:00
John Birrell
597035b4db If a short write, only loop if no error. 1998-06-14 09:36:14 +00:00
Bruce Evans
a41878a77a Avoid a 64-bit division in fdesc_readdir(). Fixed related overflows
and missing arg checking.

Panic instead of returning bogus error codes or forgetting to check
all cases if fdesc_readdir() gets called for a non-directory.  This
can't happen.
1998-06-14 08:46:41 +00:00
Bruce Evans
ef2e5f62e3 Document EINVAL return value. 1998-06-14 08:22:05 +00:00
Brian Somers
eee772ec70 Deal with PROTO_IGMP and PROTO_IPIP packets correctly.
Submitted by: Mark Tinguely <tinguely@plains.NoDak.edu>
  This change will allow a PPP host enabled with the "-alias" option to
  run mrouted. This does not intend to forward the IGMP nor tunneled packets
  to another host on the far side if the tun0 interface.
1998-06-14 01:21:24 +00:00
Brian Somers
42c57c8682 o Pass our negotiated number of VJ slots into
sl_uncompress_tcp() and drop packets with
  slot numbers that are out of range.
o Drop packets that want to use a slot that still
  has an IP header length of 0 (ie, the requested
  slot number is bogus again).

Without this code, if the other side mis-behaves (and
sends us garbage slot numbers), we happily ``adjust''
a memset(..., '\0', ...) TCP/IP header and promptly
cr*p all over the stack before returning.... quickly
followed by a SIGBUS.

Dodgy ISP used by, and help locating the problem from: jmz
Problem also seen by: Mourad de Riche <omnibus@image.dk>

There's still a link lockup after this happens, but my
bets are on the other side (who has already started sending
rubbish) being to blame.
1998-06-14 00:56:13 +00:00
Steve Price
396ffb2e6b Add a macro tweak.
PR:		6932
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1998-06-13 19:36:22 +00:00
Steve Price
8c0b8289ef Mention all the environment variables that can be used
to specify the device.

PR:		6927
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1998-06-13 19:28:51 +00:00
John Hay
bd39f6b61d Add doc/ja/FAQ and handbook, so that releases can build again. 1998-06-13 19:26:38 +00:00
Steve Price
a05ac887c5 Correct the description of the last four fields.
PR:		6926
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-13 19:14:14 +00:00
Steve Price
0c98528507 miserable -> miserably
PR:		6922
Submitted by:	Sue Blake <sue@welearn.com.au>
1998-06-13 19:06:49 +00:00
Steve Price
2dcf9f10d4 Minor tweaks in the AUTHORS section.
PR:		6921
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-13 18:55:55 +00:00
Steve Price
56cef66e8c Add a symlink from /dev/vga to /dev/ttyv0 when using DEVFS
for programs like doscmd.

PR:		6920
Submitted by:	Luoqi Chen <luoqi@chen.ml.org>
1998-06-13 18:53:22 +00:00
Steve Price
cd8bd612a4 Add a swissfrench keyboard mapping.
PR:		6916
Submitted by:	tamone@eig.unige.ch
1998-06-13 18:39:22 +00:00
Peter Wemm
12b77dc845 Merge changes from vendor branch;
- connector selection values (should fix aui/bnc),
- non-shifting version of crc calculation using a table,
- interrupt mask adjustments,
- add some brackets where a #ifdef could break an if(),
- don't reset the card unless it's up.
1998-06-13 17:20:03 +00:00
Peter Wemm
b9305a0668 Make -V expand it's arguments. This means that instead of 'make -V OBJS'
printing something useless (to a shell) like: ${SRCS:N*.h:R:S/$/.o/g}
it will instead print the actual ${OBJS} value.
1998-06-13 11:55:57 +00:00
Poul-Henning Kamp
938ee3ce4d Introduce std_pps_ioctl() to automagically DTRT.
Add scaling capability to timex.offset, ntpd-4.0.73 will support this.
1998-06-13 09:30:26 +00:00
Julian Elischer
9d3f194df3 Allow a protocol to specify that it does NOT want to be looped back
even if it looks like it should (backwards compatibility with
old broken code) should get rid of some annoying messags.
1998-06-13 02:27:10 +00:00
Peter Wemm
e2fea9c587 join(1) is used by lorder, add it to build-tools. (otherwise, things get
ugly when an a.out /usr/bin/join sees the elf LD_LIBRARY_PATH from a
'make world' and it's a.out ld.so tries to load the elf libc.so.)
1998-06-13 02:03:36 +00:00
Poul-Henning Kamp
389825d558 Update to draft-mogul-pps-api-02.txt as submitted to IETF 1998-06-12 23:15:53 +00:00
Julian Elischer
28ed032673 Note which version of Kirk's sources this corresponds to. 1998-06-12 21:21:26 +00:00
Julian Elischer
aa75cb86b4 Fix the case when renaming to a file that you've just created and deleted,
that had an inode that has not yet been written to disk, when the inode of the
new file is also not yet written to disk, and your old directory entry is not
yet on disk but you need to remove it and the new name exists in memory
but has been deleted but the transaction to write the deleted name to disk
exists and has not yet been cancelled by the request to delete the non
existant name.  I don't know how kirk could have missed such a glaring
problem for so long. :-) Especially since the inconsitency survived on
the disk for a whole 4 second on average before being fixed by other code.
This was not a crashing bug but just led to filesystem inconsitencies
if you crashed.

Submitted by: Kirk McKusick (mckusick@mckusick.com)
1998-06-12 20:48:30 +00:00
Brian Somers
41dbe0c7af Add the ``clear'' function.
Mostly submitted by: "Stephane E. Potvin" <sepotvin@videotron.ca>
1998-06-12 20:12:26 +00:00
Julian Elischer
6b1214b0fc Remove 3 occurances of __FUNCTION__ 1998-06-12 20:03:26 +00:00
Peter Wemm
fc882c32be Fix stupid typo, I had only tested this in elf mode. 1998-06-12 19:45:14 +00:00
Brian Somers
f56d7b337d Remove '\n' from `show throughput'. ctime() already does
a linefeed.
1998-06-12 17:45:41 +00:00
Brian Somers
87de006540 Correct arg hack
Submitted by: David Leonard <leonard@csee.uq.edu.au>
1998-06-12 17:45:26 +00:00
Brian Somers
ff0f9439b4 o Maintain a link-type mask for open datalinks as well as
for all datalinks in a bundle.  Ppp now deals correctly
  with link types that are changed while open
o When changing the type of the last AUTO link, only clear
  the interface if we're not in PHASE_NETWORK.  This allows
  us to switch to -ddial mode while we have a connection
  without suddenly unexpectedly throttling ourselves by
  clearing the interface configuration.
  Problem area noted by: Aaron Jeremias Luz <aaron@csh.rit.edu>
1998-06-12 17:45:10 +00:00
Peter Wemm
7ec6ca7ce0 Always support an elf kernel when given one. 1998-06-12 16:25:18 +00:00
Peter Wemm
ef1f75f486 #include <arpa/inet.h> 1998-06-12 16:24:13 +00:00
Peter Wemm
0cb730b0dc "./strip maybe_stripped" doesn't work too well if maybe_stripped is an
elf executable..
1998-06-12 16:22:25 +00:00
Peter Wemm
5307b90005 The doscmd build process and doscmd.kernel loader is very a.out specific
and doesn't fly too well on in an elf enviroment yet.
1998-06-12 16:18:27 +00:00
Peter Wemm
6c81492cb8 Only build rtld-aout if we're in an a.out build environment. 1998-06-12 16:09:33 +00:00
Peter Wemm
21cd354328 Understand elf library naming rules for libtermlib alias.
Don't do the libtermcap un-bump hack for anything but a.out
1998-06-12 15:57:59 +00:00