Commit Graph

52 Commits

Author SHA1 Message Date
augustss
94b815050e Add powerhooks, i.e., the ability to register a function that will be
called when the machine does a suspend or resume.
XXX Will go away when Jason's kevents come to life.
1999-06-26 08:25:25 +00:00
thorpej
d76e7b8c6d Don't pass a nam2blk around at all; just have setroot() and friends reference
dev_name2blk[] directly.  Addresses PR #7622 (ITOH Yasufumi), although
in a different way.
1999-06-07 20:16:08 +00:00
lukem
5e76cbddfb in humanize_number(), when printing a u_int64_t, use '%qu' (unsigned long long)
instead of '%qd' (long long)
1999-06-02 05:53:56 +00:00
lukem
03b1725220 rework format_bytes() into a more generic humanize_number().
implement the former with the latter.
1999-05-20 05:58:19 +00:00
lukem
719cd63d24 Implement format_bytes(), which pretty prints a given u_int64_t into a
given buffer, and if necessary, reducing the display width of the
number to fit in the buffer by increasing the units (from kilobytes
(2^10) through to exabytes (2^60)).
1999-05-09 13:48:44 +00:00
mrg
48c12bfeed revert previous. oops. 1999-04-21 02:37:07 +00:00
mrg
58540a2274 properly test the msgsz as "msgsz - len". from PR#7386 1999-04-21 02:31:49 +00:00
mrg
d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
kleink
f69591d12d Use of casts as lvalues is a GNU C extension; rearrange slightly. 1999-02-10 17:03:26 +00:00
jonathan
c9d036d796 defopt MEMORY_DISK_{HOOKS,SERVER,IS_ROOT}. 1999-02-07 09:34:58 +00:00
chs
5819a5d0f4 fix an off-by-one space-waster in hashinit() and add some description. 1999-01-22 07:57:13 +00:00
perry
275d1554aa Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)
1998-08-04 04:03:10 +00:00
perry
730baa7431 fix sizeofs so they comply with the KNF style guide. yes, it is pedantic. 1998-07-31 22:50:48 +00:00
kleink
fe2d01988e Fix some arithmetics lossage on typeless pointers. 1998-05-08 18:18:55 +00:00
fvdl
e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
hannken
1bb761e96f Didn't compile with option MEMORY_DISK_HOOKS. 1998-02-22 12:53:53 +00:00
thorpej
c7a0984b02 vfssw[] is gone; use vfs_list instead. 1998-02-18 07:11:46 +00:00
tls
561bc2f4ad Remove rounding-down of hash size in hashinit(); support non &hashmask hash functions such as % [prime number] without bletcherous hacks. 1998-02-13 17:36:41 +00:00
mrg
d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00
chs
f64abc7b4c add flags arg to hashinit(), to pass to malloc(). 1998-02-07 02:44:44 +00:00
mrg
1a8c7604f4 initial import of the new virtual memory system, UVM, into -current.
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)
1998-02-05 07:59:28 +00:00
thorpej
176a81b2c5 Copyright assigned to The NetBSD Foundation. 1997-10-05 18:37:01 +00:00
thorpej
27e54e6dc3 Prevent an extra newline from being printed if the root device is a network
interface.
1997-09-13 07:38:25 +00:00
drochner
c6567d9100 eliminate unused variable warnings
closes PR kern/3946 by Erik Bertelsen
1997-08-06 16:57:33 +00:00
leo
d37dfbd5c2 Allow for more than one md-device. 1997-08-03 20:36:03 +00:00
thorpej
3fc5bf341d Fix a slight botch in dumpdev configuration logic in the RB_ASKNAME
case if a network interface is selected as the root device.
1997-06-16 00:25:05 +00:00
thorpej
91f7efbaf9 Fix crash dump device selection after the recent swap changes:
- If RB_ASKNAME, prompt for the dump device, defaulting to
  partition 'b' of the root device, if the root device is a disk.
- Else, if dumpspec is set to "none", do not configure a dump device.
- Else, if dumpspec is set by config(8), attempt to use that device.
- Else, dumpspec is wildcarded or unspecified; if the root device is
  a disk, select partition b.  (which was the previous default dump
  partition)

Note, dumps to a local disk now work even if root is on nfs.
1997-06-14 04:17:32 +00:00
mrg
295af85e9e remove swap configuration. 1997-06-12 17:12:17 +00:00
thorpej
5b2dc97efd Move the test for "no rootspec and no bootdv" to after we've had a chance
to set rootspec in the case of "root on ? type nfs" and no bootdv was
found.  From maximum entropy <entropy@tanstaafl.bernstein.com>, PR #3669.
1997-05-25 19:20:30 +00:00
gwr
37b247edde Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/ 1997-03-26 22:42:13 +00:00
leo
3052dff85d Only make the memory-disk device the default root device when
MEMORY_DISK_IS_ROOT is defined.
1997-02-24 12:20:47 +00:00
ragge
b2d40fd746 Fix bug that caused crash when root device was specified as 'ra0*'. 1997-02-12 19:27:08 +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
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
cgd
3340f02c2b fix two problems with shutdown hook code:
(1) after removing a shutdown hook (in shutdownhook_disestablish()),
    free it.  We created it, we have to free it.  Without this,
    shutdownhook_disestablish() leaks memory.
(2) in doshutdownhooks(), before running each hook, remove it from the
    shutdown hook list.  This makes sure that every hook is tried once
    (because doshutdownhooks() is called from before rebooting, and
    a fault in a shutdown hook will cause doshutdownhooks() to be called
    again), but prevents the hooks from potentially being run infinitely
    (as used to be possible, in the above-mentioned situation).
1996-11-24 00:42:31 +00:00
christos
ee3d88fbdf fix uiomove's first argument and remove unnecessary casts 1996-10-13 02:27:52 +00:00
ragge
62b2afac2d Removed a function that were #ifdef vax'ed. 1996-04-09 17:21:56 +00:00
cgd
4a04bbaa09 add a facility by which to register 'hooks' to be run at shutdown time. 1995-05-31 20:41:44 +00:00
mycroft
c43614be17 Remove UIO_USERISPACE. 1995-02-08 15:06:48 +00:00
cgd
cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
mycroft
ee7565c0b3 Some nits. 1994-05-18 12:46:29 +00:00
cgd
3ece2ea12e update from lite. delete obsolete (wfj) function, add hashinit() 1994-05-18 10:21:18 +00:00
cgd
91cf0fbaf3 copyright foo 1994-05-17 04:21:49 +00:00
pk
96fc0a6188 Check `uio_resid' separately (and panic if invalid). 1994-02-16 17:34:01 +00:00
mycroft
21edb9924e Canonicalize all #includes. 1993-12-18 03:59:02 +00:00
jtc
070f4a7f50 Removed functions moved to libkern: strcpy, strcmp, strlen, ffs, etc. 1993-09-11 00:08:03 +00:00
andrew
0e6cb953ea ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.
1993-06-27 06:01:27 +00:00
cgd
dccfb7e206 make strcpy "normal" and get rid of extra (random) spacing... 1993-06-02 23:47:23 +00:00
cgd
230dcf0d05 add $Id$ strings, and clean up file headers where necessary 1993-05-20 02:54:09 +00:00