Commit Graph

137219 Commits

Author SHA1 Message Date
Kai Wang
7a76718800 Back out previous commit. Restore Binutils ar as default. Disconnect
'BSD' ar to the build.

Requested by: 	des
2008-02-21 16:12:46 +00:00
Kai Wang
d0e2abaf12 * Connect ar(1) to the build and make it default ar. Rename GNU
binutils ar and ranlib to gar and granlib, respectively.

* Introduce a temporary variable WITH_GNUAR as a safety net.
When buildworld with -DWITH_GNUAR, GNU binutils ar and ranlib
will install as default ones and 'BSD' ar will be disabled.

* Bump __FreeBSD_version to reflect the import of 'BSD' ar(1).

Approved by:		 jkoshy (mentor)
2008-02-21 11:21:29 +00:00
Ruslan Ermilov
741ac35cd4 Remove WARNS from here and compile with default kernel flags.
Switch off those warnings that ZFS sources do not pass.
2008-02-21 11:11:06 +00:00
Ruslan Ermilov
995dc98447 Remove WARNS from here and compile with default kernel flags. 2008-02-21 11:09:59 +00:00
Kai Wang
d192f3d3c3 Import ar(1) front-end. (aka 'BSD' ar)
Reviewed by: 		jkoshy
Approved by:		jkoshy (mentor)
Tested by:		erwin (ports build test on pointyhat)
Sponsored by:		Google Summer of Code 2007
Reviewed by (earlier version): Jaakko Heinonen <jh[AT]saunalahti.fi>
Tested by (earlier version): Steve Kargl <sgk[AT]troutmask.apl.washington.edu>
Tested by (earlier version): Martin Voros <martin_voros[AT]yahoo.com>
Tested by (earlier version): swell.k[AT]gmail.com
Tested by (earlier version): joel
Tested by (earlier version): Alexey Shuvaev <shuvaev[AT]physik.uni-wuerzburg.de>
Tested by (earlier version): Arjan van Leeuwen <avleeuwen[AT]gmail.com>

Thanks to gabor@ for building ports for it.
Thanks to erwin@ and kris@ for scheduling the ports build test on pointyhat.
And thanks to many others for their feedback.
2008-02-21 10:52:31 +00:00
Greg Lehey
1dc2c6a592 Ensure that the -s flag truncates the accounting data.
This problem has only been reported on the amd64 platform.

PR:		bin/120293
Tested by:	Callum Gibson
MFC after:	2 weeks
2008-02-21 07:12:56 +00:00
Tim Kientzle
5b7a04161d Sanity-check the block size.
Thanks to: Joerg Sonnenberger
MFC after: 7 days
2008-02-21 03:21:50 +00:00
Marcel Moolenaar
043ec583dc Don't check the bpbSecPerTrack and bpbHeads fields of the BPB.
They are typically 0 on new ia64 systems. Since we don't use
either field, there's no harm in not checking.
2008-02-21 03:19:46 +00:00
Marcel Moolenaar
70d8932f66 Don't use disklabel for the MFS root. The DoFS.sh script creates
a bogus partition table and puts the file system on the whole
partition. geom_part doesn't expose the 'c' partition as it's an
artifact of the BSD label and not to be used. Secondly, gpart(8)
is the preferred tool for partitioning disks on ia64.
2008-02-21 03:16:36 +00:00
Rui Paulo
8ea0d8cff1 Add AS lookup functionality. On each hop we query a whois server to
find the corresponding AS for that IP (-a switch).
We can also choose a different whois server with the -A switch. The
default is whois.radb.net.

Obtained from:	       NetBSD
Reviewed by:	       bms, njl (mentor)
Approved by:	       njl (mentor)
2008-02-20 23:29:53 +00:00
David Malone
6f540420dd Two no-op fixes to improve corretness of syslogd code:
1) Use [AP]F_LOCAL rather than [AP]F_UNIX.
2) When copying a pipe's name, use f->f_un.f_pipe.f_pname, not f->f_un.f_fname.

PR:		20889
Submitted by:	Damieon Stark
PR:		116642
Submitted by:	Jim Pirzyk
Reviewed by:	md5
2008-02-20 21:54:41 +00:00
Scott Long
c9f892eb86 Fix a couple of locking mistakes in the ses_ioctl path.
Submitted by: Matt Jacob
2008-02-20 19:49:46 +00:00
Andrew Thompson
00620931e1 geom_lvm(4) is now known as geom_linux_lvm(4). 2008-02-20 11:32:12 +00:00
Andrew Thompson
b61033d925 Rename geom_lvm(4) to geom_linux_lvm(4).
Requested by:   des, phk
2008-02-20 11:30:49 +00:00
Andrew Thompson
764fa86761 geom_lvm(4) is now known as geom_linux_lvm(4). 2008-02-20 07:52:43 +00:00
Andrew Thompson
1669d8afc6 Rename geom_lvm(4) to geom_linux_lvm(4).
Requested by:	des, phk
2008-02-20 07:50:13 +00:00
Andrew Thompson
1332875338 Add a geom class to map Linux LVM logical volumes.
The logical disks will appear as /dev/lvm/<vol group>-<logical vol>, for
instance /dev/lvm/vg0-home. G_LINUX_LVM currently supports linear stripes with
segments on multiple physical disks. The metadata is read only, logical
volumes can not be allocated or resized.

Reviewed by:	Ivan Voras

Previously known as geom_lvm(4), rename requested by des, phk.
2008-02-20 07:45:36 +00:00
Remko Lodder
f17edc7494 Set the baudrate for if_ti.
PR:		kern/40516
Submitted by:	"Jin Guojun[VFF]" <jin at adsl-63-198-35-122 dot dsl dot snfc21 dot pacbell dot net>
Approved by:	imp (mentor, implicit for minor changes)
MFC After:	1 week
2008-02-19 20:54:42 +00:00
Bruce Evans
f21d26becb Merge cosmetic changes from e_rem_pio2.c 1.10 (convert to __FBSDID();
fix indentation and return type of __ieee754_rem_pio2()).

Remove unused variables.
2008-02-19 15:42:46 +00:00
Bruce Evans
9e9d3bc9f1 Optimize for 3pi/4 <= |x| <= 9pi/4 in much the same way as for
pi/4 <= |x| <= 3pi/4.  Use the same branch ladder as for float precision.
Remove the optimization for |x| near pi/2 and don't do it near the
multiples of pi/2 in the newly optimized range, since it requires
fairly large code to handle only relativley few cases.  Ifdef out
optimization for |x| <= pi/4 since this case can't occur because it
is done in callers.

On amd64 (A64), for cos() and sin() with uniformly distributed args,
no cache misses, some parallelism in the caller, and good but not great
CC and CFLAGS, etc., this saves about 40 cycles or 38% in the newly
optimized range, or about 27% on average across the range |x| <= 2pi
(~65 cycles for most args, while the A64 hardware fcos and fsin take
~75 cycles for half the args and 125 cycles for the other half).  The
speedup for tan() is much smaller, especially relatively.  The speedup
on i386 (A64) is slightly smaller, especially relatively.  i386 is
still much slower than amd64 here (unlike in the float case where it
is slightly faster).
2008-02-19 15:30:58 +00:00
Bruce Evans
9ce8756044 Rearrange the polynomial evaluation for better parallelism. This
saves an average of about 8 cycles or 5% on A64 (amd64 and i386 --
more in cycles but about the same percentage on i386, and more with
old versions of gcc) with good CFLAGS and some parallelism in the
caller.  As usual, it takes a couple more multiplications so it will
be slower on old machines.

Convert to __FBSDID().
2008-02-19 12:54:14 +00:00
Ruslan Ermilov
b7498df286 getopt(3) returns -1, not EOF. 2008-02-19 07:09:19 +00:00
Ruslan Ermilov
58eefce0e6 Eliminate whitespace diffs to the i386 version. 2008-02-19 06:30:49 +00:00
Tim Kientzle
b3fa7a9568 Include O_BINARY in open() calls on platforms that support it. 2008-02-19 06:10:48 +00:00
Tim Kientzle
dc4a55fdfc Another tiny, tiny step towards Windows support. No, I don't plan to
ever commit the Windows support files to FreeBSD CVS.  That would just
be wrong.
2008-02-19 06:06:13 +00:00
Tim Kientzle
54c845efb9 Someday I might forgive the standards bodies for omitting timegm().
Maybe.  In the meantime, my workarounds for trying to coax UTC without
timegm() are getting uglier and uglier.  Apparently, some systems
don't support setenv()/unsetenv(), so you can't set the TZ env var and
hope thereby to coax mktime() into generating UTC.  Without that, I
don't see a really good alternative to just giving up and converting to
localtime with mktime().  (I suppose I should research the Perl library
approach for computing an inverse function to gmtime(); that might
actually be simpler than this growing list of hacks.)
2008-02-19 06:02:01 +00:00
Tim Kientzle
334a6ee707 Simplify file type setting. 2008-02-19 05:54:24 +00:00
Tim Kientzle
4d9cfd1eb7 The test_assert() function that backs my custom assert() macro
now returns a value, which supports such convenient
constructs as:
   if (assert(NULL != foo())) {
   }

Also be careful to setlocale("C") for each new test to
avoid locale pollution.

Also a couple of minor portability enhancements.
2008-02-19 05:52:30 +00:00
Tim Kientzle
5c5430972a Portability: Since the values are fixed and the symbolic names
are only present on some platforms, just use the values directly.
2008-02-19 05:49:02 +00:00
Tim Kientzle
98ef1f2ddb Portability: Include O_BINARY if the local platform defines it. 2008-02-19 05:46:58 +00:00
Tim Kientzle
f167d4f9c3 Correct a compile error when libbz2/zlib are unavailable. 2008-02-19 05:44:59 +00:00
Tim Kientzle
ee10f0feb0 Mark a few additional functions that are/are not available on FreeBSD. 2008-02-19 05:40:28 +00:00
Tim Kientzle
75018fc592 Portability improvements:
* If the platform can't restore char nodes, block nodes, or fifos,
don't try and just return error.
  * Include O_BINARY in most open() calls (define O_BINARY to 0 if the
platform doesn't provide a definition already)
  * Refactor the ownership restore to more cleanly support platforms
that don't have any form of {l,f,}chown() call.
  * Comment a lingering issue with older Unix-like systems that allow
root to hose the filesystem.  I don't (yet) have a good solution for
this, but I expect it will require adding more redundant stat()
calls. <sigh>

MFC after: 14 days
2008-02-19 05:39:35 +00:00
Tim Kientzle
2372ae680f Allow appending to archives on block devices as well as
archives in regular files, since both are seekable.

Thanks to: Reinoud Zandijk (@netbsd.org)
2008-02-19 05:27:17 +00:00
Yaroslav Tykhiy
c6446de05d Undo the damage I did in sys/kern/vfs_mount.c #1.274 and
sbin/mount_nfs/mount_nfs.c #1.76.  Let the dragons sleep.

Requested by:	rodrigc, des
PR:		kern/120319 (welcome the bug back)
2008-02-18 20:58:57 +00:00
Paolo Pisati
c879f6ecd7 Fix display of multiple nat rules.
Bug spotted by: Luiz Otavio O Souza
PR:	120734
MFC After: 3 days
2008-02-18 20:26:34 +00:00
Marcel Moolenaar
2912059a85 Fix "warning: comparison is always false due to limited range of data type"
on platforms with unsigned chars. The comparison in question is there to
determine whether chars are unsigned or not and is based on comparing a
char, initialized to -1, for less than 0. Change the comparison to check
for geater than 0 instead...
2008-02-18 20:01:33 +00:00
Julian Elischer
0943a3b7ec Instead of using a heuristic to decide whether to display
table 'values' as IP addresses, use an explicit argument (-i).
This is a 'POLA' issue. This is a low risk change and should be MFC'd
to RELENG_6 and RELENG 7. it might be put as an errata item for 6.3.
(not sure about 6.2).

Fix suggested by: Eugene Grosbein
PR: 	120720
MFC After: 3 days
2008-02-18 19:56:09 +00:00
David Schultz
345241c5e0 Document return values better. 2008-02-18 19:02:49 +00:00
David Schultz
71c11dd528 Add tgammaf() as a simple wrapper around tgamma(). 2008-02-18 17:27:11 +00:00
Bruce Evans
be396b71c1 2 long double constants were missing L suffixes. This helped break tanl()
on !(amd64 || i386).  It gave slightly worse than double precision in some
cases.  tanl() now passes tests of 2^24 values on ia64.
2008-02-18 15:39:52 +00:00
Bruce Evans
19a9e1bb1c Fix a typo which broke k_tanl.c on !(amd64 || i386). 2008-02-18 14:09:41 +00:00
Bruce Evans
38662c9698 Inline __ieee754__rem_pio2(). With gcc4-2, this gives an average
optimization of about 10% for cos(x), sin(x) and tan(x) on
|x| < 2**19*pi/2.  We didn't do this before because __ieee754__rem_pio2()
is too large and complicated for gcc-3.3 to inline very well.  We don't
do this for float precision because it interferes with optimization
of the usual (?) case (|x| < 9pi/4) which is manually inlined for float
precision only.

This has some rough edges:
- some static data is duplicated unnecessarily.  There isn't much after
  the recent move of large tables to k_rem_pio2.c, and some static data
  is duplicated to good affect (all the data static const, so that the
  compiler can evaluate expressions like 2*pio2 at compile time and
  generate even more static data for the constant for this).
- extern inline is used (for the same reason as in previous inlining of
  k_cosf.c etc.), but C99 apparently doesn't allow extern inline
  functions with static data, and gcc will eventually warn about this.

Convert to __FBSDID().

Indent __ieee754_rem_pio2()'s declaration consistently (its style was
made inconsistent with fdlibm a while ago, so complete this).

Fix __ieee754_rem_pio2()'s return type to match its prototype.  Someone
changed too many ints to int32_t's when fixing the assumption that all
ints are int32_t's.
2008-02-18 14:02:12 +00:00
Yaroslav Tykhiy
bd20049d27 Add a work-around to make it possible again to remount
NFS root r/w.

The real solution would be to bring the whole nmount(2)
framework, including FS drivers and userland tools, into
a consistent state at last; but things should work in the
meantime, too.

Reported by:	kris
2008-02-18 10:24:47 +00:00
Yaroslav Tykhiy
37ed722f78 Add a remark on a questionable property of vfs_mergeopts(). 2008-02-18 10:10:42 +00:00
Edwin Groothuis
42d94d1358 remove Vette Dinsdag. It was on the wrong day of the week, and not really a term I'm familiar with. Of course this can happen since naming of events and happenings during Carnaval are very localized
Approved by: grog@
2008-02-18 07:09:17 +00:00
Kevin Lo
8f9872ccb3 getopt(3) returns -1, not EOF. 2008-02-18 03:19:25 +00:00
David Schultz
a84bcdcea5 Some basic regression tests for {sin,cos,tan}{,f,l}(). 2008-02-18 02:00:16 +00:00
Mike Pritchard
df2725533a Make the human readable numbers printed with the -h option a bit
more human readable by telling the human print routines to use
a smaller buffer to format the value.

This makes it so a value that was previously being printed
as 600000K will now print as 586M.
2008-02-18 01:36:40 +00:00
Yaroslav Tykhiy
a83655a35f Back out rev. 1.74 because the kernel isn't ready yet
to see NFS specific string options.
2008-02-18 00:23:28 +00:00