Commit Graph

130024 Commits

Author SHA1 Message Date
mycroft f3fbefe76a Minor simplification to some arithmetic. 2004-08-15 16:17:37 +00:00
mycroft 14f6fc2dfb Need to set um_dirblksiz here... 2004-08-15 16:07:08 +00:00
lukem 7a69732f67 postinstall currently does not migrate /usr/X11R6/lib/X11/* -> /etc/X11/* 2004-08-15 16:02:59 +00:00
mycroft 45a21b76f0 Fixing age old cruft:
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
  d_type fields(!), add a new internal flag, IMNT_DTYPE.

Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
  in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
  FS-specific checks littered throughout the code.  This may be used later to
  make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
  to implementation issues.

Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86

Clean up some crappy pointer frobnication.
2004-08-15 07:19:54 +00:00
dsl c68c45c975 I challenged mycroft to optimise this code - and he found a spare byte... 2004-08-14 21:03:23 +00:00
mycroft 1eb6dd26a9 Allow keypad PgUp/PgDn to scroll as well. 2004-08-14 16:42:36 +00:00
dsl 29306cabe7 Default to input in MB for all architectures (MB are cylinder aligned).
Move info about cylinders to the 'ask for units' menu.
  (translations need checking, done by cutting sentences)
Stop i386 always asking for units.
Use BIOS cylinders for MBR and disk cylinders for the disklabel.
  (code intended to do this, but got it wrong...)
Mark some menus as 'sub menu' or MC_SUBMENU so that the screen underneath
  is saved.
Add GENERIC.MPACPI to i386 menu.
2004-08-14 16:06:36 +00:00
dsl c4d2d498a2 Call doupdate() before copying out of stdscr (avoids PR 26660)
Delete a diagnostic variable.
2004-08-14 15:51:08 +00:00
uch d5dcd091d7 HCAJ1 -> HCVJ 2004-08-14 15:38:25 +00:00
dsl 43a4fc0e11 NetBSD curses gives the wrong data when you read curscr, need to
add a doupdate() so we save from the correct screen image.
2004-08-14 15:15:57 +00:00
thorpej 08fa2a3486 - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
  to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
  ata_channel.  Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
  maximum number of drives that can be present on the channel.  For now,
  this is always 2.  Add an ATA_MAXDRIVES constant that places an upper
  limit on this value, also currently 2.
2004-08-14 15:14:35 +00:00
thorpej 4b51cecfc2 - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
  to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
  ata_channel.  Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
  maximum number of drives that can be present on the channel.  For now,
  this is always 2.  Add an ATA_MAXDRIVES constant that places an upper
  limit on this value, also currently 2.
2004-08-14 15:08:04 +00:00
mycroft c09a793e93 Push atime/mtime updates even further -- into the reclaim path, so they happen
rarely in the normal case.  (Note: This happens at reboot/shutdown time because
all file systems are unmounted.)

Also, for IN_MODIFY, use IN_ACCESSED, not IN_MODIFIED; otherwise "ls -l" of
your device node or FIFO would cause the time stamps to get written too
quickly.
2004-08-14 14:32:04 +00:00
cube 224d89c7db Remove debug printf (hi mycroft!). 2004-08-14 12:53:35 +00:00
wiz 5bf3687024 Add an article. 2004-08-14 11:04:29 +00:00
jdolecek 64fbdbbf78 document timeradd() and timersub() too, as e.g. select(2) points
to getitimer(2) for timersub() description

use .Fn rather than .Fa for the macro names

bump date
2004-08-14 10:03:30 +00:00
mycroft 5d31d187f3 Partially fix a performance problem in the partial-truncate case. We were
doing synchronous writes unnecessarily in a couple of places.  Now it's 1
write per truncate in my test case rather than 3.  :-P
2004-08-14 02:26:57 +00:00
jrf ea0b6a43d0 Add -v option to usage message. 2004-08-14 02:16:13 +00:00
mycroft 14ae52970e There is no need to do a synchronous write when truncating a short symlink. 2004-08-14 01:32:02 +00:00
mycroft 9f8efecd46 In the indirect block unwind case, we only need to do the synchronous writes
of the inode in the softdep case.  XXX This is really a deficiency in softdep.
2004-08-14 01:30:56 +00:00
mycroft bc25b30608 Add a new flag, IN_MODIFY. This is like IN_UPDATE|IN_CHANGE, but unlike
setting those flags, it does not cause the inode to be written in the periodic
sync.  This is used for writes to special files (devices and named pipes) and
FIFOs.

Do not preemptively sync updates to access times and modification times.  They
are now updated in the inode only opportunistically, or when the file or device
is closed.  (Really, it should be delayed beyond close, but this is enough to
help substantially with device nodes.)

And the most amusing part:
Trickle sync was broken on both FFS and ext2fs, in different ways.  In FFS, the
periodic call to VFS_SYNC(MNT_LAZY) was still causing all file data to be
synced.  In ext2fs, it was causing the metadata to *not* be synced.  We now
only call VOP_UPDATE() on the node if we're doing MNT_LAZY.  I've confirmed
that we do in fact trickle correctly now.
2004-08-14 01:08:02 +00:00
mycroft 81e93c0081 Add a new flag, UPDATE_CLOSE, to be used internally by file systems. 2004-08-13 23:15:39 +00:00
mycroft fbf03babff There is an annoying deadlock that goes like this:
* Process A is closing one file descriptor belonging to a device.  In doing so,
  ffs_update() is called and starts writing a block synchronously.  (Note: This
  leaves the vnode locked.  It also has other instances -- stdin, et al -- of
  the same device open, so v_usecount is definitely non-zero.)
* Process B does a revoke() on the device.  The revoke() has to wait for the
  vnode to be unlocked because ffs_update() is still in progress.
* Process C tries to open() the device.  It wedges in checkalias() repeatedly
  calling vget() because it returns EBUSY immediately.

To fix, this:
* checkalias() now uses LK_SLEEPFAIL rather than LK_NOWAIT.  Therefore it will
  wait for the vnode to become unlocked, but it will recheck that it is on the
  hash list, in case it was in the process of being revoke()d or was revoke()d
  again before we were woken up.
* Since we're relying on the vnode lock to tell us that the vnode hasn't been
  removed from the hash list *anyway*, I have moved the code to remove it into
  the DOCLOSE section of vclean(), inside the vnode lock.

In the example at hand, process A was sh(1), process B was a child of init(8),
and process C was syslogd(8).
2004-08-13 22:48:06 +00:00
jdolecek 8ac2263519 constify 2004-08-13 21:45:03 +00:00
jdolecek 42d15fca03 on Linux, unlink() fails with EISDIR if the target is directory,
rather than EPERM; to emulate this properly, translate the error to EISDIR
if the target patch exists and points to a directory

this fixes the 'ant clean' problem reported by Marc Recht on current-users@
with SuSE 9.1 libraries
2004-08-13 21:27:32 +00:00
dsl 13a7bd52d8 Save and restore screen underneath prompt boxes 2004-08-13 18:26:52 +00:00
mycroft 7d2e1537c5 Add an _rc_subr_loaded variable, set to ":" by rc.subr. Scripts can use this
for a speedup by doing:
$_rc_subr_loaded . /etc/rc.subr
2004-08-13 18:08:03 +00:00
mycroft e0fc84bd24 Put back one of the sleep()s -- it doesn't affect us in the usual case. 2004-08-13 17:22:39 +00:00
mycroft f3b5a6849c Replace the sleep(2) in setctty() with a nanosleep(), with a default value of
250ms.
2004-08-13 17:19:15 +00:00
mycroft 40321c3f44 Remove a completely gratuitous 30 delay if you enter the wrong shell path. 2004-08-13 17:11:49 +00:00
uch 579420e43b use HCAJ, HCVJ group instead of HCAJ1, HCVJ1C_JP 2004-08-13 15:55:14 +00:00
uch 9d15e929e7 recompile. 2004-08-13 15:52:28 +00:00
uch 5adb2fdc5d add WCE101 and WCE200 binary install target. 2004-08-13 15:51:45 +00:00
uch 986311dca4 add SH7707 2004-08-13 15:50:09 +00:00
uch e659dc81a4 fix debug print. 2004-08-13 15:49:37 +00:00
uch abe2d7cbc7 regen. 2004-08-13 15:49:13 +00:00
uch 7ee4f55250 add SH7707 and HP360LX. add HCAJ and HCVJ group for Sharp Telios 2004-08-13 15:48:51 +00:00
uch 643a469d36 set user specified console as default. 2004-08-13 15:48:21 +00:00
uch 00539717e3 add debug print. 2004-08-13 15:47:53 +00:00
simonb 384a2881c7 Fix a couple of niggles:
. Incorrect name in the kernel config ident lines.
. Call the commented out NetBSD 0.9 binary compat option "COMPAT_09" and
    not "COMPAT_10"(!).
2004-08-13 15:42:02 +00:00
wiz a5c8081d79 Bump date for previous, and re-add some flags that were removed in the
previous commit without a mention in the commit message, and which are
still in the usage.
2004-08-13 15:24:03 +00:00
tv 21840e450a Add "urandomkey" key generation method as described in PR kern/22766;
useful for configuring a throwaway key for cgd-on-swap at boot time.
2004-08-13 15:03:57 +00:00
wiz e682d869e8 Bump date for previous. 2004-08-13 13:45:53 +00:00
wiz bf78254603 Sort options, add -K to usage. 2004-08-13 13:45:46 +00:00
wiz 25ac688cb9 Bump date for new -q. 2004-08-13 13:38:14 +00:00
wiz 8a623e1980 Sort options in SYNOPSIS. 2004-08-13 13:37:14 +00:00
wiz 6579bae669 Add all options to usage. 2004-08-13 13:37:04 +00:00
agc 938f9f0f4f Modify pkg_info so that it will only print information on uninstalled
binary packages in the current working directory if -. is given on the
command line. If no -. is given, pkg_info will look for its information
in the ${PKG_DBDIR}.

This addresses a long-held gripe on the part of a number of people,
including myself, which completely violated the POLS.

Bump version for this and previous pkg_admin modification.
2004-08-13 13:34:42 +00:00
agc 50a555ad6a Add a -q switch to pkg_admin, which allows it to work in a quiet manner.
Fixes the change request in PR 26583, but in a different manner,
preserving existing behaviour and making the new behaviour dependent
upon a command line option.
2004-08-13 13:28:46 +00:00
tsutsui d91b03bd13 Use bus_space(9) on news68k.
Update/sort the comment/ifdefs about bus_space-using ports.

XXX which should we use defined(__${MACHINE_CPU}__) or defined(${MACHINE})?
2004-08-13 12:59:20 +00:00