]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoAdd recv(2), recvfrom(2), send(2) and sendfrom(2).
Dag-Erling Smørgrav [Tue, 5 Aug 2003 10:45:06 +0000 (10:45 +0000)]
Add recv(2), recvfrom(2), send(2) and sendfrom(2).

21 years agoClarify that the 'state' information consists of characters, not
Christian Brueffer [Tue, 5 Aug 2003 10:31:28 +0000 (10:31 +0000)]
Clarify that the 'state' information consists of characters, not
only letters (e.g. IWs+)

PR: 55221
Submitted by: Rich Morin <rdm@cfcl.com>
MFC after: 3 days

21 years agoAdded description for the libufs(3) library.
Ruslan Ermilov [Tue, 5 Aug 2003 10:29:50 +0000 (10:29 +0000)]
Added description for the libufs(3) library.

PR: 55238
Reviewed by: jmallett

21 years agoMake this WARNS=6 clean by:
Johan Karlsson [Tue, 5 Aug 2003 09:19:07 +0000 (09:19 +0000)]
Make this WARNS=6 clean by:
 1: add 'const' to char * where needed;
 2: mark unused variables with __unused;
 3: remove double prototypes for mode_edit and mode_list.
 4: moves the global variables 'bus', 'target', and 'lun' into
        the main function and protect them with #ifndef MINIMALISTIC,
 5: renames 3 variable in order not to shadow other things
        index -> indx -- in modepage_dump since index is a function
from <strings.h.>
        arglist -> arglst -- in the function parse_btl since arglist
                is also a global variable
        convertend -> convertend2 -- in the function editentry_set
                since that name is used two times within the function.
 6: cast 0xffffffff in the macro RESOLUTION_MAX(size) to (int)
        since it is unsigned otherwise.

Tested by: make universe
Approved by: ken

21 years agoUpdate screen(1)-related entries with more recent variants
Andrey A. Chernov [Tue, 5 Aug 2003 08:06:38 +0000 (08:06 +0000)]
Update screen(1)-related entries with more recent variants

PR:             55146
Submitted by:   Juha-Matti Tilli <juhis@nallukka.net>

21 years agoBack out [:upper:] and [:lower:] classes sorting, it is not required
Andrey A. Chernov [Tue, 5 Aug 2003 07:59:46 +0000 (07:59 +0000)]
Back out [:upper:] and [:lower:] classes sorting, it is not required
by POSIX and gains nothing with current code.

21 years agoClarify upper/lower conversion description more.
Andrey A. Chernov [Tue, 5 Aug 2003 07:53:28 +0000 (07:53 +0000)]
Clarify upper/lower conversion description more.

21 years agoChange gcc-specific aggregate initialization member specifiers
Diomidis Spinellis [Tue, 5 Aug 2003 07:23:35 +0000 (07:23 +0000)]
Change gcc-specific aggregate initialization member specifiers
into C9X initializer designators.

Reviewed by: schweikh (mentor)
MFC after: 4 weeks

21 years agoRemove extraneous semicolons. They are already provided by
Diomidis Spinellis [Tue, 5 Aug 2003 07:22:12 +0000 (07:22 +0000)]
Remove extraneous semicolons.  They are already provided by
the macro definition, and cause the generation of syntactically
incorrect code that gcc happens to accept.

Reviewed by: schweikh (mentor)
MFC after: 4 weeks

21 years agoadd support for using kqueue to watch bpf sockets.
John-Mark Gurney [Tue, 5 Aug 2003 07:12:49 +0000 (07:12 +0000)]
add support for using kqueue to watch bpf sockets.

Submitted by: Brian Buchanan of nCircle, Inc.
Tested on: i386 and sparc64

21 years agoUse sparse struct initialization for struct pagerops.
Poul-Henning Kamp [Tue, 5 Aug 2003 06:54:56 +0000 (06:54 +0000)]
Use sparse struct initialization for struct pagerops.

Mark our buffers B_KEEPGIANT before sending them downstream.

Remove swap_pager_strategy implementation.

21 years agoChange the implementation of swap backing to use the VM system in normal
Poul-Henning Kamp [Tue, 5 Aug 2003 06:54:44 +0000 (06:54 +0000)]
Change the implementation of swap backing to use the VM system in normal
ways, and drop the need for vm_pager_strategy().

21 years agoUse sparse struct initializations for struct pagerops.
Poul-Henning Kamp [Tue, 5 Aug 2003 06:51:26 +0000 (06:51 +0000)]
Use sparse struct initializations for struct pagerops.

This makes grepping for which pagers implement which methods easier.

21 years agoRemove redundant declarations.
David Schultz [Tue, 5 Aug 2003 06:50:28 +0000 (06:50 +0000)]
Remove redundant declarations.

21 years agoDon't overflow the block quota calculations for NFS mounts.
David Schultz [Tue, 5 Aug 2003 06:47:49 +0000 (06:47 +0000)]
Don't overflow the block quota calculations for NFS mounts.

PR: 47607
Submitted by: Eric van Gyzen <vangyzen@stat.duke.edu>

21 years agoOnly drop Giant around the drivers ->d_strategy() if the buffer is not
Poul-Henning Kamp [Tue, 5 Aug 2003 06:43:56 +0000 (06:43 +0000)]
Only drop Giant around the drivers ->d_strategy() if the buffer is not
marked to prevent this.

21 years agoAdd a B_KEEPGIANT flag so non-SMPng code can get preferential treatment.
Poul-Henning Kamp [Tue, 5 Aug 2003 06:43:12 +0000 (06:43 +0000)]
Add a B_KEEPGIANT flag so non-SMPng code can get preferential treatment.

21 years agoDIGIT can be only 0-9 according to POSIX
Andrey A. Chernov [Tue, 5 Aug 2003 06:34:16 +0000 (06:34 +0000)]
DIGIT can be only 0-9 according to POSIX

21 years agoExplain better what happens when [:lower:] <-> [:upper:]
Andrey A. Chernov [Tue, 5 Aug 2003 06:00:00 +0000 (06:00 +0000)]
Explain better what happens when [:lower:] <-> [:upper:]

21 years agoSupport for the Amharic locale.
Mike Makonnen [Tue, 5 Aug 2003 05:42:08 +0000 (05:42 +0000)]
Support for the Amharic locale.

21 years agoBack out LC_ALL=C since tr here supposed to run under clean env -i
Andrey A. Chernov [Tue, 5 Aug 2003 05:35:56 +0000 (05:35 +0000)]
Back out LC_ALL=C since tr here supposed to run under clean env -i
environment always.

Pointed by:     ru

21 years ago- Use /dev/fwX.Y rather than /dev/fwX.
Hidetoshi Shimokawa [Tue, 5 Aug 2003 03:26:14 +0000 (03:26 +0000)]
- Use /dev/fwX.Y rather than /dev/fwX.
- Add option -u to specify bus number.
- Try to open the device only if it's necessary.

21 years agoChange device name.
Hidetoshi Shimokawa [Tue, 5 Aug 2003 03:13:14 +0000 (03:13 +0000)]
Change device name.

21 years agoChange device name notation.
Hidetoshi Shimokawa [Tue, 5 Aug 2003 03:11:39 +0000 (03:11 +0000)]
Change device name notation.
- /dev/fw{,mem}X.Y represents the Y'th unit on the X'th bus.
- /dev/fw{,mem}X is an alias of fw{,mem}X.0 for compatibility.
- Clone devices.

21 years agoEnable IFCAP_VLAN_MTU and increase MTU for it.
Hidetoshi Shimokawa [Tue, 5 Aug 2003 02:34:35 +0000 (02:34 +0000)]
Enable IFCAP_VLAN_MTU and increase MTU for it.

Reviewed by: wpaul

21 years agoMake the second argument to sooptcopyout() constant in order to
Jeffrey Hsu [Tue, 5 Aug 2003 00:27:54 +0000 (00:27 +0000)]
Make the second argument to sooptcopyout() constant in order to
simplify the upcoming PIM patches.

Submitted by:   Pavlin Radoslavov <pavlin@icir.org>

21 years agoIn the mknod(), mkfifo(), link(), symlink() and undelete() syscalls,
Ian Dowse [Tue, 5 Aug 2003 00:26:51 +0000 (00:26 +0000)]
In the mknod(), mkfifo(), link(), symlink() and undelete() syscalls,
use vrele() instead of vput() on the parent directory vnode returned
by namei() in the case where it is equal to the target vnode. This
handles namei()'s somewhat strange (but documented) behaviour of
not locking either vnode when the two vnodes are equal and LOCKPARENT
but not LOCKLEAF is specified.

Note that since a vnode double-unlock is not currently fatal, these
coding errors were effectively harmless.

Spotted by: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
Reviewed by: mckusick

21 years agoIn _bus_dmamap_load_buffer(), only count the number of bounce pages needed if
Scott Long [Mon, 4 Aug 2003 23:40:35 +0000 (23:40 +0000)]
In _bus_dmamap_load_buffer(), only count the number of bounce pages needed if
they haven't been counted before.  This test was ommitted when bus_dmamap_load()
was merged into this function, and results in the pagesneeded field growing
without bounds when multiple deferrals happen.

Thanks to Paul Saab for beating his head against this for a few hours =-)

21 years agoFix logic bug in the previous commit. Any region less than 5 is a
Marcel Moolenaar [Mon, 4 Aug 2003 22:00:48 +0000 (22:00 +0000)]
Fix logic bug in the previous commit. Any region less than 5 is a
user space region. Hence, we need to test if 5 is greater than the
region; not greater equal.
This bug caused us to call ast() while interrupting kernel mode.

21 years agoLANG->LC_ALL
Andrey A. Chernov [Mon, 4 Aug 2003 21:31:53 +0000 (21:31 +0000)]
LANG->LC_ALL

Pointed by:     ru

21 years agoDo some minor Giant pushdown made possible by copyin, fget, fdrop,
David Malone [Mon, 4 Aug 2003 21:28:57 +0000 (21:28 +0000)]
Do some minor Giant pushdown made possible by copyin, fget, fdrop,
malloc and mbuf allocation all not requiring Giant.

1) ostat, fstat and nfstat don't need Giant until they call fo_stat.
2) accept can copyin the address length without grabbing Giant.
3) sendit doesn't need Giant, so don't bother grabbing it until kern_sendit.
4) move Giant grabbing from each indivitual recv* syscall to recvit.

21 years agogif -> png
Dag-Erling Smørgrav [Mon, 4 Aug 2003 21:11:33 +0000 (21:11 +0000)]
gif -> png

21 years agoMoved the WORLDDIR variable description to the Optional Variables section.
Ruslan Ermilov [Mon, 4 Aug 2003 21:00:35 +0000 (21:00 +0000)]
Moved the WORLDDIR variable description to the Optional Variables section.

21 years agoAdjust a comment to remove staleness and take slightly less implementation
John Baldwin [Mon, 4 Aug 2003 20:35:13 +0000 (20:35 +0000)]
Adjust a comment to remove staleness and take slightly less implementation
specific perspective.

21 years ago- GC unused cpu_thread_link().
John Baldwin [Mon, 4 Aug 2003 20:34:25 +0000 (20:34 +0000)]
- GC unused cpu_thread_link().
- Move the enabling of interrupts out of assembly and into C a few
  instructions later at cpu_critical_fork_exit().  This puts more of the
  MD critical section implementation under the MD critical section API
  making it easier to test and develop alternative implementations.

21 years ago- Since td_critnest is now initialized in MI code, it doesn't have to be
John Baldwin [Mon, 4 Aug 2003 20:32:45 +0000 (20:32 +0000)]
- Since td_critnest is now initialized in MI code, it doesn't have to be
  set in cpu_critical_fork_exit() anymore.
- As far as I can tell, cpu_thread_link() has never been used, not even
  when it was originally added, so remove it.

21 years agoSet td_critnest to 1 when setting up a thread since it is a MI field with
John Baldwin [Mon, 4 Aug 2003 20:28:20 +0000 (20:28 +0000)]
Set td_critnest to 1 when setting up a thread since it is a MI field with
MI values.  This ensures that td_critnest for a newly fork'd thread is
always valid.

Requested by: bde (a long time ago)

21 years agoInsert cosmetic spaces.
John Baldwin [Mon, 4 Aug 2003 19:24:25 +0000 (19:24 +0000)]
Insert cosmetic spaces.

Reported by: kris

21 years agoAllow foot shooting as Linux emulation needs it.
Julian Elischer [Mon, 4 Aug 2003 19:11:56 +0000 (19:11 +0000)]
Allow foot shooting as Linux emulation needs it.
Also change "Auto mode" to use a "special" value
instead of 0, and define and document it.
I had thought libpthread had already been switched to use auto mode but
it appears that patch hasn't been committed yet.

Discussed with:  Davidxu

21 years agoNote which machine consoles support booting from KZPEA aka Adaptec 39160
Wilko Bulte [Mon, 4 Aug 2003 18:05:36 +0000 (18:05 +0000)]
Note which machine consoles support booting from KZPEA aka Adaptec 39160
U160 adapters.

21 years agoUse LANG=C before egrep A-Z and tr A-Z
Andrey A. Chernov [Mon, 4 Aug 2003 15:57:01 +0000 (15:57 +0000)]
Use LANG=C before egrep A-Z and tr A-Z
Note: this is POSIX requirement, c-c ranges are portable only in POSIX locale
Strip [] for tr ranges

21 years agoPrepend LANG=C to all tr 'a-z' 'A-Z' and vice versa.
Andrey A. Chernov [Mon, 4 Aug 2003 15:47:43 +0000 (15:47 +0000)]
Prepend LANG=C to all tr 'a-z' 'A-Z' and vice versa.
Note: this is POSIX requirement, c-c ranges are portable only in POSIX locale

21 years agoUse LANG=C before tr to be sure that ranges are correct
Andrey A. Chernov [Mon, 4 Aug 2003 15:34:38 +0000 (15:34 +0000)]
Use LANG=C before tr to be sure that ranges are correct
Strip [] from ranges

21 years agoUse LANG=C before tr to be shure that ranges are correct
Andrey A. Chernov [Mon, 4 Aug 2003 15:31:57 +0000 (15:31 +0000)]
Use LANG=C before tr to be shure that ranges are correct

21 years agoFix problem differently, use
Andrey A. Chernov [Mon, 4 Aug 2003 15:29:09 +0000 (15:29 +0000)]
Fix problem differently, use
LANG=C tr 'a-z' 'A-Z'
for hypotetical case that script may generate non-ascii characters

21 years agoModified release note: Clarify SA-03:08 note.
Bruce A. Mah [Mon, 4 Aug 2003 15:26:40 +0000 (15:26 +0000)]
Modified release note:  Clarify SA-03:08 note.

21 years agoFix problem differently, use \81
Andrey A. Chernov [Mon, 4 Aug 2003 15:25:39 +0000 (15:25 +0000)]
Fix problem differently, use                                                  \81
LANG=C tr 'a-z' 'A-Z'                                                         \81
for hypotetical case that script may generate non-ascii characters

21 years agoFix problem differently, use
Andrey A. Chernov [Mon, 4 Aug 2003 15:24:06 +0000 (15:24 +0000)]
Fix problem differently, use
LANG=C tr 'a-z' 'A-Z'
for hypotetical case that script may generate non-ascii characters

21 years agoMinor wordsmithing on previous commit.
Bruce A. Mah [Mon, 4 Aug 2003 15:23:20 +0000 (15:23 +0000)]
Minor wordsmithing on previous commit.

21 years agoUse tr '[:lower:]' '[:upper:]' to work with any locale
Andrey A. Chernov [Mon, 4 Aug 2003 14:32:56 +0000 (14:32 +0000)]
Use tr '[:lower:]' '[:upper:]' to work with any locale

21 years agoFix double-wrong tr usage: tr '[a-z]' '[A-Z]'
Andrey A. Chernov [Mon, 4 Aug 2003 14:10:33 +0000 (14:10 +0000)]
Fix double-wrong tr usage: tr '[a-z]' '[A-Z]'

First of all, it should be written as: tr 'a-z' 'A-Z'
ranges not encolosed in [] according to POSIX, so [] just included
in the replacement.
Second, it should be written: tr '[:lower:]' '[:upper:]'
since a-z and A-Z may have different length in some locales.

21 years agoSA-03:08 does not affect FreeBSD 5.1-RELEASE.
Hideyuki KURASHINA [Mon, 4 Aug 2003 13:53:58 +0000 (13:53 +0000)]
SA-03:08 does not affect FreeBSD 5.1-RELEASE.

21 years agoA Perl script which tries to "compress" headers by removing comments and
Dag-Erling Smørgrav [Mon, 4 Aug 2003 13:10:01 +0000 (13:10 +0000)]
A Perl script which tries to "compress" headers by removing comments and
superfluous whitespace.

21 years agoChase the doc ports.
John Hay [Mon, 4 Aug 2003 12:12:36 +0000 (12:12 +0000)]
Chase the doc ports.

21 years agoMerge the following from the English version:
Hideyuki KURASHINA [Mon, 4 Aug 2003 11:04:18 +0000 (11:04 +0000)]
Merge the following from the English version:

1.43  -> 1.44 errata/article.sgml

21 years agoAdd support for multiple CPUs to cpuinfo.
Dag-Erling Smørgrav [Mon, 4 Aug 2003 10:55:22 +0000 (10:55 +0000)]
Add support for multiple CPUs to cpuinfo.

21 years agoUse the actual build target (all), since relying on the build as a
Doug Barton [Mon, 4 Aug 2003 10:23:45 +0000 (10:23 +0000)]
Use the actual build target (all), since relying on the build as a
side effect of the distribution target was apparently just good luck
all these years.

Submitted by: ru

21 years agoPut an uncovered page between the swap devices, that way we can be sure
Poul-Henning Kamp [Mon, 4 Aug 2003 08:22:49 +0000 (08:22 +0000)]
Put an uncovered page between the swap devices, that way we can be sure
to not get any cross-device I/O requests.  (The unallocated first page
protecting BSD labels already gave us this, but that hack may go away
at some point in time).

Remove the check for cross-device I/O requests in swap_pager_strategy.

Move the repeated statistics updating into flushchainbuf().

21 years agoSet the BGE_RX_MTU register correctly so that we can receive slightly
Bill Paul [Mon, 4 Aug 2003 05:50:53 +0000 (05:50 +0000)]
Set the BGE_RX_MTU register correctly so that we can receive slightly
larger than normal frames, to account for the case where a bge(4) NIC
is used with VLANs. Since we set the IFCAP_VLAN_MTU flag, we must allow
reception of frames up to 1522 bytes in size rather than 1518.

Note that it is possible to work around this bug by doing:

# ifconfig bge0 mtu 1504

prior to configuring any VLAN interfaces.

21 years ago- Don't mess with TX queue in fwohci_stop() if we failed to attach the device.
Hidetoshi Shimokawa [Mon, 4 Aug 2003 05:43:02 +0000 (05:43 +0000)]
- Don't mess with TX queue in fwohci_stop() if we failed to attach the device.

Tested by: wilko

- Detect memory mapping failure of registers by checking OHCI version.

Tested by: KONDOU, Kazuhiro <kazuhiro@alib.jp>

21 years agoNo functional changes, just code reorganization from prev. commit, it
Andrey A. Chernov [Mon, 4 Aug 2003 05:22:06 +0000 (05:22 +0000)]
No functional changes, just code reorganization from prev. commit, it
makes one malloc unneeded, removes two bzero's and makes code more readable.

"Bright ideas comes only _after_ commits."

21 years agoCleanup the clock code. This includes:
Marcel Moolenaar [Mon, 4 Aug 2003 05:13:18 +0000 (05:13 +0000)]
Cleanup the clock code. This includes:
o  Remove alpha specific timer code (mc146818A) and compiled-out
   calibration of said timer.
o  Remove i386 inherited timer code (i8253) and related acquire and
   release functions.
o  Move sysbeep() from clock.c to machdep.c and have it return
   ENODEV. Console beeps should be implemented using ACPI or if no
   such device is described, using the sound driver.
o  Move the sysctls related to adjkerntz, disable_rtc_set and
   wall_cmos_clock from machdep.c to clock.c, where the variables
   are.
o  Don't hardcode a hz value of 1024 in cpu_initclocks() and don't
   bother faking a stathz that's 1/8 of that. Keep it simple: hz
   defaults to HZ and stathz equals hz. This is also how it's done
   for sparc64.
o  Keep a per-CPU ITC counter (pc_clock) and adjustment (pc_clockadj)
   to calculate ITC skew and corrections. On average, we adjust the
   ITC match register once every ~1500 interrupts for a duration of
   2 consequtive interruprs. This is to correct the non-deterministic
   behaviour of the ITC interrupt (there's a delay between the match
   and the raising of the interrupt).
o  Add 4 debugging sysctls to monitor clock behaviour. Those are
   debug.clock_adjust_edges, debug.clock_adjust_excess,
   debug.clock_adjust_lost and debug.clock_adjust_ticks. The first
   counts the individual adjustment cycles (when the skew first
   crosses the threshold), the second counts the number of times the
   adjustment was excessive (any non-zero value is to be considered
   a bug), the third counts lost clock interrupts and the last counts
   the number of interrupts for which we applied an adjustment
   (debug.clock_adjust_ticks / debug.clock_adjust_edges gives the
   avarage duration of an individual adjustment -- should be ~2).

While here, remove some nearby (trivial) left-overs from alpha and
other cleanups.

21 years agoUse kmem_alloc_nofault() instead of kmem_alloc_pageable() to allocate
Alan Cox [Mon, 4 Aug 2003 04:35:04 +0000 (04:35 +0000)]
Use kmem_alloc_nofault() instead of kmem_alloc_pageable() to allocate
swapbkva.  Swapbkva mappings are explicitly managed using pmap_qenter(),
not on-demand by vm_fault(), making kmem_alloc_nofault() more appropriate.

Submitted by: tegge

21 years agoPOSIX require complex processing of 'c-c' ranges: if one of the endpoints
Andrey A. Chernov [Mon, 4 Aug 2003 04:20:04 +0000 (04:20 +0000)]
POSIX require complex processing of 'c-c' ranges: if one of the endpoints
is octal sequence, range is taken in the byte values order, for non-octal
endpoints range is taken in the sorted collation order.

Implement it.

21 years agoNow that the central POSIX.1e ACL code implements functions to
Robert Watson [Mon, 4 Aug 2003 03:29:13 +0000 (03:29 +0000)]
Now that the central POSIX.1e ACL code implements functions to
generate the inode mode from a default ACL and creation mask,
implement ufs_sync_inode_from_acl() using acl_posix1e_newfilemode().

Since ACL_OVERRIDE_MASK/ACL_PRESERVE_MASK are defined, we no
longer need to explicitly pass in a "preserve_mask" field: this
is implicit in the use of POSIX.1e semantics.

Note: this change contains a semantic bugfix for new file creation:
we now intersect the ACL-generated mode and the cmode requested by
the user process.  This means permissions on newly created file
objects will now be more conservative.  In the future, we may want
to provide alternative semantics (similar to Solaris and Linux) in
which the ACL mask overrides the umask, permitting ACLs to broaden
the rights beyond the requested umask.

PR: 50148
Reported by: Ritz, Bruno <bruno_ritz@gmx.ch>
Obtained from: TrustedBSD Project

21 years agoBackout 1.14, it seems to be causing problems with libxml build
Bosko Milekic [Mon, 4 Aug 2003 03:02:36 +0000 (03:02 +0000)]
Backout 1.14, it seems to be causing problems with libxml build
and I don't have time to investigate this code in much detail right
now.

21 years agoSpecial fix just for
Andrey A. Chernov [Mon, 4 Aug 2003 02:57:17 +0000 (02:57 +0000)]
Special fix just for
tr -[cC]s '[:upper:]' '[:lower:]'
case (or vice versa):
chars taken from s2 can be different this time
due to lack of complex upper/lower processing,
so fill string2 again to not miss some.

21 years agofix disordering of filenames. Place the dev/ppc files in alphabetical
Warner Losh [Mon, 4 Aug 2003 02:39:14 +0000 (02:39 +0000)]
fix disordering of filenames.  Place the dev/ppc files in alphabetical
order.

21 years agoMove more ACL logic from the UFS code (ufs_acl.c) to the central POSIX.1e
Robert Watson [Mon, 4 Aug 2003 02:13:05 +0000 (02:13 +0000)]
Move more ACL logic from the UFS code (ufs_acl.c) to the central POSIX.1e
support routines in kern_acl.c:

- Define ACL_OVERRIDE_MASK and ACL_PRESERVE_MASK centrally in acl.h: the
  mode bits that are (and aren't) stored in the ACL.

- Add acl_posix1e_acl_to_mode(): given a POSIX.1e extended ACL, generate
  a compatibility mode (only the bits supported by the POSIX.1e ACL).

- acl_posix1e_newfilemode(): Given a requested creation mode and default
  ACL, calculate the mode for the new file system object (only the bits
  supported by the POSIX.1e ACL).

PR: 50148
Reported by: Ritz, Bruno <bruno_ritz@gmx.ch>
Obtained from: TrustedBSD Project

21 years agoNew release/errata notes: SA-03:08.
Bruce A. Mah [Mon, 4 Aug 2003 00:57:28 +0000 (00:57 +0000)]
New release/errata notes:  SA-03:08.

21 years agoIn ufs_chmod(), use privilege only when required in the following
Robert Watson [Mon, 4 Aug 2003 00:31:01 +0000 (00:31 +0000)]
In ufs_chmod(), use privilege only when required in the following
cases:

- Setting sticky bit on non-directory
- Setting setgid on a file with a group that isn't in the effective
  or extended groups of the authorizing credential

I.e., test the requirement first, then do the privilege test,
rather than doing the privilege test regardless of the need for
privilege.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoUse the revision ID from PCI configuration space to identify Intel
John Polstra [Mon, 4 Aug 2003 00:17:16 +0000 (00:17 +0000)]
Use the revision ID from PCI configuration space to identify Intel
8255x chips more precisely.  The information was obtained from Intel's
Open Source Software Developer Manual for the 8255x.

MFC after: 1 day

21 years agoFix handling of external interrupts: we weren't calling ast() when
Marcel Moolenaar [Mon, 4 Aug 2003 00:08:39 +0000 (00:08 +0000)]
Fix handling of external interrupts: we weren't calling ast() when
interrupting user mode. The net effect of this bug is that a clock
interrupt does not cause rescheduling and processes are not
preempted. It only takes a "while (1);" to render the machine
useless.

This bug was introduced by the context changes and EPC syscall code.
Handling of ASTs was moved to C for clarity and ease of maintenance,
but was not added for the external interrupt case.

This needs to be revisited. We now have calls to do_ast() in trap(),
break_syscall() and ivt_External_Interrupt(). A single call in
exception_restore covers these 3 places without duplication. This
is where we handled ASTs prior to the overhaul, except that the
meat has been moved to do_ast(), a C function. This was the goal
to begin with.

Pointy hat: marcel

21 years agoMicrooptimization of prev. patch: do strdup() only if (cflag || Cflag)
Andrey A. Chernov [Sun, 3 Aug 2003 22:19:43 +0000 (22:19 +0000)]
Microoptimization of prev. patch: do strdup() only if (cflag || Cflag)

21 years ago1) Fix -C - it was broken since introduced, wrong array sorted
Andrey A. Chernov [Sun, 3 Aug 2003 22:02:49 +0000 (22:02 +0000)]
1) Fix -C - it was broken since introduced, wrong array sorted
2) Fix last (repeated) char after [:class:], it was \0 in original code

21 years agoName swap_pager_find_dev() more correctly swp_pager_finde_dev().
Poul-Henning Kamp [Sun, 3 Aug 2003 21:22:42 +0000 (21:22 +0000)]
Name swap_pager_find_dev() more correctly swp_pager_finde_dev().

Use ->bio_children to count child buffers, rather than abuse the
bio_caller1 pointer.

Expand the relevant bits of waitchainbuf() inline, this clarifies
the code a little bit.

21 years agoRename collate_range_cmp() to stable_collate_range_cmp() to indicate
Andrey A. Chernov [Sun, 3 Aug 2003 19:44:36 +0000 (19:44 +0000)]
Rename collate_range_cmp() to stable_collate_range_cmp() to indicate
that it is not the common variant.
Remove doubtful microoptimization there.

21 years agoRestore including of "collate.h", for its own prototype (mis)match detection
Andrey A. Chernov [Sun, 3 Aug 2003 19:28:23 +0000 (19:28 +0000)]
Restore including of "collate.h", for its own prototype (mis)match detection

21 years agostyle.Makefile(5)'ize
David E. O'Brien [Sun, 3 Aug 2003 15:17:28 +0000 (15:17 +0000)]
style.Makefile(5)'ize

21 years ago- Removed vestiges of the IA64 boot floppy support.
Ruslan Ermilov [Sun, 3 Aug 2003 15:06:00 +0000 (15:06 +0000)]
- Removed vestiges of the IA64 boot floppy support.
- Fixed the bootable CD-ROM support for IA64.

Reviewed by: marcel
Tested by: marcel

21 years agoI accidentally hit undo before committing, fix the resulting off-by-one.
Poul-Henning Kamp [Sun, 3 Aug 2003 14:53:52 +0000 (14:53 +0000)]
I accidentally hit undo before committing, fix the resulting off-by-one.

21 years agoRemove the NSWAPDEV option, we have no upper limit on how many
Poul-Henning Kamp [Sun, 3 Aug 2003 13:39:59 +0000 (13:39 +0000)]
Remove the NSWAPDEV option, we have no upper limit on how many
swap devices we can have anymore.

21 years agoChange the layout policy of the swap_pager from a hardcoded width
Poul-Henning Kamp [Sun, 3 Aug 2003 13:35:31 +0000 (13:35 +0000)]
Change the layout policy of the swap_pager from a hardcoded width
striping to a per device round-robin algorithm.

Because of the policy of not attempting to retain previous swap
allocation on page-out, this means that a newly added swap device
almost instantly takes its 1/N share of the I/O load but it takes
somewhat longer for it to assume it's 1/N share of the pages if there
is plenty of space on the other devices.

Change the 8G total swapspace limitation to 8G per device instead
by using a per device blist rather than one global blist.  This
reduces the memory footprint by 75% (typically a couple hundred
kilobytes) for the common case with one swapdevice but NSWAPDEV=4.

Remove the compile time constant limit of number of swap devices,
there is no limit now.  Instead of a fixed size array, store the
per swapdev structure in a TAILQ.

Total swap space is still addressed by a 32 bit page number and
therefore the upper limit is now 2^42 bytes = 16TB (for i386).

We still do not allocate the first page of each device in order to
give some amount of protection to any bsdlabel at the start of the
device.

A new device is appended after the existing devices in the swap space,
no attempt is made to fill in holes left behind by swapoff (this can
trivially be changed should it ever become a problem).

The sysctl vm.nswapdev now reflects the number of currently configured
swap devices.

Rename vm_swap_size to swap_pager_avail for consistency with other
exported names.

Change argument type for vm_proc_swapin_all() and swap_pager_isswapped()
to be a struct swdevt pointer rather than an index.

Not changed: we are still using blists to manage the free space,
but since the swapspace is no longer fragmented by the striping
different resource managers might fare better.

21 years agoNote that AS4100 needs DC adapter for RCM to function.
Wilko Bulte [Sun, 3 Aug 2003 11:43:13 +0000 (11:43 +0000)]
Note that AS4100 needs DC adapter for RCM to function.

21 years agoFix the cdev kld example.
Martin Blapp [Sun, 3 Aug 2003 10:39:29 +0000 (10:39 +0000)]
Fix the cdev kld example.

PR: 52954
Submitted by: Priit Piipuu <priit.piipuu@mail.ee>
Reviewed by: phk

21 years agoMove extern declaration of the various pagerops from vm_pager.c
Poul-Henning Kamp [Sun, 3 Aug 2003 09:27:39 +0000 (09:27 +0000)]
Move extern declaration of the various pagerops from vm_pager.c
to vm_pager.h where the various pagers will also see them.

21 years agoDeal with GCC annoyingly defining _BIG_ENDIAN.
David E. O'Brien [Sun, 3 Aug 2003 07:53:50 +0000 (07:53 +0000)]
Deal with GCC annoyingly defining _BIG_ENDIAN.

21 years agoStyle sync.
David E. O'Brien [Sun, 3 Aug 2003 07:50:19 +0000 (07:50 +0000)]
Style sync.

21 years agoGo ahead and allow ports as high as 0xfff to be used for pccard
Warner Losh [Sun, 3 Aug 2003 06:17:06 +0000 (06:17 +0000)]
Go ahead and allow ports as high as 0xfff to be used for pccard
devices.  Only some devices support above 0x400, but since you have to
explicitly enable this range, you are assumed to know what you are
doing.

21 years agoRevise obj_alloc(). Most notably, use the object's lock to prevent two
Alan Cox [Sun, 3 Aug 2003 06:08:48 +0000 (06:08 +0000)]
Revise obj_alloc().  Most notably, use the object's lock to prevent two
concurrent invocations from acquiring the same address(es).  Also, in case
of an incomplete allocation, free any allocated pages.

In collaboration with: tegge

21 years agoAlways put an entry for ::1. It may avoid useless DNS lookup
Hajimu UMEMOTO [Sun, 3 Aug 2003 05:55:21 +0000 (05:55 +0000)]
Always put an entry for ::1.  It may avoid useless DNS lookup
for localhost.

MFC after: 3 days

21 years agoRemove commented out and never used code
Andrey A. Chernov [Sun, 3 Aug 2003 05:20:31 +0000 (05:20 +0000)]
Remove commented out and never used code

21 years agoRemove collate_range_cmp() stabilization, it conflicts with ranges
Andrey A. Chernov [Sun, 3 Aug 2003 04:47:34 +0000 (04:47 +0000)]
Remove collate_range_cmp() stabilization, it conflicts with ranges

21 years agoRemove __collate_range_cmp() stabilization, it conflicts with ranges
Andrey A. Chernov [Sun, 3 Aug 2003 04:40:40 +0000 (04:40 +0000)]
Remove __collate_range_cmp() stabilization, it conflicts with ranges

21 years agoRemove collate_range_cmp() stabilization, it conflicts with ranges
Andrey A. Chernov [Sun, 3 Aug 2003 04:36:09 +0000 (04:36 +0000)]
Remove collate_range_cmp() stabilization, it conflicts with ranges

21 years agoRemove collate_range_cmp() stabilization, it conflicts with ranges
Andrey A. Chernov [Sun, 3 Aug 2003 04:28:10 +0000 (04:28 +0000)]
Remove collate_range_cmp() stabilization, it conflicts with ranges

21 years agoRemove charcoll() stabilization added in 1.16, it gains nothing but conflicts
Andrey A. Chernov [Sun, 3 Aug 2003 04:18:07 +0000 (04:18 +0000)]
Remove charcoll() stabilization added in 1.16, it gains nothing but conflicts
with ranges.

21 years agoPOSIX requires 'c-c' must conform collate and be in collation order
Andrey A. Chernov [Sun, 3 Aug 2003 03:51:27 +0000 (03:51 +0000)]
POSIX requires 'c-c' must conform collate and be in collation order

21 years agoThis patch address two problems.
Andrey A. Chernov [Sun, 3 Aug 2003 02:23:39 +0000 (02:23 +0000)]
This patch address two problems.

1st one is relatively minor: according our own manpage, upper and lower
classes must be sorted, but currently not.

2nd one is serious:
tr '[:lower:]' '[:upper:]'
(and vice versa) currently works only if upper and lower classes
have exact the same number of elements. When it is not true, like for
many ISO8859-x locales which have bigger amount of lowercase letters,
tr may do nasty things.

See this page
http://www.opengroup.org/onlinepubs/007908799/xcu/tr.html
for detailed description of desired tr behaviour in such cases.

21 years agoFix an 'bad file descriptor' error which would come up when using
Garance A Drosehn [Sat, 2 Aug 2003 23:03:37 +0000 (23:03 +0000)]
Fix an 'bad file descriptor' error which would come up when using
the 'C' flag on an entry that also specifies 'user:group' info.

Submitted by: Riccardo Torrini <riccardo@torrini.org> in -current
MFC after: 4 days