Commit Graph

7339 Commits

Author SHA1 Message Date
trhodes
bc0dcbd0d7 Add a manual page for the ntp_adjtime syscall.
PR:		32674
Reviewed by:	phk, ru
2003-04-15 15:42:10 +00:00
tjr
670a50241e Merge in vfprintf.c rev. 1.58. 2003-04-14 12:15:59 +00:00
das
9f573509fe Fix a bug where printf was erroneously printing a decimal point for
%f and sufficiently short %g specifiers where the precision was
explicitly zero, no '#' flag was specified, and the floating point
argument was > 0 and <= 0.5.  While at it, add some comments to better
explain the relevant bits of code.

Noticed by:	Christoph Kukulies <kuku@physik.rwth-aachen.de>
2003-04-14 11:24:53 +00:00
robert
1a9e845a80 Trust the code more than the comment(s) and correct some false
statements about pointer data type sizes, which spread probably
by copy-and-paste.
2003-04-12 07:36:44 +00:00
tjr
5d84de47b9 Return "/boot/kernel/kernel" instead of "/kernel" if the sysctl() call
fails. The documentation was incorrectly updated in getbootfile.3 rev. 1.10.
2003-04-11 13:54:28 +00:00
julian
753cf80295 Catch up with the kernel. Move the current cpu indicator to the thread. 2003-04-10 17:41:40 +00:00
des
bf8e2b5c5a Brucify. 2003-04-10 10:26:18 +00:00
tjr
ec3c445963 When called with s == NULL, behave as if wc == L'\0' as required by the
standard.
2003-04-10 09:20:38 +00:00
des
858fb2e04f Correctly detect the case where a password entry was changed while we were
preparing to edit it.

PR:		bin/50563
2003-04-09 18:20:51 +00:00
des
c0cbd25b9f Apply the correct fix for bin/50679: don't mess around with process groups
or the tty, just block selected signals in the parent like system(3) does.
Many thanks to bde for his assistance in finding the correct solution.

PR:		bin/50679
2003-04-09 16:39:47 +00:00
phk
4f9e8b553b If rounding results in -epsilon device busy %, set it to zero. 2003-04-09 07:49:15 +00:00
das
b5eadb7922 /strtopx/ s/result/&result/
This is the version I *meant* to commit last week.
2003-04-09 05:58:43 +00:00
mike
ee5efe23ec o In struct prison, add an allprison linked list of prisons (protected
by allprison_mtx), a unique prison/jail identifier field, two path
  fields (pr_path for reporting and pr_root vnode instance) to store
  the chroot() point of each jail.
o Add jail_attach(2) to allow a process to bind to an existing jail.
o Add change_root() to perform the chroot operation on a specified
  vnode.
o Generalize change_dir() to accept a vnode, and move namei() calls
  to callers of change_dir().
o Add a new sysctl (security.jail.list) which is a group of
  struct xprison instances that represent a snapshot of active jails.

Reviewed by:	rwatson, tjr
2003-04-09 02:55:18 +00:00
mdodd
a35b0efc7f Sync with NetBSD.
- Bump shared library version on libusbhid.
- Retire libusbhid.h; it is called usbhid.h now.
- hid_start_parse() takes a third argument.
- hid_locate() takes a fifth argument.
- hid_report_size() order of arguments changes.
- Other changes, including formatting and whitespace.

Bump __FreeBSD_version.

This change will break all third party applications that rely on previous
FreeBSD specific behavior.
2003-04-09 01:52:49 +00:00
des
de49460d03 Band-aid for the "^C kills the editor" problem. I haven't yet found the
proper way to fix this.  The way this works is to prepend "exec " to
the editor command to eliminate the "shell in the middle" which prevents
us from properly reawakening the editor after a SIGTSTP.

PR:		bin/50679
2003-04-08 18:04:30 +00:00
des
5ccf55030b Connect the pam_chroot(8) module to the build. 2003-04-08 16:52:34 +00:00
des
a5c6a33206 Add a cwd option which specifies where to chdir(2) after the chroot(2).
When using the /home/./foo scheme, this defaults to the rhs (/foo);
otherwise it defaults to /.
2003-04-08 16:52:18 +00:00
mdodd
6a319006b2 Bump the date. 2003-04-07 22:59:12 +00:00
mdodd
2f4fdb2156 Clarify the behavior of PATH_FSTAB with regard to 'tainted' execution.
Requested by:	 ru
2003-04-07 14:21:14 +00:00
mdodd
19637eaabb - Add setfstab() and getfstab().
- Use the environment variable 'PATH_FSTAB' if set rather than the
  hardcoded '/etc/fstab' (fstab.h:_PATH_FSTAB)
2003-04-07 12:55:00 +00:00
tjr
78d1a8283a Catch up with recent vfprintf.c changes. 2003-04-07 06:36:49 +00:00
ache
29cdfaf597 __wcsconv(): free(convbuf) before returning NULL 2003-04-07 03:17:39 +00:00
das
4100b55f12 Today just isn't my day. Remove some old commented out code that snuck
into the last commit.

Noticed by:	mike
2003-04-07 01:07:48 +00:00
mdodd
e05372de68 MF NetBSD:
- Reduce diffs with NetBSD.
  - Formatting and explicit values for enum declaration.
  - Order of prototypes.
  - zero report_size in hid_clear_local()
  - errx() needs no newline
  - Don't initialie variable in declaration in hid_parse_usage_in_page().
- Use fmtcheck() in hid_usage_in_page().
2003-04-07 00:49:53 +00:00
das
844ea7c0b6 - %e conversions with precision 0 should not cause a decimal point to
be printed.
- Fix %f conversions where the number of significant digits is < expt.
  This would be a one-line change were it not for thousands separators.
  Noticed by tjr.
- Remove some unnecessary code in the parsing of precision specifiers.
2003-04-07 00:42:19 +00:00
peter
f587299aaf Sync up with kern/subr_prf.c. This adds %ll, %j, %q, %z, etc. 2003-04-06 05:25:48 +00:00
das
d48b0da08e Rework the floating point code in printf(). Significant changes:
- We used to round long double arguments to double.  Now we print
  them properly.

- Bugs involving '%F', corner cases of '#' and 'g' format
  specifiers, and the '.*' precision specifier have been
  fixed.

- Added support for the "'" specifier to print thousands' grouping
  characters in a locale-dependent manner.

- Implement the __vfprintf() side of hexadecimal floating point
  support.  All that is still needed is a routine to convert the
  mantissa to hex digits one nibble at a time in the style of ultoa().

Reviewed by:	silence on standards@
2003-04-05 22:11:42 +00:00
das
2426c787c6 Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa().
In support of this, add some MD macros to assist in converting long
doubles to the format expected by gdtoa().

Reviewed by:	silence on standards@
2003-04-05 22:10:13 +00:00
das
84ae953e0f Add missing #include to unbreak previous commit. 2003-04-05 22:08:53 +00:00
das
c54f9ac9dc Correct some buffer sizes.
- __vfprintf()'s 'buf' has never been used for floating point, so
  don't define it in terms of (incorrect) constants describing
  floating point numbers.  The actual size needed depends on
  sizeof(uintmax_t) and locale details, so I slightly overestimated.

- We don't need a 308-character buffer to store the string "308".
  With long doubles and %a we need more than three characters, though.
2003-04-05 22:03:43 +00:00
imp
c8f6c4c47b Migrate to a new way of dealing with building from old revisions of
FreeBSD.  This method attempts to centralize all the necessary hacks
or work arounds in one of two places in the tree (src/Makefile.inc1
and src/tools/build).  We build a small compatibility library
(libbuild.a) as well as selectively installing necessary include
files.  We then include this directory when building host binaries.

This removes all the past release compatibilty hacks from various
places in the tree.  We still build on tip of stable and current.  I
will work with those that want to support more, although I anticipate
it will just work.

Many thanks to ru@, obrien@ and jhb@ for providing valuable input at
various stage of implementation, as well as for working together to
positively effect a change for the better.
2003-04-05 20:30:30 +00:00
tjr
96e0986add MFp4: Link strtof.3 and strtold.3 to strtod.3. 2003-04-05 07:33:46 +00:00
mtm
ecd30e037d Zero out the struct tm supplied by the caller. Otherwise,
strange things might happen when garbage values in the struct
get passed in to localtime_r() and family.

Noticed by:	marcus
Approved by:	markm (mentor)(implicit)
2003-04-05 05:46:43 +00:00
tjr
0fa401e680 MFp4: Pentium/Athlon-optimised implementation of wcschr(). 2003-04-05 04:17:05 +00:00
phk
0de8ca39fc Use sized cast matching the sized pointer. 2003-04-04 16:59:39 +00:00
phk
1c52794ba9 Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>

Move i386/pc98 specific bits from <sys/reboot.h> to
<i386/include/bootinfo.h> as well.

Adjust includes in sys/boot accordingly.
2003-04-04 16:35:16 +00:00
das
9b4e4c2599 Fix braino in definition of isfinite().
Noticed by:	marcus
Pointy hat to:	das
2003-04-04 13:27:47 +00:00
imp
3dc2fb1b37 No need to have ifdef < FreeBSD 4.0-current in here. Remove it to
avoid false positive while searching for __FreeBSD_version abuse.
2003-04-04 04:16:06 +00:00
jake
ae0306ff52 - Pass a ucontext_t to _set_curthread. If non-NULL the new thread is set
as curthread in the new context, so that it will be set automatically when
  the thread is switched to.  This fixes a race where we'd run for a little
  while with curthread unset in _thread_start.

Reviewed by:	jeff
2003-04-03 03:34:50 +00:00
jeff
f8e699234b - Don't overrun the ldt buffer.
Submitted by:	gordan@freebsd.org
2003-04-02 22:53:52 +00:00
jake
c659dc94d4 Implement _get_curthread and _set_curthread. This is especially easy. 2003-04-02 08:15:07 +00:00
jeff
2c8f04bc3e - Define curthread as _get_curthread() and remove all direct calls to
_get_curthread().  This is similar to the kernel's curthread.  Doing
   this saves stack overhead and is more convenient to the programmer.
 - Pass the pointer to the newly created thread to _thread_init().
 - Remove _get_curthread_slow().
2003-04-02 03:05:39 +00:00
jake
02b28b9c96 Add MD makefile. 2003-04-01 23:52:24 +00:00
jake
11c54b7f91 Implement makecontext. 2003-04-01 23:28:50 +00:00
jeff
afdf14858f - Don't drop and reacquire giant in thread_suspend(). Change callers to do
this manually.  This will facilitate the unrolling of giant.
 - Don't allow giant to recurse anymore.  This should never happen.
2003-04-01 22:41:41 +00:00
jeff
1aca38cd91 - Reenable setschedparam and the prioceiling code now that the mutex code
has been restored.
2003-04-01 22:40:29 +00:00
jeff
036f97d1f2 - Restore old mutex code from libc_r. It is more standards compliant.
This was changed because originally we were blocking on the umtx and
   allowing the kernel to do the queueing.  It was decided that the
   lib should queue and start the threads in the order it decides and the
   umtx code would just be used like spinlocks.
2003-04-01 22:39:31 +00:00
ceri
67eedc0711 [1] - Document EHOSTUNREACH as a possible error
[2]	- Remove a contraction

PR:		docs/50401
Submitted by:	[1] Slaven Rezic <slaven@rezic.de>
MFC after:	1 week
2003-04-01 20:25:46 +00:00
jeff
cd171afef0 - Adjust the makefiles so we have a per architecture makefile. 2003-04-01 07:07:38 +00:00
jeff
edf5e63de2 - Spell SIGSETOR correctly. 2003-04-01 04:49:12 +00:00