Commit Graph

1141 Commits

Author SHA1 Message Date
gwr d372229de2 This little awk program translates the initialized data table found
in the assembly file genassym.s into the usual assym.h file.  The
assym.h file generated this way is identical to the output generated
if I simply compile and run the genassym.s file.  "Heh, Kewl!"
Thanks to Matthias Pfaller for the "translate the .s file" idea!
1997-02-03 21:31:17 +00:00
thorpej 7b30910b48 KMEMSTATS is a header option; pull in "opt_kmemstats.h". 1997-02-02 21:22:16 +00:00
thorpej 6dc3c24a7c Add missing \n in printf format for "cannot mount root" error message.
Pointed out by cgd@netbsd.org
1997-02-02 02:55:06 +00:00
cgd 3d3f4afbea use cnpollc() appropriately in getstr() 1997-02-01 02:28:48 +00:00
cgd 1a0b411d75 list 'a'+MAXPARTITONS-1, rather than just 'a'+MAXPARTITIONS, as last partition 1997-02-01 00:39:14 +00:00
pk 1cdfe6e18c Simplify a bit by using `next' statements, eliminating the `matched' variable.
Also, ignore lines with just whitespace, instead of reporting a syntax error.
1997-01-31 21:56:28 +00:00
pk d4e0e6e7a3 - remove two debugging (apparently) lines.
- generate a `return(0)' at the end of the generated `int main()'.
- append a newline when printing the rest of a `^quote[ ]+' line.
1997-01-31 21:38:16 +00:00
thorpej 2ca27c5550 Garbage-collect "argdev". 1997-01-31 19:10:27 +00:00
cgd 6384f7c322 fix check_console() changes:
* prototype it before it is used (several ports compile with
  -Wstrict-prototypes -Wmissing-prototypes), so this is _necessary_.
* conform to C syntax (yes, that's right, it wouldn't parse).
* make error check less error-prone, + style fixups.
1997-01-31 05:25:24 +00:00
thorpej 68de7ca719 - Implement vfs_mountroot(). This function is called my main() to
mount the root file system.  If the operator specified the root
  file system type in the kernel configuration file, attempt to
  mount that file system type on the root device.  If the root
  file system type was wildcarded (or unspecified), try all of
  the file systems statically built into the kernel until one
  succeeds.  If no file systems succeed, return an error.  The
  system will recover from this condition.
- Implement vfs_getopsbyname().  This function returns the file
  system ops vector given a file system name.
1997-01-31 02:50:36 +00:00
thorpej e101942fa0 NFSCLIENT -> NFS 1997-01-31 02:36:24 +00:00
thorpej 1005d16030 Syscalls.master changed, regen. (NFSCLIENT -> NFS) 1997-01-31 02:35:52 +00:00
thorpej 55ee7ceeb8 NFSCLIENT -> NFS 1997-01-31 02:34:23 +00:00
thorpej ec15ba06cb Add a sysctl node "kern.root_device", which contains the external
name of the device that root was mounted on (e.g. "sd0").
1997-01-31 02:33:59 +00:00
thorpej 0408b501ce - Implement a new machine-independent setroot() function, mostly derived
from the version used by NetBSD/alpha, with several changes by me.
  Support for asking for root device and root file system type on any
  kernel, obsoleting "options GENERIC".
- Make my mountroothook implementation used by the sparc and x68k
  ports machine-independent, and use it here.  Mountroothooks allow
  devices to execute special functions before being mounted as the
  root device (such as ejecting the floppy and prompting for a new
  floppy disk).
- Make swapconf() machine-independent.  It was identical on all ports.
1997-01-31 02:31:33 +00:00
thorpej 883ccf99b6 - NFSCLIENT -> NFS
- Run mountroot hooks before we attempt to mount the root device, and
  destroy mountroot hooks after the root file system has been sucessfully
  mounted.
- Don't panic if we can't mount root.  Instead, set RB_ASKNAME and
  call setroot(), which will prompt the operator for the root device
  and file system type.
1997-01-31 02:25:47 +00:00
mouse b5657b655d Oops, forgot the #include. 1997-01-31 00:50:38 +00:00
mouse f2e82f1145 Apply the interim fix from PR 2236, reformatted and a comment added.
Not a real fix, but it should help until we get a real fix done.
1997-01-31 00:47:12 +00:00
tls af543e23ae remove ability to mangle namei cache 1997-01-30 10:29:24 +00:00
matthias 1370131ffd Add scripts and documentation for a new method to create assym.h files.
With the kern/genassym.sh script HOSTED_CC is no longer used to create
assym.h files. This should make crosscompilation easier.
1997-01-30 09:37:20 +00:00
tls e9a5b29d40 add #ifdef KMEMSTATS around variable otherwise unused; now compiles with KMEMSTATS turned off. 1997-01-30 06:50:46 +00:00
mikel d59edbdc1c regen 1997-01-22 06:54:31 +00:00
mikel bd71be635d add multiple inclusion protection to generated header 1997-01-22 06:51:59 +00:00
cgd 008f5aedf9 apply patch from PR 2788 (from Dennis Ferguson <dennis@jnx.com>) to
more smoothly apply "tickfix"es microsecond deltas (when compensating
for clocks running at > 1000Hz).
1997-01-15 04:59:39 +00:00
cgd 99fb250b5c fix from PR 2787 (from Dennis Ferguson <dennis@jnx.com>): when adjtime
is running (and NTP is not enabled), the adjtime()-handling code clobbers
any tickfix that may be necessary for systems with clocks with frequency
greater than 1000Hz.
1997-01-15 04:27:35 +00:00
perry b89a3425b7 Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
1997-01-15 01:28:28 +00:00
thorpej f1c90f5e13 Implement sbcreatecontrol(), a generic function to create a "control"
mbuf for presentation on a socket buffer.
1997-01-11 05:16:46 +00:00
thorpej 62dcdcfb89 Implement SO_TIMESTAMP socket option: receive a timeval timestamp
as a control message with a datagram.
1997-01-11 05:15:01 +00:00
thorpej 1dc6efd7e6 Only call Debugger() on panic if "db_onpanic" is set. 1997-01-09 05:38:22 +00:00
thorpej 8404eae1ea Grok CTL_DDB. 1997-01-09 05:37:41 +00:00
mrg 7de1b7c8eb only set P_SUGID once. 1997-01-07 10:41:02 +00:00
cgd e7af2a8237 * catch up with system call argument type fixups/const poisoning.
* Fix arguments to various copyin()/copyout() invocations, to avoid
  gratuitous casts.
* Some KNF formatting fixes
1996-12-22 10:21:06 +00:00
cgd c60b7587ab * catch up with system call argument type fixups/const poisoning.
* Fix arguments to various copyin()/copyout() invocations, to avoid
  gratuitous casts.
* Some KNF formatting fixes
* Change sockargs()'s second argument to be a const void *, to help
  with dealing with the syscall argument type fixups/const poisoning.
1996-12-22 10:16:54 +00:00
cgd 7e31391b10 update for new syscalls.master 1996-12-22 08:05:47 +00:00
cgd acad90d846 * (slight) general cleanup
* change in-kernel syscall prototypes to match user-land prototypes in
  the following ways:
    + add 'const' where appropriate.
    + make the following "safe" type changes where appropriate:
	caddr_t -> struct msghdr *
	caddr_t -> struct sockaddr *
	caddr_t -> void *
	char * -> void *
	int -> uid_t (safe because uid_t not used as index/count)
	int -> gid_t (safe because gid_t not used as index/count)
	u_int -> size_t
    + change "int" to "u_long" in flags arguments to chflags() and
      fchflags().  This is safe because the arguments are used as
      flag bits and there's nothing that would cause the top bit
      of the int to be set yet, and because the user-land definitions
      already specified u_long, so a u_long's worth of argument was
      already being passed in.
1996-12-22 08:04:06 +00:00
cgd 997ec138ad change ntp_gettime's struct ntptimeval *'s name to match kern_ntptime.c 1996-12-22 07:47:43 +00:00
cgd c99936a735 * fix return types. previously, most things returned 'int.' which was
wrong for a bunch of functions:
	void:		sys_exit, sys_sync
	ssize_t:	sys_read, sys_write, sys_recvmsg, sys_sendmsg,
			sys_recvfrom, sys_readv, sys_writev, sys_sendto
	long:		sys_pathconf, sys_fpathconf
	void *:		sys_shmat

* Note that sys_open, sys_ioctl, and sys_fcntl are defined such that their
  last argument is optional.

These changes should not have any real effect, because right now this
information is not actually used for anything.
1996-12-22 07:00:57 +00:00
cgd 8fac03afc3 regen for syscalls.master and makesyscalls.sh changes 1996-12-22 06:48:18 +00:00
cgd 747448fc3e mark syscall() and __syscall() as INDIR syscalls 1996-12-22 06:46:50 +00:00
cgd 0e9ddb9039 * Don't actually output args structure definitions for INDIR syscalls (typo).
* Don't output prototypes for INDIR syscalls (since they always show up as
  sys_nosys() in the syscall table).
* Add "indir" to the comment for INDIR syscalls in the syscalls table, so
  it's more obvious why they call sys_nosys().
1996-12-22 06:45:14 +00:00
cgd ba32ea9a68 update copyright date 1996-12-22 06:33:46 +00:00
cgd 286395d1b3 * remember (i.e. don't throw away) system call return types.
* Deal with multi-word system call return types (i.e. foo *, or
  struct foo *, or struct foo, etc.).
* Add a new class of system calls "INDIR" (for "indirect"), which
  is to be used to represent indirect syscalls like syscall() and
  __syscall() which are implemented in MD code and which don't want
  args structures defined.  (The old way of declaring this type of
  syscalls still works.)
* Allow system calls to be marked as having a variable number of
  arguments, by inserting "..." (no trailing comma) before the
  first hf the optional arguments in the syscall definition.  Because
  of the way syscall arguments are handled by MI code, _ALL_ syscall
  arguments must actually be included in the definition, i.e.
  "optional" arguments are either "are there or aren't," i.e. these
  aren't really varargs functions.  Therefore, for normal syscalls,
  there _must_ be arguments listed after the "...".  For INDIR
  syscalls, which really do have a variable number of arguments and
  which aren't handled via the normal mechanism, that requirement is
  not in force.
* output primitive (machine-parsable) syscall descriptions as comments
  in <sys/syscall.h>.  These can be used to easily build real function
  prototypes, or to build stub functions for use by lint.
1996-12-22 06:33:16 +00:00
cgd e9a07759c9 ntp_gettime()'s argument is a struct ntptimeval *, not a struct timex * 1996-12-22 06:23:38 +00:00
gwr 6dba055937 Move `static' to the beginning of the storage class specifiers. 1996-12-18 20:24:50 +00:00
gwr e2c836939b As discussed, replace KERNBASE with kernel_text. 1996-12-18 20:12:58 +00:00
cgd 60faf5d2ae always provide at least a minimal aux vector. (The minimal version
is one entry long, with the entry's id being AUX_null.)
1996-12-17 22:04:20 +00:00
thorpej 2ac210b6e3 Call device_register() if __alpha__ || hp300 1996-12-17 08:59:15 +00:00
thorpej 8606b2f1d3 In sbreserve(), don't allow a count of 0. Fixes PR #2794, from
Erik Berls <cyber@dis.org>.
1996-12-09 23:50:57 +00:00
thorpej ff392f324b Back out this piece of revision 1.3:
>- Optional systems calls are "UNIMPL" if the support is not being
>  compiled into the kernel.

It had implications that didn't occurr to me at the time.  *sigh*
1996-12-06 20:10:51 +00:00
thorpej 5c4caca2d5 syscalls.master changed; regen. 1996-12-06 20:06:35 +00:00