Commit graph

10882 commits

Author SHA1 Message Date
Julian Elischer c619155f0e Slight change to directory cleanup
Makes soft updates a bit cleaner. Eliminates some warnings about
'corrupted directories' from fsck.
1998-06-14 19:31:28 +00:00
Julian Elischer 8e6a14825c Horrible hack to allow newfs to work again in SLICE kernels.
Real fix in the making but requires editing 60+ files. (every damn driver)
1998-06-14 19:00:12 +00:00
Doug Rabson 7066d59cef Oops, wrong file again. 1998-06-14 17:35:55 +00:00
Justin T. Gibbs 994fe7649c Add support for the Storage Dimensions SDC3222F.
PR: 6261
Submitted by: "Matthew N. Dodd" <winter@jurai.net>
1998-06-14 16:41:57 +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
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
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
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 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
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
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
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
Julian Elischer 6b1214b0fc Remove 3 occurances of __FUNCTION__ 1998-06-12 20:03:26 +00:00
David Greenman f4fabec6b0 Increased MAXTSIZ to 128MB...there are binaries that get quite large.
Increased DFLDSIZ to 128MB, as it is a better default.
Reviewed by:	jkh
1998-06-12 09:10:22 +00:00
Julian Elischer ed7509ace4 Go through the loopback code with a broom..
Remove lots'o'hacks.
looutput is now static.

Other callers who want to use loopback to allow shortcutting
should call the special entrypoint for this, if_simloop(), which is
specifically designed for this purpose. Using looutput for this purpose
was problematic, particularly with bpf and trying to keep track
of whether one should be using the charateristics of the loopback interface
or the interface (e.g. if_ethersubr.c) that was requesting the loopback.
There was a whole class of errors due to this mis-use each of which had
hacks to cover them up.

Consists largly of hack removal :-)
1998-06-12 03:48:19 +00:00
Julian Elischer 0cab75363d include opt_ipdivert.h so we get correct options 1998-06-12 02:48:47 +00:00
Julian Elischer bab04eb816 Allow diverted packets from the transmit side to remember if they
had a recv interface and allow that state to be available
after re-injection for further tests.
1998-06-12 01:54:29 +00:00
Julian Elischer 6d0ba44288 Add B_NOCACHE to several cases where BSD4.4 only required a B_INVAL.
Change worked out by john and kirk in consort.
1998-06-11 17:44:32 +00:00
Doug Rabson c48c13cb5a Reimplement spl*() as function calls. Implement software interrupts. 1998-06-11 11:51:27 +00:00
Doug Rabson 3900ddb2dc Only build this on i386 for now. I may use it for the alpha later but
currently it doesn't compile.
1998-06-11 07:23:59 +00:00
Doug Rabson bcb4edfc14 Add missing Id keywords. 1998-06-11 07:15:55 +00:00
Julian Elischer 32f5d4d843 Replace 'sleep()' with 'tsleep()'
Accidentally imported from Kirk's codebase.

Pointed out by: various.
1998-06-10 22:02:14 +00:00
Doug Rabson 9d8b200937 Make these files compile. 1998-06-10 21:21:31 +00:00
Doug Rabson 71cf4ef7be Add my own copyright to this file. In this case not even the comments
resemble the NetBSD source so the NetBSD copyright has been removed.
1998-06-10 20:48:03 +00:00
Julian Elischer 8c221701c3 Fix for "live inode" panic.
Submitted by: Kirk McKusick <mckusick@McKusick.COM>
Reviewed by: yeah right...
1998-06-10 20:45:46 +00:00
Doug Rabson 10bd78e08d Add my own copyright to this file. The only remnants of NetBSD code here
are in the comments.  As such the NetBSD copyright is included to protect
the valuable intellectual copyright included in those comments.
1998-06-10 20:40:59 +00:00
Doug Rabson ecf6bca146 Add yet another copyright. If some CVS wizard feels like nuking the versions
that so offend Jason Thorpe then they can.
1998-06-10 20:35:10 +00:00
Doug Rabson 64f14464e5 Fix mangled Id keyword. 1998-06-10 20:13:32 +00:00
Doug Rabson f7491b1657 Add Id keyword. 1998-06-10 20:11:16 +00:00
Julian Elischer 4af0bb0f9e Remove buggy debugging code. 1998-06-10 20:03:16 +00:00
Doug Rabson 5c09fbfe64 Add missing copyrights. Thanks to Jason Thorpe for politely noting the
mistake...
1998-06-10 19:59:41 +00:00
Alexander Langer 6ead682113 ENOPNOTSUPP --> EOPNOTSUPP
PR:		6906
Submitted by:	Steven G. Kargl <kargl@troutmask.apl.washington.edu>
1998-06-10 19:56:06 +00:00
Julian Elischer 939001af5c Back out John's changes 1.45 -> 1.46
Kirk confirms that the original semantic was what he wanted...
(well, a very slight difference)
May fix "dangling deps" panic with soft updates.
1998-06-10 19:27:56 +00:00
Julian Elischer 28913ebe4e Submitted by: Kirk McKusick <mckusick@McKusick.COM>
Fix for potential hang when trying to reboot the system or
to forcibly unmount a soft update enabled filesystem.
FreeBSD already handled the reboot case differently, this is however a better
fix.
1998-06-10 18:13:19 +00:00
Doug Rabson dd08c7e27d I accidentally committed the wrong file, sorry. 1998-06-10 17:54:37 +00:00
Dmitrij Tejblum 40b0939a15 Back out previous change. This behavior is at least completely
"susv2"-compliant.
1998-06-10 13:46:46 +00:00