Commit Graph

5610 Commits

Author SHA1 Message Date
John Birrell
37e19e1d85 Use an intermediate pointer to avoid a strict aliasing warning. 2007-11-23 05:52:13 +00:00
John Birrell
3e636fa0e5 Use an intermediate pointer to avoid a strict aliasing warning.
Note that ULong in this code is actually defined as an unsigned integer across
all arches so that the gdtoa() function always processes 32 bit data
despite the unfortunate naming of "ULong".
2007-11-21 01:10:42 +00:00
John Birrell
102c7c9299 Use intermediate pointers to avoid strict alias type check failures
using gcc 4.2. This is required for tinderbox which doesn't have
-fno-strict-aliasing in it's custom CFLAGS.
2007-11-20 01:51:20 +00:00
Olivier Houchard
e93073b33d Change the casts from (pthread_mutex_t *) to (void *) to keep gcc quiet.
Anybody with a cleaner solution feel free to change it.
2007-11-19 21:57:28 +00:00
Ruslan Ermilov
faad9cae56 Fix bad rule and bad dependency for nsparser.h that can
cause the build to fail because y.tab.c can have a more
recent modification time than y.tab.h, and the bad rule
relied on the opposite.

(The last write to y.tab.c by yacc(1) happens after the
last write to y.tab.h, according to truss(1).)

Reported by:	kensmith
2007-11-15 22:39:15 +00:00
Rong-En Fan
a964324e72 - Include runetype.h for _RuneLocale_ 2007-11-07 14:45:48 +00:00
Giorgos Keramidas
daa8e8bf02 Remove extraneous empty lines, to fix mdoc warnings.
MFC after:	3 days
2007-10-30 15:36:40 +00:00
Giorgos Keramidas
ef824a431f mdoc fix: remove extraneous empty line.
MFC after:	3 days
2007-10-30 15:31:41 +00:00
Giorgos Keramidas
3f85a8b4c5 Bump manpage date, missed during the last change.
MFC after:	3 days
2007-10-30 15:28:43 +00:00
Giorgos Keramidas
6aaa40b521 The .Fx request doesn't recognize 2.2.0, so use ".Fx 2.2"
MFC after:	3 days
2007-10-30 15:27:45 +00:00
Giorgos Keramidas
aada4cf330 Remove extraneous .Ef request.
MFC after:	3 days
2007-10-30 15:26:20 +00:00
Andrey A. Chernov
7f5004e7ba Back out 2nd part of wrong iswascii() change in prev. commit. 2007-10-23 17:39:28 +00:00
John Birrell
b7a2eb795c Add a BUGS section to note that mount/chroot changes since
a module was loaded might make the pathname inaccurate.

I wonder if an inode reference should be stored with the pathname
to allow a validity check?

Suggested by: rwatson@
2007-10-22 21:49:39 +00:00
John Birrell
1676805c18 Add the full module path name to the kld_file_stat structure
for kldstat(2).

This allows libdtrace to determine the exact file from which
a kernel module was loaded without having to guess.

The kldstat(2) API is versioned with the size of the
kld_file_stat structure, so this change creates version 2.

Add the pathname to the verbose output of kldstat(8) too.

MFC: 3 days
2007-10-22 04:12:57 +00:00
David Xu
c5081fcd35 Remove out of date notes, the atoi code is thread-safe and async-cancel
safe.

Discussed with: desichen
2007-10-19 06:23:39 +00:00
Olivier Houchard
394c68fd11 Unbreak arm build by removing duplicate symbols. 2007-10-18 21:44:21 +00:00
Yaroslav Tykhiy
b82b77daf3 The fork symbols aren't MD, they already live in sys/.
Found by:	version_gen.awk
Tested by:	md5(1) (libc.so hasn't changed at all)
2007-10-18 11:28:38 +00:00
Peter Grehan
b3ab87d8bf Fix build from errors exposed with recent version_gen.awk commit.
Not quite sure if this is 100% correct: awaiting review. But quieten
tinderbox in the meantime.
2007-10-18 07:23:31 +00:00
Tom McLaughlin
908556717f - Correctly define CACHED_SOCKET_PATH as /var/run/nscd after cached to
nscd renaming.

Approved by:	mux
2007-10-17 23:20:49 +00:00
Ruslan Ermilov
3be18423c1 VM_METER is long deprecated. 2007-10-16 11:29:13 +00:00
Ruslan Ermilov
bef19503d5 Rescue parts of the sensorsd commit that are still relevant:
- HW_FLOATINGPOINT renamed to HW_FLOATINGPT.
- Documented HW_REALMEM.
- Sorted as per <sys/sysctl.h>.
2007-10-16 11:22:58 +00:00
Alexander Leidinger
9f05d312b3 Backout sensors framework.
Requested by:	phk
Discussed on:	cvs-all
2007-10-15 20:00:24 +00:00
Andrey A. Chernov
4932c895e7 Add comment explaining __mb_sb_limit trick here. 2007-10-15 09:51:30 +00:00
Ruslan Ermilov
f85070adef Fix mdoc in last commit. 2007-10-14 18:57:32 +00:00
Alexander Leidinger
99f6b270e3 Import OpenBSD's sysctl hardware sensors framework.
This commit includes the following core components:

 * sample configuration file for sensorsd
 * rc(8) script and glue code for sensorsd(8)
 * sysctl(3) doc fixes for CTL_HW tree
 * sysctl(3) documentation for hardware sensors
 * sysctl(8) documentation for hardware sensors
 * support for the sensor structure for sysctl(8)
 * rc.conf(5) documentation for starting sensorsd(8)
 * sensor_attach(9) et al documentation
 * /sys/kern/kern_sensors.c
   o sensor_attach(9) API for drivers to register ksensors
   o sensor_task_register(9) API for the update task
   o sysctl(3) glue code
   o hw.sensors shadow tree for sysctl(8) internal magic
 * <sys/sensors.h>
 * HW_SENSORS definition for <sys/sysctl.h>
 * sensors display for systat(1), including documentation
 * sensorsd(8) and all applicable documentation

The userland part of the framework is entirely source-code
compatible with OpenBSD 4.1, 4.2 and  -current as of today.

All sensor readings can be viewed with `sysctl hw.sensors`,
monitored in semi-realtime with `systat -sensors` and also
logged with `sensorsd`.

Submitted by:	Constantine A. Murenin <cnst@FreeBSD.org>
Sponsored by:	Google Summer of Code 2007 (GSoC2007/cnst-sensors)
Mentored by:	syrinx
Tested by:	many
OKed by:	kensmith
Obtained from:	OpenBSD (parts)
2007-10-14 10:45:31 +00:00
Andrey A. Chernov
367ed4e13d The problem is: currently our single byte ctype(3) functions are broken
for wide characters locales in the argument range >= 0x80 - they may
return false positives.

Example 1: for UTF-8 locale we currently have:
iswspace(0xA0)==1 and isspace(0xA0)==1
(because iswspace() and isspace() are the same code)
but must have
iswspace(0xA0)==1 and isspace(0xA0)==0
(because there is no such character and all others in the range
0x80..0xff for the UTF-8 locale, it keeps ASCII only in the single byte
range because our internal wchar_t representation for UTF-8 is UCS-4).

Example 2: for all wide character locales isalpha(arg) when arg > 0xFF may
return false positives (must be 0).
(because iswalpha() and isalpha() are the same code)

This change address this issue separating single byte and wide ctype
and also fix iswascii() (currently iswascii() is broken for
arguments > 0xFF).
This change is 100% binary compatible with old binaries.

Reviewied by: i18n@
2007-10-13 16:28:22 +00:00
Daniel Eischen
b46286393c Remove symbols that should not be exported.
Submitted by:	das
MFC after re@ approval
2007-10-13 14:40:16 +00:00
Olivier Houchard
fa030de012 MFKernel: do not use __XSCALE__ to detect if clz/pld/ldrd/strd are
available, use _ARM_ARCH_5/_ARM_ARCH_5E instead.

MFC After:	3 days
2007-10-13 12:06:31 +00:00
Ruslan Ermilov
71ce49ae8d Fixed "make checkdpadd" (missing library dependencies).
Approved by:	re (kensmith)
2007-10-01 18:15:11 +00:00
Sean Farley
18dc9aca2b Add fts_set_clientptr(3), fts_get_clientptr(3) and fts_get_stream(3) man
page links to fts(3).

Approved by:	wes
Approved by:	re (hrs)
MFC after:	5 days
2007-09-28 02:22:56 +00:00
Christian Brueffer
44d9c28191 Assorted spelling, punctuation and mdoc fixes.
Approved by:	re (blanket)
2007-09-25 16:48:08 +00:00
Sean Farley
8e5b20fa9c The precision for a string argument in a call to warnx() needs to be cast
to an int to remove the warning from using a size_t variable on 64-bit
platforms.

Submitted by:	Xin LI <delphij@FreeBSD.org>
Approved by:	wes
Approved by:	re (kensmith)
2007-09-22 02:30:44 +00:00
David E. O'Brien
19774e7503 Add FreeBSD history.
Approved by:	re(ken)
2007-09-21 14:05:26 +00:00
Matteo Riondato
330e445c29 Fix some improper handling of malloc failures
PR:		bin/83344 , kern/81987
Reviewed by:	alfred
Approved by:	re (kensmith)
MFC after:	1 week
2007-09-20 22:35:24 +00:00
Gabor Kovesdan
694b0a6ba4 - Fix description to say "receive" instead of "send"
PR:		docs/115466
Submitted by:	Bruce Cran <bruce@cran.org.uk>
Approved by:	re (bmah)
2007-09-20 10:49:10 +00:00
Sean Farley
21c376969a Skip rebuilding environ in setenv() only upon reuse of an active variable;
inactive variables should cause a rebuild of environ, otherwise, exec()'d
processes will be missing a variable in environ that has been unset then
set.

Submitted by:	Taku Yamamoto <taku@tackymt.homeip.net>
Reviewed by:	ache
Approved by:	wes (mentor)
Approved by:	re (kensmith)
2007-09-15 21:48:54 +00:00
Warner Losh
09fd542e60 Use better manuals for these ntp system calls. These were replaced by
the netbsd versions, and tweaked by me with suggestions from phk.

Reviewed by: phk
Approved by: re@
2007-09-15 14:33:55 +00:00
Ruslan Ermilov
6a6c4826bc We've been able to support EVFILT_VNODE filtering on non-UFS
file systems since 2005.

Submitted by:	Igor Sysoev
Approved by:	re (bmah)
MFC after:	3 days
2007-09-07 13:10:09 +00:00
JINMEI Tatuya
e47c82ed72 ensure the head entry of addrinfo chain has non-NULL ai_canonname to be
compliant with RFC3493.

PR: standards/114910
Approved by:   ume (mentor)
Approved by:   re
MFC after:     1 week
2007-09-05 18:08:14 +00:00
David Xu
85cd8877d7 Add thr_kill2 syscall.
Submitted by: Tijl Coosemans tijl at ulyssis dot org
Approved by: re (kensmith)
2007-08-22 01:56:35 +00:00
Michael Bushkov
3e83e4a3f2 - Getipnodebyname() and getipnodebyaddr() reimplemented through
gethostbyname() and gethostbyaddr() accordingly

Approved by:	re (kensmith), brooks (mentor)
2007-07-31 16:09:41 +00:00
Randall Stewart
1b649582bb - take out a needless panic under invariants for sctp_output.c
- Fix addrs's error checking of sctp_sendx(3) when addrcnt is less than
   SCTP_SMALL_IOVEC_SIZE
 - re-add back inpcb_bind local address check bypass capability
 - Fix it so sctp_opt_info is independant of assoc_id postion.
 - Fix cookie life set to use MSEC_TO_TICKS() macro.
 - asconf changes
   o More comment changes/clarifications related to the old local address
    "not" list which is now an explicit restricted list.

   o Rename some functions for clarity:
     - sctp_add/del_local_addr_assoc to xxx_local_addr_restricted()
     - asconf related iterator functions to sctp_asconf_iterator_xxx()

   o Fix bug when the same address is deleted and added (and removed from
     the asconf queue) where the ifa is "freed" twice refcount wise,
     possibly freeing it completely.

   o Fix bug in output where the first ASCONF would not go out after the
     last address is changed (e.g. only goes out when retransmitted).

   o Fix bug where multiple ASCONFs can be bundled in the same packet with
     the and with the same serial numbers.

   o Fix asconf stcb iterator to not send ASCONF until after all work
     queue entries have been processed.

   o Change behavior so that when the last address is deleted (auto asconf
     on a bound all endpoint) no action is taken until an address is
     added; at that time, an ASCONF add+delete is sent (if the assoc
     is still up).

   o Fix local address counting so that address scoping is taken into
     account.

   o #ifdef SCTP_TIMER_BASED_ASCONF the old timer triggered sending
     of ASCONF (after an RTO).  The default now is to send
     ASCONF immediately (except for the case of changing/deleting the
     last usable address).
Approved by:	re(ken smith)@freebsd.org
2007-07-24 20:06:02 +00:00
Simon L. B. Nielsen
33e6f9c10c Set timeout for all NIS RPC requests to 1 second and not just for
yp_next as revision 1.50 did.  This should fix, or at least very much
reduce the risk of, NIS timing out due to UDP packet loss for NIS
functions.

See also revision 1.50 for more details about the general problem.

Tested by:	nosedive, freefall, hub, mx1, brooks
MFC after:	1 week
Approved by:	re (mux)
2007-07-24 13:06:08 +00:00
Sean Farley
9bab236702 Added environ-replacement detection. For programs that "clean" (i.e., su)
or replace (i.e., zdump) the environment after a call to setenv(), putenv()
or unsetenv() has been made, a few changes were made.
  - getenv() will return the value from the new environ array.
  - setenv() was split into two functions:  __setenv() which is most of the
    previous setenv() without checks on the name and setenv() which
    contains the checks before calling __setenv().
  - setenv(), putenv() and unsetenv() will unset all previous values and
    call __setenv() on all entries in the new environ array which in turn
    adds them to the end of the envVars array.  Calling __setenv() instead
    of setenv() is done to avoid the temporary replacement of the '=' in a
    string with a NUL byte.  Some strings may be read-only data.

Added more regression checks for clearing the environment array.

Replaced gettimeofday() with getrusage() in timing regression check for
better accuracy.

Fixed an off-by-one bug in __remove_putenv() in the use of memmove().  This
went unnoticed due to the allocation of double the number of environ
entries when building envVars.

Fixed a few spelling mistakes in the comments.

Reviewed by:	ache
Approved by:	wes
Approved by:	re (kensmith)
2007-07-20 23:30:13 +00:00
Christian Brueffer
e38e34dbad Take a sentence into the present by removing a reference to FreeBSD 3.0.
Approved by:	re (blanket)
MFC after:	3 days
2007-07-14 19:23:29 +00:00
Randall Stewart
b54d3a6c48 - Modular congestion control, with RFC2581 being the default.
- CMT_PF states added (w/sysctl to turn the PF version on)
- sctp_input.c had a missing incr of cookie case when the
  auth was bad. This meant a free was called without an
  increment to refcnt, added increment like rest of code.
- There was a case, unlikely, when the scope of the destination
  changed (this is a TSNH case). In that case, it would not free
  the alloc'ed asoc (in sctp_input.c).
- When listed addresses found a colliding cookie/Init, then
  the collided upon tcb was not unlocked in sctp_pcb.c
- Add error checking on arguments of sctp_sendx(3) to prevent it from
  referencing a NULL pointer.
- Fix an error return of sctp_sendx(3), it was returing
  ENOMEM not -1.
- Get assoc id was changed to use the sanctified socket api
  method for getting a assoc id (PEER_ADDR_INFO instead of
  PEER_ADDR_PARAMS).
- Fix it so a peeled off socket will get a proper error return
  if it trys to send to a different address then it is connected to.
- Fix so that select_a_stream can avoid an endless loop that
  could hang a caller.
- time_entered (state set time) was not being set in all cases
  to the time we went established.
Approved by:	re(ken smith)
2007-07-14 09:36:28 +00:00
Daniel Eischen
76390742ee Fix a typo that prevented the quad symbols from being exported
(s/SYM_MAP/SYM_MAPS/).

Reported by:	kan
Approved by:	re@ (Ken Smith)
2007-07-06 13:42:24 +00:00
Peter Wemm
0c5931043c Fix remaining syntax errors (missing semicolons)
Submitted by: Björn König <bkoenig@cs.tu-berlin.de>
Approved by: re (kensmith, followup commits)
2007-07-05 17:42:00 +00:00
Peter Wemm
db62d47f87 Add missing \ characters in PSEUDO() macro on arm. Oops.
Submitted by:  cognet
Approved by: re (kensmith)
2007-07-04 23:35:18 +00:00
Peter Wemm
4dd719bd7f Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to
call the pad-less versions of the corresponding syscalls if the running
kernel supports it.  Check kern.osreldate once per program and cache the
result to select the appropriate syscall.  This maintains userland
compatability with kernel.old's from quite a while back.

Approved by:  re (kensmith)
2007-07-04 23:27:38 +00:00