Commit graph

120194 commits

Author SHA1 Message Date
Doug Ambrisko d630a05f40 Add support to easily build FreeBSD unpacked in a chroot of another
FreeBSD machine.  To do this add the man 1 uname changes to __xuname.c
so we can override the settings it reports.  Add OSVERSION override
to getosreldate.  Finally which Makefile.inc1 to use uname -m instead
of  sysctl -n hw.machine_arch to get the arch. type.

With these change you can put a complete FreeBSD OS image into a
chroot set:
	UNAME_s=FreeBSD
	UNAME_r=4.7-RELEASE
	UNAME_v="FreeBSD $UNAME_r #1: Fri Jul 22 20:32:52 PDT 2005 fake@fake:/usr/obj/usr/src/sys/FAKE"
	UNAME_m=i386
	UNAME_p=i386
	OSVERSION=470000
on an amd64 or i386 and it just work including building ports and using
pkg_add -r etc.  The caveat for this example is that these patches
have to be applied to FreeBSD 4.7 and the uname(1) changes need to
be merged.  This also addresses issue with libtool.

This is usefull for when a build machine has been trashed for an
old release and we want to do a build on a new machine that FreeBSD
4.7 won't run on ...
2005-12-02 00:50:30 +00:00
Maksim Yevmenkin d19ff8f1d2 Add bluetooth.device.conf(5) man page
MFC after:	3 days
2005-12-02 00:17:33 +00:00
Colin Percival 6382a7be43 Make "missing dependency" errors more useful by indicating which port
is trying to depend upon the non-existent port.

Suggested by:	kris
MFC after:	3 days
2005-12-01 22:14:44 +00:00
Ruslan Ermilov ee3e1c4c08 Sync usage() with SYNOPSIS. 2005-12-01 22:03:34 +00:00
Ruslan Ermilov 855b068a9a Add -q to usage(). 2005-12-01 21:59:24 +00:00
Ruslan Ermilov 1332b4bd91 Install the mqueue.h header. 2005-12-01 21:46:01 +00:00
Philip Paeps 0ed0acce8d Preserve /etc/sysctl.conf when doing a binary update. This prevents, for
instance, the dreaded shared memory problem in PostgreSQL coming back to
haunt you after a binary update.

PR:		89817
Submitted by:	edwin
MFC after:	2 days
2005-12-01 21:39:43 +00:00
Ruslan Ermilov 6a4cb6fd25 Fix the type of "eaddr" to guarantee the required alignment.
Suggested by:	marcel
2005-12-01 21:18:04 +00:00
John Baldwin 267b051a81 - Use .fn to markup untimeout in two places it was missing.
- Reword a confusing sentence.

PR:		docs/89810
Submitted by:	Marius Nuennerich marius dot nuennerich at gmx dot net
MFC after:	3 days
2005-12-01 19:16:35 +00:00
Warner Losh fdc504a929 Tweak markup for POSIX standards. Minor wordsmithing.
Submitted by: ru@
2005-12-01 18:17:50 +00:00
Warner Losh edd94d735c Document O_NOCTTY and O_SYNC. O_NOCTTY is a nop on freebsd, while on
other systems it prevents a tty from becoming a controlling tty on the
open.  O_SYNC is the POSIX name for O_FSYNC.

The Markup Police may need to tweak my references to standards.
2005-12-01 17:54:33 +00:00
John Baldwin ef8d441925 Clarify that si(4) doesn't support the newer SX+ cards from Specialix/Perle
currently.

MFC after:	3 days
2005-12-01 17:36:39 +00:00
Warner Losh d53cdc6c43 In make buildenv, spell sh as ${SHELL}. In this case, we don't want
to hard code /bin/sh since we're forking it for the user to type
commands into.  As such, ${SHELL} is the preferred thing users type
commands into.
2005-12-01 17:08:56 +00:00
John Baldwin 38df04a76d Add MLINK for execvP(3).
PR:		docs/89783
Submitted by:	Andreas Kohn andreas at syndrom23 dot de
MFC after:	3 days
2005-12-01 15:56:05 +00:00
Joel Dahl 89a50c24d9 Make the SYNOPSIS section a bit more informative. 2005-12-01 12:58:51 +00:00
David Xu 77e718f773 1. Set timer configuration values for sysconf().
2. Set overrun limit to INT_MAX, report ERANGE error if overrun will be
   greater than INT_MAX.
2005-12-01 07:56:15 +00:00
David Xu 0f2755724b Quickly fix brokeness in revision 1.157, that change was
free()ing stack memory which causes the program to abort,
and I can no longer make buildworld.
2005-12-01 05:59:45 +00:00
Wes Peters e1b1e0baee Add another 'best quote about XML evar!' courtesy Pav Lucistnik (pav@) 2005-12-01 04:28:07 +00:00
Maxim Sobolev 4fd87db95a Fix logic error which causes <null> to be printed instead of the
actual file name in error message.

MFC After:	2 weeks
2005-12-01 03:47:01 +00:00
Ariff Abdullah 964e14b04a Add kernel module loading option for snd_atiixp(4). 2005-12-01 03:10:12 +00:00
David Xu b51d237a67 set signal queue values for sysconf(). 2005-12-01 00:25:50 +00:00
Tai-hwa Liang 9f6442eea2 Fixing yet another regression introduced in rev1.37 by preserving cs_local
pointer such that local to DOS code page conversion with combined option
'-L,-D' works again.

Reviewed by:	rodrigc
2005-12-01 00:18:48 +00:00
David Xu 045d4ae3f6 Avoid using signal 127 and 128 as RT signals, these two signals confuse
wait4 interfaces, see PR: kern/19402.
2005-11-30 23:47:31 +00:00
Maxim Sobolev 6023800194 It is unclear who is wrong and who is right, but when operating on
plain file bsdlabel(8) always writes label at a fixed offset from
its beginning (512 bytes), regardless of the sector size. At the same
time, bsdlabel geom class expects label to be available at the very
beginning of the second sector.

As a result, images prepared in userland for media with sector size
different from 512 bytes (i.e. 2k for cdroms) are not recognized by
the tasting mechanism.

Solve the problem by always looking for the label at 512-byte offset
if we can't find it at the beginning of the second sector and sector
size is not 512 bytes.
2005-11-30 22:54:41 +00:00
Maxim Sobolev b53a1cf306 Don't pass error value pointer to g_read_data(9) at all if we don't
have any use of it.

Suggested by:	pjd
2005-11-30 22:15:00 +00:00
Philip Paeps 14edf864f1 Check for altq presence during module init, and allow module to work even if
altq is not present (just disable the altq bits in that case).

PR:		89601
Submitted by:	Juraj Lutter <otis -at- sk.freebsd.org>
MFC after:	3 days
2005-11-30 21:08:04 +00:00
Max Khon 7d81571413 - match_var: do not address memory at invalid address (`len' can be greater
than strlen(var) + 1)
- ReadMakeFile: prevent `fname' memory leak
- ReadMakeFile: prevent double free (caused by double fclose) --
ParsePopInput() closes input file

Reviewed by:	harti
2005-11-30 20:38:03 +00:00
Sam Leffler f219c9d3d3 fix dynamic changes in short slottime for 11g sta mode: set the
slot time based on the rcvd capabilities, not the existing ones

Obtained from:	atheros
MFC after:	1 week
2005-11-30 19:54:41 +00:00
Maxim Sobolev 8a4a44b5aa Check for g_read_data(9) errors properly:
o The only indication of error condition is NULL value returned by
  the function;

o value pointed to by error argument is undefined in the case when
  operation completes successfully.

Discussed with: phk
2005-11-30 19:24:51 +00:00
Maxim Sobolev 6dfb88de83 Kill leading whilespace. 2005-11-30 19:07:28 +00:00
Ruslan Ermilov a90232e1f7 Teach this to create the "machine" and ${MACHINE_ARCH} (for pc98
only now) symbolic links in the kernel compile directory, rather
than relying on config(8) to do this.  (The changes to config(8)
will be committed separately.)  This is aimed towards making the
config(8) as lightweight as possible.

Idea by:	bde (all bugs are mine)
2005-11-30 18:15:06 +00:00
Ruslan Ermilov f0caeb4419 Style: use S_ISDIR() (submitted by bde@) and eq() where appropriate. 2005-11-30 17:55:49 +00:00
Ruslan Ermilov 3faffd5dae Byte copy IF_LLADDR() on stack to align it to be safe for typecasts.
Tested by:	jhb
2005-11-30 17:48:23 +00:00
Marius Strobl abffa5185a Remove superfluous bzero()'ing of the softc. 2005-11-30 16:13:49 +00:00
Marius Strobl 0b5f0b533a Remove superfluous inclusion of upa.h. 2005-11-30 16:09:10 +00:00
Gleb Smirnoff f7cea1494f If bus_dmamap_load() failed, we free the mbuf. We also need to clear
the pointer, to avoid double free on next bge_stop().
2005-11-30 12:37:07 +00:00
Yoshihiro Takahashi 54586e49a3 MFi386: revision 1.1215 (add savagedrm). 2005-11-30 11:58:01 +00:00
Bruce Evans f4b01a9edf Rearranged the polynomial evaluation to reduce dependencies, as in
k_tanf.c but with different details.

The polynomial is odd with degree 13 for tanf() and odd with degree
9 for sinf(), so the details are not very different for sinf() -- the
term with the x**11 and x**13 coefficients goes awaym and (mysteriously)
it helps to do the evaluation of w = z*z early although moving it later
was a key optimization for tanf().  The details are different but simpler
for cosf() because the polynomial is even and of lower degree.

On Athlons, for uniformly distributed args in [-2pi, 2pi], this gives
an optimization of about 4 cycles (10%) in most cases (13% for sinf()
on AXP, but 0% for cosf() with gcc-3.3 -O1 on AXP).  The best case
(sinf() with gcc-3.4 -O1 -fcaller-saves on A64) now takes 33-39 cycles
(was 37-45 cycles).  Hardware sinf takes 74-129 cycles.  Despite
being fine tuned for Athlons, the optimization is even larger on
some other arches (about 15% on ia64 (pluto2) and 20% on alpha (beast)
with gcc -O2 -fomit-frame-pointer).
2005-11-30 11:51:17 +00:00
David Xu 1f4ae9be57 Fix compiling for c++, include cdefs.h. 2005-11-30 07:26:36 +00:00
Bruce Evans 8d3b309bad Fixed cosf(x) when x is a "negative" NaNs. I broke this in rev.1.10.
cosf(x) is supposed to return something like x when x is a NaN, and
we actually fairly consistently return x-x which is normally very like
x (on i386 and and it is x if x is a quiet NaN and x with the quiet bit
set if x is a signaling NaN.  Rev.1.10 broke this by normalising x to
fabsf(x).  It's not clear if fabsf(x) is should preserve x if x is a NaN,
but it actually clears the sign bit, and other parts of the code depended
on this.

The bugs can be fixed by saving x before normalizing it, and using the
saved x only for NaNs, and using uint32_t instead of int32_t for ix
so that negative NaNs are not misclassified even if fabsf() doesn't
clear their sign bit, but gcc pessimizes the saving very well, especially
on Athlon XPs (it generates extra loads and stores, and mixes use of
the SSE and i387, and this somehow messes up pipelines).  Normalizing
x is not a very good optimization anyway, so stop doing it.  (It adds
latency to the FPU pipelines, but in previous versions it helped except
for |x| <= 3pi/4 by simplifying the integer pipelines.)  Use the same
organization as in s_sinf.c and s_tanf.c with some branches reordered.
These changes combined recover most of the performance of the unfixed
version on A64 but still lose 10% on AXP with gcc-3.4 -O1 but not with
gcc-3.3 -O1.
2005-11-30 06:47:18 +00:00
David Xu b2f92ef96b Last step to make mq_notify conform to POSIX standard, If the process
has successfully attached a notification request to the message queue
via a queue descriptor, file closing should remove the attachment.
2005-11-30 05:12:03 +00:00
Bruce Evans 908801933a Fixed the hi+lo approximation to log(2). The normal 17+24 bit decomposition
that was used doesn't work normally here, since we want to be able to
multiply `hi' by the exponent of x _exactly_, and the exponent of x has
more than 7 significant bits for most denormal x's, so the multiplication
was not always exact despite a cloned comment claiming that it was.  (The
comment is correct in the double precision case -- with the normal 33+53
bit decomposition the exponent can have 20 significant bits and the extra
bit for denormals is only the 11th.)

Fixing this had little or no effect for denormals (I think because
more precision is inherently lost for denormals than is lost by roundoff
errors in the multiplication).

The fix is to reduce the precision of the decomposition to 16+24 bits.
Due to 2 bugs in the old deomposition and numerical accidents, reducing
the precision actually increased the precision of hi+lo.  The old hi+lo
had about 39 bits instead of at least 41 like it should have had.
There were off-by-1-bit errors in each of hi and lo, apparently due
to mistranslation from the double precision hi and lo.  The correct
16 bit hi happens to give about 19 bits of precision, so the correct
hi+lo gives about 43 bits instead of at least 40.  The end result is
that expf() is now perfectly rounded (to nearest) except in 52561 cases
instead of except in 67027 cases, and the maximum error is 0.5013 ulps
instead of 0.5023 ulps.
2005-11-30 04:56:49 +00:00
David Xu 6f59c4c0cd Update conformance and history sections. 2005-11-30 04:15:44 +00:00
David Xu 400786f6bb Symlink mq_send to mq_timedsend.
Symlink mq_receive to mq_timedreceive.
2005-11-30 04:14:53 +00:00
David Xu 968cc4bd61 Add manuals for POSIX message queue. 2005-11-30 04:12:37 +00:00
Tom McLaughlin 8d98402040 Fix misspelling in Poul-Henning Kamp's email address under AUTHORS, from
pkh@ to phk@.

Approved by:	ade
2005-11-30 04:08:45 +00:00
Pyun YongHyeon b7994e3488 Add codec ID for Avance Logic ALC203 2005-11-30 01:44:22 +00:00
John Baldwin 398293a8de Fix snderr() to not leak the socket buffer lock if an error occurs in
sosend().  Robert accidentally changed the snderr() macro to jump to the
out label which assumes the lock is already released rather than the
release label which drops the lock in his previous change to sosend().
This should fix the recent panics about returning from write(2) with the
socket lock held and the most recent LOR on current@.
2005-11-29 23:07:14 +00:00
Peter Wemm 03349079fe The DEFAULTS changes caused the user specified config file to be opened
much later than before, and it is now after we do a mkdir ../compile/FILE.
As a result, if you do 'config DOESNOTEXIST', it now creates the directory
../config/DOESNOTEXIST.  It did not do that before.  If DEFAULTS does not
exist, it still fails early before any permanent changes.

This shameless hack restores the old behavior of ensuring the config file
actually exists before mkdiring its counterpart directory.

Now I can rmdir ../compile/D and it will stay dead, after my fingers keep
sabotaging me with 'config D<tab><enter>'.  (Some of my kernel names
started with D, which used to be 1-character unique and my fingers knew
this very well...)
2005-11-29 22:54:49 +00:00
Damien Bergamini 5a69e86294 Tell Rx radiotap that hardware leaves FCS at the end of the frame.
Obtained from:	NetBSD (drochner@)
2005-11-29 21:36:15 +00:00