Commit Graph

105223 Commits

Author SHA1 Message Date
jhb
a16ed36af9 - Move TDF_OWEPREEMPT, TDF_OWEUPC, and TDF_USTATCLOCK over to td_pflags
since they are only accessed by curthread and thus do not need any
  locking.
- Move pr_addr and pr_ticks out of struct uprof (which is per-process)
  and directly into struct thread as td_profil_addr and td_profil_ticks
  as these variables are really per-thread.  (They are used to defer an
  addupc_intr() that was too "hard" until ast()).
2004-07-16 21:04:55 +00:00
jhb
4ac8793b21 Whitespace fix. 2004-07-16 21:01:52 +00:00
jhb
0b697e15db Improve readability a bit by changing some code at the end of a function
that did:

	if (foo)
		return
	else
		blah

to just do the simpler

	if (!foo)
		blah

instead.
2004-07-16 21:00:50 +00:00
obrien
21a4b88c44 /usr/libexec/ld-elf.so.1 -> /libexec/ld-elf32.so.1 2004-07-16 20:53:00 +00:00
mr
04893b2451 Forced commit to actually list the changes of bin/61718, as requested by sam.
The attached patch fixes a number of problems present in rpc.lockd.

 1)

 Nfslocklist_head.lf_first is overwritten because of an off-by-one-bug
 that happens when clnt_cache_next_to_use is incorrectly incremented.

 2)

 'struct sockaddr *addr' inside 'struct file_lock' is set to point to
 the result from svc_getrpccaller(). This value is malloc:ed inside the
 rpc libraries and is free:ed when clnt_destroy() is called. Fix,
 maintain a copy of the result.

 3)

 The loop inside retry_blockingfilelocklist() that uses 3 pointers ifl,
 nfl, and pfl thrashes the list pointed to by
 blockedlocklist_head.lf_first. Fix, use a simpler loop. The new loop
 does not preserve list order but the order is immaterial anyways. See
 also revison 1.6-1.7 and kern/61122.

 4)

 struct file_lock
         char client_name[SM_MAXSTRLEN];

 and

 struct host
         char name[SM_MAXSTRLEN];

 Be careful to not create open (non 0 terminated) C strings and later
 passing them to e.g syslog. Fix, make sure that the strings are always
 terminated with 0. When at it, move the strings to the end of the
 structs and make them variable length. This saves about 1000 bytes for
 every malloc:ed struct.

 5)

 The newfl = malloc(sizeof(struct file_lock)) memory was never properly
 bzero:ed.

 Minor changes:

 A)

 Nlmtonlm4(0) made assumptions about struct layouts.

 B)

 Don't close stdout and stderr when debugging (-d option).

 C)

 Remove unused pid_t locker and int fd in struct file_lock.

 D)

 s/printf/debuglog/

 E)

 Remove redundant sleep(1) and call to debuglog().

 Cheers,
 Björn
2004-07-16 19:30:59 +00:00
njl
9c234756c2 Use ACPI_ALL_NOTIFY instead of registering handlers separately. 2004-07-16 19:05:40 +00:00
njl
6b1e76c6c9 Fix the alpha (and others) module build by only building fdc_acpi.c on
i386 and amd64.  The only other ACPI machine (ia64) doesn't support
floppy drives.  Tested by:  make MACHINE={pc98,i386,amd64,alpha,sparc64}
2004-07-16 18:37:00 +00:00
ume
bd44ac4197 when IN6P_AUTOFLOWLABEL is set, the flowlabel is not set on
outgoing tcp connections.

Reported by:	Orla McGann <orly@cnri.dit.ie>
Reviewed by:	Orla McGann <orly@cnri.dit.ie>
Obtained from:	KAME
2004-07-16 18:08:13 +00:00
harti
03c1f3ab46 According to POSIX sys/socket.h must define CMSG_NXTHDR but most not
define NULL. This means we cannot use NULL in the definition of CMSG_NXTHDR.
So replace NULL with 0.

PR:		kern/60309
Submitted by:	Jeff King <peff-freebsd@peff.net>
2004-07-16 17:42:48 +00:00
harti
f7175fc0c6 Document the MSG_DONTWAIT flag. 2004-07-16 17:15:37 +00:00
njl
2524448ea1 Fix acpi_video loading. When we started cleaning up the duplicate handles
left around after the PCI probe, acpi_video stopped attaching because while
it was an acpi child device, it really is a PCI device.  Fix this by making
it a PCI child.

* Remove non-handle ivars accesses since child busses only implement
acpi_get_handle().
* Access the acpi softc directly through the devclass instead of through
the implied parent.
* Clean up a potential panic on unload by freeing the sysctl context before
storing NULL in the OID.

Found by:	marks
2004-07-16 16:59:32 +00:00
cperciva
0104aa4550 Add a SUSER_RUID flag to suser_cred. This flag indicates that we want to
check if the *real* user is the superuser (vs. the normal behaviour, which
checks the effective user).

Reviewed by:	rwatson
2004-07-16 15:57:16 +00:00
mr
5863196df1 After talking to Colin,
apply the patch of bin/61718 (which should include/elimatate kern/61122 also).
It seems to fix a few annoying bugs.

PR:		bin/61718, kern/61122
Submitted by:	bg@sics.se ohartman@mail.physik.uni-mainz.de
2004-07-16 12:50:10 +00:00
johan
54f0cd6f44 Include <string.h> to get memset and strcmp prototype.
Sort includes.

This is now WARNS=2 clean, bump WARNS to keep it clean.
2004-07-16 11:07:07 +00:00
keramida
c4299fbd62 Refer to the sysutils/cdrtools port now that the sysutils/mkisofs port
has been merged into the former.

PR:		docs/69087
Submitted by:	Janos Mohacsi <janos.mohacsi@bsd.hu>
MFC after:	3 days
2004-07-16 08:53:25 +00:00
tanimura
3cd0d94132 Sync the example of MODULES_OVERRIDE with the renamed sound drivers.
Pointed out by:	Christoph Mallon <christoph.mallon@gmx.de>
2004-07-16 08:12:14 +00:00
tanimura
ddf30cc303 Rename snd_pcm as sound. 2004-07-16 07:24:20 +00:00
tjr
73692bbf16 Update for struct cdevsw and dev_t -> struct cdev * changes, plus one
64-bit portability fix.
2004-07-16 06:55:34 +00:00
das
fabd09c301 Tweak the conditions under which certain gcc builtins are used:
- Unlike the builtin relational operators, builtin floating-point
  constants were not available until gcc 3.3, so account for this.[1]

- Apparently some versions of the Intel C Compiler fallaciously define
  __GNUC__ without actually being compatible with the claimed gcc
  version.  Account for this, too.[2]

[1] Noticed by:		Christian Hiris <4711@chello.at>
[2] Submitted by:	Alexander Leidinger <Alexander@Leidinger.net>
2004-07-16 06:21:56 +00:00
tjr
b5e4d3d18e Add support for multibyte characters. 2004-07-16 06:21:40 +00:00
davidxu
8374d07861 ptrace's first parameter is command not pid. pointy hat to me. 2004-07-16 06:11:48 +00:00
tjr
83dd09fd89 Add a cross reference to fgetwln(3). 2004-07-16 06:07:12 +00:00
tjr
1f2914b133 Add fgetwln(), a wide character version of fgetln(). 2004-07-16 06:06:09 +00:00
tjr
b06190969a Rename slbexpand() to __slbexpand() and make it available outside
of fgetln.c (non-static).
2004-07-16 05:52:51 +00:00
tjr
2715a71e01 Avoid passing negative values to <ctype.h> functions on machines with
signed chars.
2004-07-16 05:10:46 +00:00
tjr
f617c5dba0 Document incorrect handling of multibyte characters. 2004-07-16 05:08:16 +00:00
marcel
8b54290574 Update config.h to account for the prgregset_t and psaddr_t types
that have been added to <sys/procfs.h>. This change has no effect
because the source file that would be affected is not compiled on
FreeBSD. Hence, this is for completeness only.
2004-07-16 05:03:42 +00:00
tanimura
3556604678 Add the change of the sound drivers. 2004-07-16 04:04:29 +00:00
tanimura
8b9e69258c Rename the sound device drivers:
- `sound'
  The generic sound driver, always required.

- `snd_*'
  Device-dependent drivers, named after the sound module names.
  Configure accordingly to your hardware.

In addition, rename the `snd_pcm' module to `sound' in order to sync
with the driver names.

Suggested by:	cg
2004-07-16 04:00:08 +00:00
alc
4ec86be98f Remove unused fields from the pmap. 2004-07-16 03:42:45 +00:00
marcel
deebec0a62 As per discussions on current@, protect unsuspecting users from
trying to upgrade their system with make world instead of following
the preferred and suggested sequence of commands. The fact remains
that make world does not upgrade the kernel.
Allow make world when DESTDIR has been specified, including when
DESTDIR specifies the root file system. Otherwise, print a useful
warning and fail.

Reviewed, tested and scrutinized by: gad@
2004-07-16 02:51:28 +00:00
rwatson
b3b8f6d637 Update Biba and MLS man pages to take into account recent renaming of
the 'single' label element to 'effective.
2004-07-16 02:04:41 +00:00
rwatson
6a12a2400a Rename Biba and MLS _single label elements to _effective, which more
accurately represents the intention of the 'single' label element in
Biba and MLS labels.  It also approximates the use of 'effective' in
traditional UNIX credentials, and avoids confusion with 'singlelabel'
in the context of file systems.

Inspired by:	trhodes
2004-07-16 02:03:50 +00:00
alfred
00193c2bc8 Clarify getfsstat(2) usage.
The getfsstat(2) function expects a buffer and a count, and returns a count.

The confusing part is that the count it takes is a byte count, while the
return value is a count of the number of structures it has filled out.

Spell this out.
2004-07-16 01:18:13 +00:00
rwatson
d512f5c72c When entering soclose(), assert that SS_NOFDREF is not already set. 2004-07-16 00:37:34 +00:00
glebius
f1f21dfd62 Use qsort_r() instead of qsort() when sorting links by latency
This helps us to remove a global variable and a mutex protecting it.

Reviewed by:	rwatson
Approved by:	julian (mentor)
2004-07-16 00:07:44 +00:00
glebius
45d57112fd Copy qsort_r(3) from libc to libkern.
Reviewed by:	phk
Approved by:	julian (mentor)
2004-07-15 23:58:23 +00:00
rees
9af11609ee fix array index out of bounds in rpc->rc_srtt[], rpc->rc_sdrtt[]
Noticed by: tedu
Approved by: alfred
2004-07-15 22:21:25 +00:00
phk
ebaeab4118 Preparation commit for the tty cleanups that will follow in the near
future:

rename ttyopen() -> tty_open() and ttyclose() -> tty_close().

We need the ttyopen() and ttyclose() for the new generic cdevsw
functions for tty devices in order to have consistent naming.
2004-07-15 20:47:41 +00:00
le
2093674d9a MFNetBSD.
rev. 1.67, author: mycroft
   Fix a byte order error.

rev. 1.68, author: mycroft
   Adjust some silliness that was causing us to do extra work for
   "frame list rollover" interrupts, which we pretty much ignore.

Obtained from:   NetBSD
2004-07-15 19:25:06 +00:00
cperciva
a98ab79fa5 Add security/freebsd-update back for non-ia64 releases. (The port is
currently marked ONLY_FOR_ARCHS= i386 amd64 alpha sparc64.)

Approved by:	scottl
2004-07-15 18:22:21 +00:00
alc
5938fa0191 Push down the acquisition and release of the page queues lock into
pmap_protect() and pmap_remove().  In general, they require the lock in
order to modify a page's pv list or flags.  In some cases, however,
pmap_protect() can avoid acquiring the lock.
2004-07-15 18:00:43 +00:00
njl
076722260a Add a few comments about ACPI probing. 2004-07-15 16:47:31 +00:00
njl
12f898b2ca Add fdc_acpi to module build, bump WARNS to 2. 2004-07-15 16:44:14 +00:00
njl
949f719df3 Hook up fdc_acpi for the kernel build. 2004-07-15 16:43:52 +00:00
njl
731562d007 Clean up resources properly if attach fails. Always reset ISA drives on
probe.
2004-07-15 16:41:07 +00:00
njl
5facd5b509 Re-work for fdc_acpi. Expose fdc_add_child() and move the static
hints-based probe to fdc_hints_probe().

Also:
* Fix some resource leaks when attach fails.
* Remove the FDC_ATTACHED flag.  It was supposed to prevent multiple
  unloads but this is not necessary.
2004-07-15 16:39:40 +00:00
njl
392a2af12f Add an ACPI floppy drive attachment that probes via the _FDE and _FDI
methods.  It also now handles ordinary floppy drive probing for drives
attached to ACPI.

Reviewed by:	imp
2004-07-15 16:38:07 +00:00
jhb
e334b5168b Fix a typo in a comment. 2004-07-15 16:37:48 +00:00
njl
7c3c611f34 Update the interface for child drivers. Add acpi_scan_children, which
allows a bus to re-enumerate its child handles and optionally replace
them with new children, arranged to the bus's liking.  (The current device
space is flat with all devices immediately under acpi0).  Add comments
for each interface.
2004-07-15 16:29:08 +00:00