]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoHave /usr/bin/tar be a symlink to /usr/bin/gtar rather
kientzle [Fri, 4 Jun 2004 00:39:46 +0000 (00:39 +0000)]
Have /usr/bin/tar be a symlink to /usr/bin/gtar rather
than a hardlink.  This will make it easier for people
to tell which system tar they're currently using.

20 years agoOops. Forced commit to document that the previous commit
kientzle [Thu, 3 Jun 2004 23:46:09 +0000 (23:46 +0000)]
Oops.  Forced commit to document that the previous commit
also included a Makefile change:  use a symlink
/usr/bin/tar -> /usr/bin/bsdtar rather than a hardlink so that
people can more easily tell which tar they're currently using.

20 years agoStyle-istic fix to a number of #define's that were not followed by a tab...
gad [Thu, 3 Jun 2004 23:44:38 +0000 (23:44 +0000)]
Style-istic fix to a number of #define's that were not followed by a tab...

MFC after: 16 days

20 years agoPointy hat: sticky bit 't' or 'T' is shown over IXOTH bit, not IXGRP. <sigh>
kientzle [Thu, 3 Jun 2004 23:43:40 +0000 (23:43 +0000)]
Pointy hat: sticky bit 't' or 'T' is shown over IXOTH bit, not IXGRP. <sigh>

20 years agoAdd a 'D' flag that can be specified on entries in newsyslog.conf.
gad [Thu, 3 Jun 2004 23:41:49 +0000 (23:41 +0000)]
Add a 'D' flag that can be specified on entries in newsyslog.conf.
If specified, the matching log files will have the NODUMP flag set
on them after they are created.

Submitted by: Sean Eric Fagan
MFC after: 16 days

20 years agoRefactor the extraction code somewhat. In particular,
kientzle [Thu, 3 Jun 2004 23:29:47 +0000 (23:29 +0000)]
Refactor the extraction code somewhat.  In particular,
push extract data down into archive_read_extract.c and out
of the library-global archive_private.h; push dir-specific
mode/time fixup down into dir restore function; now that the
fixup list is file-local, I can use somewhat more natural
naming.

Oh, yeah, update a bunch of comments to match current reality.

20 years agoAutomatically recognize the WRAP.1C and Soekris 4801 platforms and configure
phk [Thu, 3 Jun 2004 22:37:45 +0000 (22:37 +0000)]
Automatically recognize the WRAP.1C and Soekris 4801 platforms and configure
LEDS accordingly.

20 years agoAdd new bios_string() which will hunt for a string inside a given range
phk [Thu, 3 Jun 2004 22:36:24 +0000 (22:36 +0000)]
Add new bios_string() which will hunt for a string inside a given range
of the BIOS.  This can be used for finding arbitrary magic in the BIOS
in order to recognize particular platforms.

20 years agoPlug a file descriptor leak.
brian [Thu, 3 Jun 2004 22:33:50 +0000 (22:33 +0000)]
Plug a file descriptor leak.

When sed is asked to inline-edit files, it forgets to close the temporary
file and runs out of descriptors for long command lines (assuming you reset
kern.maxfilesperproc to something sane that's less than the number of files
passed to sed).

20 years agoChange standard processing to use the newer createlog() routine
gad [Thu, 3 Jun 2004 22:26:16 +0000 (22:26 +0000)]
Change standard processing to use the newer createlog() routine
that had been written some months ago for other processing.  This
should get rid of a few subtle situations where an existing log
file would not exist (for a short time) while it is being rotated.

MFC after: 16 days

20 years agoMFi386: add ixgp device
peter [Thu, 3 Jun 2004 21:40:41 +0000 (21:40 +0000)]
MFi386: add ixgp device

20 years agoThe NatSemi (now AMD) Geode SC1100 needs special treatment here and there
phk [Thu, 3 Jun 2004 21:14:53 +0000 (21:14 +0000)]
The NatSemi (now AMD) Geode SC1100 needs special treatment here and there
because it is an embedded gadget.  Give it it's own value for the "cpu"
variable and add code to reset it lacking a keyboard controller.

20 years agoMFi386: apic intpin programming updates etc.
peter [Thu, 3 Jun 2004 20:25:05 +0000 (20:25 +0000)]
MFi386: apic intpin programming updates etc.

20 years agoMFi386: remove debug printf
peter [Thu, 3 Jun 2004 20:22:48 +0000 (20:22 +0000)]
MFi386: remove debug printf

20 years agoMove module.h include to the same place as on i386 for diff reduction.
peter [Thu, 3 Jun 2004 20:21:30 +0000 (20:21 +0000)]
Move module.h include to the same place as on i386 for diff reduction.

20 years agoMFi386: move cpu_nameclass struct next to its only consumer
peter [Thu, 3 Jun 2004 20:18:15 +0000 (20:18 +0000)]
MFi386: move cpu_nameclass struct next to its only consumer

20 years ago- Comment out NULL, NULL barrier for Unix domain sockets section as the
jhb [Thu, 3 Jun 2004 20:07:44 +0000 (20:07 +0000)]
- Comment out NULL, NULL barrier for Unix domain sockets section as the
  double NULL entries signal Witness to stop processing the array of
  order entries meaning none of the spin locks are added resulting in
  panics on boot.
- Add a missing NULL, NULL terminator to the Slip locks list to keep them
  separate from the spin locks.

20 years agoAdd __BEGIN_DECLS / __END_DECLS so this can be used in C++ code.
des [Thu, 3 Jun 2004 15:04:24 +0000 (15:04 +0000)]
Add __BEGIN_DECLS / __END_DECLS so this can be used in C++ code.

MFC after: 1 week

20 years agoPlug small memory leak.
le [Thu, 3 Jun 2004 15:04:00 +0000 (15:04 +0000)]
Plug small memory leak.

PR:             bin/67392
Submitted by:   Matthew Emmerton <matt@gsicomp.on.ca>
MFC in:         1 week

20 years agoRemove checks for curthread == NULL - it can't happen.
tjr [Thu, 3 Jun 2004 10:22:47 +0000 (10:22 +0000)]
Remove checks for curthread == NULL - it can't happen.

20 years agoFix the ordering in the description of the dlsym() lookup procedure to
roam [Thu, 3 Jun 2004 10:13:26 +0000 (10:13 +0000)]
Fix the ordering in the description of the dlsym() lookup procedure to
reflect src/libexec/rtld-elf/rtld.c rev. 1.68 - the globally-loaded
objects (RTLD_GLOBAL) are searched before the local object's DAG's.

PR: 62770
Submitted by: Kimura Fuyuki <fuyuki@nigredo.org>

20 years agoAdd missing <sys/module.h> includes currently relying on nested include
phk [Thu, 3 Jun 2004 06:10:02 +0000 (06:10 +0000)]
Add missing <sys/module.h> includes currently relying on nested include
in <sys/kernel.h>

20 years agoAdd missing <sys/module.h> instances which were shadowed by the nested
phk [Thu, 3 Jun 2004 05:58:30 +0000 (05:58 +0000)]
Add missing <sys/module.h> instances which were shadowed by the nested
include in <sys/kernel.h>

20 years agoMove the locking of the pcb into raw_output(). Organize code so
bmilekic [Thu, 3 Jun 2004 03:15:29 +0000 (03:15 +0000)]
Move the locking of the pcb into raw_output().  Organize code so
that m_prepend() is not called with possibility to wait while the
pcb lock is held.  What still needs revisiting is whether the
ripcbinfo lock is really required here.

Discussed with: rwatson

20 years agoMove TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid
tjr [Thu, 3 Jun 2004 01:47:37 +0000 (01:47 +0000)]
Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid
having to acquire sched_lock when manipulating it in lockmgr(), uiomove(),
and uiomove_fromphys().

Reviewed by: jhb

20 years agoExpand the hard-coded WITNESS lock order to include the following
rwatson [Wed, 2 Jun 2004 23:28:06 +0000 (23:28 +0000)]
Expand the hard-coded WITNESS lock order to include the following
relationships:

Sockets:    filedesc->accept->sellck
Routing:    radix node head->rtentry->ifaddr
UDP:        udp->udpinp
TCP:        tcp->tcpinp
SLIP:       slip_mtx->slip sc_mtx

Drop in a place holder section for UNIX domain sockets.  Various
sections to be expanded over the next few days.

20 years agoTypedefing an array of incomplete structs is non-standard C code.
stefanf [Wed, 2 Jun 2004 23:02:31 +0000 (23:02 +0000)]
Typedefing an array of incomplete structs is non-standard C code.

Approved by: das (mentor)

20 years agoAbstract the locking in fxp(4) a bit more by using macros for
mux [Wed, 2 Jun 2004 22:59:57 +0000 (22:59 +0000)]
Abstract the locking in fxp(4) a bit more by using macros for
mtx_assert() and mtx_owned(), as it is done in other places,
for instance proc locking.

20 years agoUse the device sysctl tree instead of rolling our own. Some of the
mux [Wed, 2 Jun 2004 22:52:18 +0000 (22:52 +0000)]
Use the device sysctl tree instead of rolling our own.  Some of the
sysctls were global (hw.fxp_rnr and hw.fxp_noflow), all of them are
now per-device.  Sample output of "sysctl dev.fxp0" with this patch,
with the standard %foo nodes removed :

dev.fxp0.int_delay: 1000
dev.fxp0.bundle_max: 6
dev.fxp0.rnr: 0
dev.fxp0.noflow: 0

20 years agoAs discussed on arch@, flatten the device sysctl tree to make it
mux [Wed, 2 Jun 2004 22:43:35 +0000 (22:43 +0000)]
As discussed on arch@, flatten the device sysctl tree to make it
more convenient to deal with.  The notion of hierarchy is however
preserved by adding a new %parent node.

20 years agomkisofs(8) is now installed by sysutils/cdrtools.
marius [Wed, 2 Jun 2004 22:21:15 +0000 (22:21 +0000)]
mkisofs(8) is now installed by sysutils/cdrtools.

This will be instantly MFC'ed.

20 years agoAdd helper functions to calculate the standard ethernet CRC in
naddy [Wed, 2 Jun 2004 21:34:14 +0000 (21:34 +0000)]
Add helper functions to calculate the standard ethernet CRC in
little/big endian fashion, so that network drivers can just reference
the standard implementation and don't have to bring their own.

As discussed on arch@.

Obtained from: NetBSD

20 years agoRemove extra semicolon.
pjd [Wed, 2 Jun 2004 21:21:10 +0000 (21:21 +0000)]
Remove extra semicolon.

Inspired by: fjoe

20 years agoo Move NEED1 macro to the top of the source file.
csjp [Wed, 2 Jun 2004 21:12:55 +0000 (21:12 +0000)]
o Move NEED1 macro to the top of the source file.

o Add sanity checking to the firewall delete operation
  which tells the user that a firewall rule
  specification is required.

The previous behaviour was to exit without reporting any
errors to the user.

Approved by: bmilekic (mentor)

20 years agoImprove help handling:
kientzle [Wed, 2 Jun 2004 21:01:27 +0000 (21:01 +0000)]
Improve help handling:
   * --help produces long help message on systems with getopt_long
   * -h with no other options also produces long help message
     (If a mode is specified, -h has its usual meaning.)

20 years agoru's mdoc(7) style police was here.
joerg [Wed, 2 Jun 2004 20:21:28 +0000 (20:21 +0000)]
ru's mdoc(7) style police was here.

Submitted by: ru

20 years ago- Remove leading zero from document date [1]
krion [Wed, 2 Jun 2004 20:15:34 +0000 (20:15 +0000)]
- Remove leading zero from document date [1]
- Remove entry which tells about periodical INDEX updates in
  the CVS repository
- Add description for fetchindex target

Requested by: ru [1]
Approved by: josef (mentor)

20 years agoAdd missing dot and newline in a message.
fjoe [Wed, 2 Jun 2004 18:45:05 +0000 (18:45 +0000)]
Add missing dot and newline in a message.

Submitted by: Igor Sysoev <is (at) rambler-co.ru>
MFC after: 3 days

20 years agoCollapse sync fib locking into normal i/o locking. The former didn't
scottl [Wed, 2 Jun 2004 18:15:48 +0000 (18:15 +0000)]
Collapse sync fib locking into normal i/o locking.  The former didn't
protect the registers so it was trivially possible for a sync command and
i/o command to fight each other and confuse the controller.  Make the
sync fib alloc/release functions inline and remove the somewhat worthless
AAC_SYNC_LOCK_FORCE flag.  Thanks to Adil Katchi for helping me to track
this down in RELENG_4.

20 years agoRemove extra semicolon.
fjoe [Wed, 2 Jun 2004 18:03:07 +0000 (18:03 +0000)]
Remove extra semicolon.

20 years agoFixed lots of 1 ULP errors caused by a broken approximation for pi/2.
bde [Wed, 2 Jun 2004 17:09:05 +0000 (17:09 +0000)]
Fixed lots of 1 ULP errors caused by a broken approximation for pi/2.
We approximate pi with more than float precision using pi_hi+pi_lo in
the usual way (pi_hi is actually spelled pi in the source code), and
expect (float)0.5*pi_lo to give the low part of the corresponding
approximation for pi/2.  However, the high part for pi/2 (pi_o_2) is
rounded to nearest, which happens to round up, while the high part for
pi was rounded down.  Thus pi_o_2+(float)0.5*pi (in infinite precision)
was a very bad approximation for pi/2 -- the low term has the wrong
sign and increases the error drom less than half an ULP to a full ULP.

This fix rounds up instead of down for pi_hi.  Consistently rounding
down instead of up should work, and is the method used in e_acosf.c
and e_asinf.c.  The reason for the difference is that we sometimes
want to return precisely pi/2 in e_atan2f.c, so it is convenient to
have a correctly rounded (to nearest) value for pi/2 in a variable.
a_acosf.c and e_asinf.c also differ in directly approximating pi/2
instead pi; they multiply by 2.0 instead of dividing by 0.5 to convert
the approximation.

These complications are not directly visible in the double precision
versions because rounding to nearest happens to round down.

20 years agodo not check super user privilege in ip6_savecontrol. It is
ume [Wed, 2 Jun 2004 15:41:18 +0000 (15:41 +0000)]
do not check super user privilege in ip6_savecontrol.  It is
meaningless and can even be harmful.

Obtained from: KAME
MFC after: 3 days

20 years ago- Bump the document date
krion [Wed, 2 Jun 2004 15:03:59 +0000 (15:03 +0000)]
- Bump the document date

Requested by: ru
Approved by: ru, josef (mentor)

20 years ago- Mention new targets from bsd.port.mk:
krion [Wed, 2 Jun 2004 14:15:35 +0000 (14:15 +0000)]
- Mention new targets from bsd.port.mk:
  * config
  * showconfig
  * rmconfig
  * describe
- Add OPTIONS description
- Word smithing

PR: docs/67342
Reviewed by: ru
Approved by: josef (mentor)

20 years agoFill the 06/02 slot.
jmz [Wed, 2 Jun 2004 12:24:34 +0000 (12:24 +0000)]
Fill the 06/02 slot.

20 years agoRemove a redundant "td = curthread" statement from profclock().
tjr [Wed, 2 Jun 2004 12:05:06 +0000 (12:05 +0000)]
Remove a redundant "td = curthread" statement from profclock().

20 years agofix typo in comment in my previous commit.
ume [Wed, 2 Jun 2004 09:58:18 +0000 (09:58 +0000)]
fix typo in comment in my previous commit.

20 years agoAdd ip6addrctl_enable and ip6_addrctl_verbose option. If
ume [Wed, 2 Jun 2004 09:39:49 +0000 (09:39 +0000)]
Add ip6addrctl_enable and ip6_addrctl_verbose option.  If
ip6addrctl_enable is set to YES, address selection policy is installed
into kernel.
If there is /etc/ip6addrctl.conf, it is used for address selection
policy.  Even if there is no /etc/ip6addrctl.conf, we install default
policy.  In this case, if ipv6_enable is set to YES, we use address
selection policy described in RFC 3484 as default.  Otherwise, we
install priority policy for IPv4 address.
The default of ip6addrctl_enable is NO for now.  However, it may
better to enable it by default.

20 years agoSome embedded platforms have no keyboard controller. Give up waiting
phk [Wed, 2 Jun 2004 09:38:32 +0000 (09:38 +0000)]
Some embedded platforms have no keyboard controller.  Give up waiting
for it to react after a timeout.

20 years agoAdd MLINKS for new API functions.
kientzle [Wed, 2 Jun 2004 08:16:21 +0000 (08:16 +0000)]
Add MLINKS for new API functions.

20 years agoRefactor read_data:
kientzle [Wed, 2 Jun 2004 08:14:43 +0000 (08:14 +0000)]
Refactor read_data:
 * New read_data_block is both sparse-file aware and uses zero-copy semantics
 * Push read_data_block down into specific formats (opens door to
   various encoded entry bodies, such as zip or gtar -S)
 * Reimplement read_data, read_data_skip, read_data_into_fd in terms
   of new read_data_block.
 * Update documentation
It's unfortunate that I couldn't just call the new interface
archive_read_data, but didn't want to upset the API that much.

20 years agoMove TDF_SA from td_flags to td_pflags (and rename it accordingly)
tjr [Wed, 2 Jun 2004 07:52:36 +0000 (07:52 +0000)]
Move TDF_SA from td_flags to td_pflags (and rename it accordingly)
so that it is no longer necessary to hold sched_lock while
manipulating it.

Reviewed by: davidxu

20 years agotypos.
phk [Wed, 2 Jun 2004 07:31:11 +0000 (07:31 +0000)]
typos.

Pointed out by: ru

20 years agoBoth "foo/" and "foo" should match "foo/bar", so strip
kientzle [Wed, 2 Jun 2004 07:23:54 +0000 (07:23 +0000)]
Both "foo/" and "foo" should match "foo/bar", so strip
trailing '/' characters on include patterns for extraction.

Pointed out by: games/quakeforge port (thanks to Kris!)

20 years agoGive du(1) a -m option to report in megabytes.
phk [Wed, 2 Jun 2004 07:09:34 +0000 (07:09 +0000)]
Give du(1) a -m option to report in megabytes.

Submitted by: Vasily Korytov <deskpot@msk.yell.ru>
PR: 66976

20 years agouse source address as a hint to determine destination address
ume [Wed, 2 Jun 2004 06:49:36 +0000 (06:49 +0000)]
use source address as a hint to determine destination address
by getipnodebyname().

20 years agoGive daemon(8) the ability to create a pid-file. Since the target program
phk [Wed, 2 Jun 2004 06:48:13 +0000 (06:48 +0000)]
Give daemon(8) the ability to create a pid-file.  Since the target program
does not know anything about the pid-file and we don't keep a babysitting
process for the task, the pid-file will linger.

Submitted by: mi
PR: 56398

20 years ago - Run sched_balance() and sched_balance_groups() from hardclock via
jeff [Wed, 2 Jun 2004 05:46:48 +0000 (05:46 +0000)]
 - Run sched_balance() and sched_balance_groups() from hardclock via
   sched_clock() rather than using callouts.  This means we no longer have to
   take the load of the callout thread into consideration while balancing and
   should make the balancing decisions simpler and more accurate.

Tested on: x86/UP, amd64/SMP

20 years agoPort a bugfix from FDLIBM 5.3. The bug really only applies to tan()
das [Wed, 2 Jun 2004 04:39:44 +0000 (04:39 +0000)]
Port a bugfix from FDLIBM 5.3.  The bug really only applies to tan()
and not tanf() because float type can't represent numbers large enough
to trigger the problem.  However, there seems to be a precedent that
the float versions of the fdlibm routines should mirror their double
counterparts.

Also update to the FDLIBM 5.3 license.

Obtained from: FDLIBM
Reviewed by: exhaustive comparison

20 years agoMerge a bugfix from FDLIBM 5.3 to ensure that the error in tan()
das [Wed, 2 Jun 2004 04:39:29 +0000 (04:39 +0000)]
Merge a bugfix from FDLIBM 5.3 to ensure that the error in tan()
is always less than 1 ulp.  Also update to the 5.3 license.

Obtained from: FDLIBM

20 years agoIntegrate accept locking from rwatson_netperf, introducing a new
rwatson [Wed, 2 Jun 2004 04:15:39 +0000 (04:15 +0000)]
Integrate accept locking from rwatson_netperf, introducing a new
global mutex, accept_mtx, which serializes access to the following
fields across all sockets:

          so_qlen          so_incqlen         so_qstate
          so_comp          so_incomp          so_list
          so_head

While providing only coarse granularity, this approach avoids lock
order issues between sockets by avoiding ownership of the fields
by a specific socket and its per-socket mutexes.

While here, rewrite soclose(), sofree(), soaccept(), and
sonewconn() to add assertions, close additional races and  address
lock order concerns.  In particular:

- Reorganize the optimistic concurrency behavior in accept1() to
  always allocate a file descriptor with falloc() so that if we do
  find a socket, we don't have to encounter the "Oh, there wasn't
  a socket" race that can occur if falloc() sleeps in the current
  code, which broke inbound accept() ordering, not to mention
  requiring backing out socket state changes in a way that raced
  with the protocol level.  We may want to add a lockless read of
  the queue state if polling of empty queues proves to be important
  to optimize.

- In accept1(), soref() the socket while holding the accept lock
  so that the socket cannot be free'd in a race with the protocol
  layer.  Likewise in netgraph equivilents of the accept1() code.

- In sonewconn(), loop waiting for the queue to be small enough to
  insert our new socket once we've committed to inserting it, or
  races can occur that cause the incomplete socket queue to
  overfill.  In the previously implementation, it was sufficient
  to simply tested once since calling soabort() didn't release
  synchronization permitting another thread to insert a socket as
  we discard a previous one.

- In soclose()/sofree()/et al, it is the responsibility of the
  caller to remove a socket from the incomplete connection queue
  before calling soabort(), which prevents soabort() from having
  to walk into the accept socket to release the socket from its
  queue, and avoids races when releasing the accept mutex to enter
  soabort(), permitting soabort() to avoid lock ordering issues
  with the caller.

- Generally cluster accept queue related operations together
  throughout these functions in order to facilitate locking.

Annotate new locking in socketvar.h.

20 years agoDistinguish cases when ncp module not loaded and when module have old
bp [Wed, 2 Jun 2004 03:41:10 +0000 (03:41 +0000)]
Distinguish cases when ncp module not loaded and when module have old
interface.

20 years agoImproved versions of the is*ch() and tolowerch() macros that I like to use.
gad [Wed, 2 Jun 2004 00:14:28 +0000 (00:14 +0000)]
Improved versions of the is*ch() and tolowerch() macros that I like to use.

20 years agoWhen rotating some "blah.log" file, make sure that a chmod and
gad [Wed, 2 Jun 2004 00:02:12 +0000 (00:02 +0000)]
When rotating some "blah.log" file, make sure that a chmod and
(if requested) a chown is done on the "blah.log.0" file.

PR: bin/67137
Submitted by: jeh
MFC after: 10 days

20 years agoRather than assert f_type==DTYPE_VNODE, conditionally perform the
rwatson [Tue, 1 Jun 2004 23:36:47 +0000 (23:36 +0000)]
Rather than assert f_type==DTYPE_VNODE, conditionally perform the
file lock release based on f_type==DTYPE_VNODE.  vn_closefile() is
used by non-vnode types as well (fifo).

20 years agoExplicitly #include <sys/module.h> in these files too (they use
wpaul [Tue, 1 Jun 2004 23:27:36 +0000 (23:27 +0000)]
Explicitly #include <sys/module.h> in these files too (they use
MODULE_DEPEND()).

20 years agoTry to change the isdigitch() macro to something that Bruce won't roll
gad [Tue, 1 Jun 2004 23:27:11 +0000 (23:27 +0000)]
Try to change the isdigitch() macro to something that Bruce won't roll
his eyes at quite so much...  (actually someone else pointed this out
to me a long time ago, but apparently I never fixed it)

20 years agoExplicitly #include <sys/module.h> instead of depending on <sys/kernel.h>
wpaul [Tue, 1 Jun 2004 23:24:17 +0000 (23:24 +0000)]
Explicitly #include <sys/module.h> instead of depending on <sys/kernel.h>
to do it for us.

20 years agoA major overhaul of the nmdm(4) driver:
phk [Tue, 1 Jun 2004 22:53:00 +0000 (22:53 +0000)]
A major overhaul of the nmdm(4) driver:

It was based on the pty(4) driver which as a tty side an a non-tty side.

Nmdm(4) seems to have inherited two symmetric sides from pty but
unfortunately they are not quite ttys.  Running a getty one one
side and tip on the other failed to produce NL->CRNL mapping for
instance.

Rip out the basically bogus cdevsw->{read,write} functions and rely
on ttyread() and ttywrite() which does the same thing.

Use taskqueue_swi_giant to run a task for either side to do what
needs to be done.  (Direct calling is not an option as it leads to
recursion.)  Trigger the task from the t_oproc and t_stop methods.

Default the ports to not ECHO.  Since we neither rate limiting nor
emulation, two ports echoing each other is a really bad idea, which
can only be properly mitigated by rate limiting, rate emulation or
intelligent detection.  Rate emulation would be a neat feature.

Ditch the modem-line emulation, if needed for some app, it needs
to be thought much more about how it interacts with the open/close
logic.

20 years agoA few more style-fixes from Bruce. The only non-cosmetic change
gad [Tue, 1 Jun 2004 22:19:16 +0000 (22:19 +0000)]
A few more style-fixes from Bruce.  The only non-cosmetic change
is to drop a call to setuid() which has not been needed for years.

Noticed by: bde

20 years agoSentences should not start with conjunctions. Change "Because"
csjp [Tue, 1 Jun 2004 20:32:44 +0000 (20:32 +0000)]
Sentences should not start with conjunctions. Change "Because"
to "Since".

Pointed out by: Ceri

20 years agoMajor overhaul of sunlabel(8).
joerg [Tue, 1 Jun 2004 20:32:36 +0000 (20:32 +0000)]
Major overhaul of sunlabel(8).

. Implement option -c, all partition sizes will be calculated
  in cylinders as opposed to sectors.  Since the Sun label is
  inherently cylinder-based, this makes the job a little easier.

. Implement option -h, print the label in `human readable'
  size/offset format.

. Implement SVR4-compatible VTOC-style elements.  They are
  fully optional, defaulting to the current behaviour where no
  VTOC-style table will be written to disk.  However, if
  desired, the full functionality of the partitioning menu of
  Solaris' format(1m) is now offered (and even more).

. When editing the label, do not loop around edit_label() where
  a new template file is generated for each turn, this used to
  be annoying in that any possible syntax error caused a
  complaint, but then the template was created anew, so the
  user had to perform all their editing again.  Rather loop
  inside edit_label(), similar to bsdlabel(8), so in case of
  errors, the user will be presented their previous template
  file again.

. If VTOC-style elements are present, the overlap checks are
  made less stringent.  Overlaps will still be warned about,
  but overlaps of `unmountable' partitions against other ones
  are no longer fatal.  That way, e. g. VxVM encapsulated
  disk labels can be fully edited in FreeBSD (but not in
  Solaris ;-).

. In print_label(), generate the editing hints only if the -e
  flag is in effect.  Additionally, print a hint about the
  total number of sectors in the (hardware) medium.

. When editing a label, allow for changing the geometry
  emulation (and textual name) by modifying the "text:" line
  on top.  That way, a more effective emulation can be
  chosen.

. When editing/reading a label, additionally allow for the
  suffixes `s' (512-byte sectors), and `c' (cylinders) in the
  partition size field.

. Finally, turn the stub man page into something that really
  explains the entire thing.

20 years ago- Add a function ioapic_program_intpin() that completely programs an I/O
jhb [Tue, 1 Jun 2004 20:28:42 +0000 (20:28 +0000)]
- Add a function ioapic_program_intpin() that completely programs an I/O
  APIC interrupt pin based on the settings in the corresponding interrupt
  source structure.
- Use ioapic_program_intpin() in place of manual frobbing of the intpin
  configuration in ioapic_program_destination() and ioapic_register().
- Use ioapic_program_intpin() to implement suspend/resume support for I/O
  APICs.

20 years agoAdd SVR4-compatible VTOC-style elements to the Sun label. The
joerg [Tue, 1 Jun 2004 20:18:25 +0000 (20:18 +0000)]
Add SVR4-compatible VTOC-style elements to the Sun label.  The
FreeBSD kernel doesn't use them but sunlabel(8) shortly will,
and both these files are used by sunlabel(8).

20 years agoAllow the pir0 device add to fail since pir0 may already exist. This should
jhb [Tue, 1 Jun 2004 19:51:29 +0000 (19:51 +0000)]
Allow the pir0 device add to fail since pir0 may already exist.  This should
fix the panics in device_set_ivars() that people were seeing on boxes with
multiple Host-PCI bridges but not using ACPI.

20 years agoFix legacy_add_child() to properly handle the case where
jhb [Tue, 1 Jun 2004 19:50:42 +0000 (19:50 +0000)]
Fix legacy_add_child() to properly handle the case where
device_add_child_ordered() fails (due to a duplicate device add for
example) and properly cleanup and return NULL.

20 years agoUse the local APIC ID rather than the ACPI Processor ID to index the array
jhb [Tue, 1 Jun 2004 19:49:38 +0000 (19:49 +0000)]
Use the local APIC ID rather than the ACPI Processor ID to index the array
of CPUs since local APIC IDs are bounded but ACPI IDs are not bounded.

20 years agoMerged from double precision case (e_pow.c 1.10: sign fixes).
bde [Tue, 1 Jun 2004 19:33:30 +0000 (19:33 +0000)]
Merged from double precision case (e_pow.c 1.10: sign fixes).

20 years agoReplace current locking comments for struct socket/struct sockbuf
rwatson [Tue, 1 Jun 2004 19:33:06 +0000 (19:33 +0000)]
Replace current locking comments for struct socket/struct sockbuf
with new ones.  Annotate constant-after-creation fields as such.  The
comments describe a number of locks that are not yet merged.

20 years agoAdd Aerospace Corporation copyrights to EUI64 support files.
brooks [Tue, 1 Jun 2004 19:30:13 +0000 (19:30 +0000)]
Add Aerospace Corporation copyrights to EUI64 support files.

Suggested by: marcel, imp

20 years agoFixed the sign of the result in some overflow and underflow cases (ones
bde [Tue, 1 Jun 2004 19:28:38 +0000 (19:28 +0000)]
Fixed the sign of the result in some overflow and underflow cases (ones
where the exponent is an odd integer and the base is negative).

Obtained from: fdlibm-5.3

Sun finally released a new version of fdlibm just a coupe of weeks
ago.  It only fixes 3 bugs (this one, another one in pow() that we
already have (rev.1.9), and one in tan().  I've learned too much about
powf() lately, so this fix was easy to merge.  The patch is not verbatim,
because our base version has many differences for portability and I
didn't like global renaming of an unrelated variable to keep it separate
from the sign variable.  This patch uses a new variable named sn for
the sign.

20 years agoFixed another precision bug in powf(). This one is in the computation
bde [Tue, 1 Jun 2004 19:03:31 +0000 (19:03 +0000)]
Fixed another precision bug in powf().  This one is in the computation
[t=p_l+p_h High].  We multiply t by lg2_h, and want the result to be
exact.  For the bogus float case of the high-low decomposition trick,
we normally discard the lowest 12 bits of the fraction for the high
part, keeping 12 bits of precision.  That was used for t here, but it
doesnt't work because for some reason we only discard the lowest 9
bits in the fraction for lg2_h.  Discard another 3 bits of the fraction
for t to compensate.

This bug gave wrong results like:

      powf(0.9999999, -2.9999995) = 1.0000002 (should be 1.0000001)
        hex values: 3F7FFFFF C03FFFFE 3F800002 3F800001

As explained in the log for the previous commit, the bug is normally
masked by doing float calculations in extra precision on i386's, but
is easily detected by ucbtest on systems that don't have accidental
extra precision.

This completes fixing all the bugs in powf() that were routinely found
by ucbtest.

20 years agoRemove unused variable.
phk [Tue, 1 Jun 2004 19:02:51 +0000 (19:02 +0000)]
Remove unused variable.

20 years agoSince I'm not ready to add the non-standard ADD_PS_LISTRESET feature,
gad [Tue, 1 Jun 2004 19:00:42 +0000 (19:00 +0000)]
Since I'm not ready to add the non-standard ADD_PS_LISTRESET feature,
remove the #ifdef for it for now.  I might add the feature for real at
some later date, there isn't much reason for the #ifdef for now.

20 years agoMake a few style-istic improvements to the previous commits.
gad [Tue, 1 Jun 2004 18:12:04 +0000 (18:12 +0000)]
Make a few style-istic improvements to the previous commits.

Noticed by: bde

20 years agoFixed 2 bugs in the computation /* t_h=ax+bp[k] High */.
bde [Tue, 1 Jun 2004 18:08:39 +0000 (18:08 +0000)]
Fixed 2 bugs in the computation /* t_h=ax+bp[k] High */.
(1) The bit for the 1.0 part of bp[k] was right shifted by 4.  This seems
    to have been caused by a typo in converting e_pow.c to e_powf.c.
(2) The lower 12 bits of ax+bp[k] were not discarded, so t_h was actually
    plain ax+bp[k].  This seems to have been caused by a logic error in
    the conversion.

These bugs gave wrong results like:

    powf(-1.1, 101.0) = -15158.703 (should be -15158.707)
      hex values: BF8CCCCD 42CA0000 C66CDAD0 C66CDAD4

Fixing (1) gives a result wrong in the opposite direction (hex C66CDAD8),
and fixing (2) gives the correct result.

ucbtest has been reporting this particular wrong result on i386 systems
with unpatched libraries for 9 years.  I finally figured out the extent
of the bugs.  On i386's they are normally hidden by extra precision.
We use the trick of representing floats as a sum of 2 floats (one much
smaller) to get extra precision in intermediate calculations without
explicitly using more than float precision.  This trick is just a
pessimization when extra precision is available naturally (as it always
is when dealing with IEEE single precision, so the float precision part
of the library is mostly misimplemented).  (1) and (2) break the trick
in different ways, except on i386's it turns out that the intermediate
calculations are done in enough precision to mask both the bugs and
the limited precision of the float variables (as far as ucbtest can
check).

ucbtest detects the bugs because it forces float precision, but this
is not a normal mode of operation so the bug normally has little effect
on i386's.

On systems that do float arithmetic in float precision, e.g., amd64's,
there is no accidental extra precision and the bugs just give wrong
results.

20 years agoAdd GIANT_REQUIRED to kqueue_close(), since kqueue currently requires
rwatson [Tue, 1 Jun 2004 18:05:41 +0000 (18:05 +0000)]
Add GIANT_REQUIRED to kqueue_close(), since kqueue currently requires
Giant.

20 years agoPush the VOP_ADVLOCK() call to release advisory locks on vnode file
rwatson [Tue, 1 Jun 2004 18:03:20 +0000 (18:03 +0000)]
Push the VOP_ADVLOCK() call to release advisory locks on vnode file
descriptors out of fdrop_locked() and into vn_closefile().  This
removes all knowledge of vnodes from fdrop_locked(), since the lock
behavior was specific to vnodes.  This also removes the specific
requirement for Giant in fdrop_locked(), it's now only required by
code that it calls into.

Add GIANT_REQUIRED to vn_closefile() since VFS requires Giant.

20 years agoFix a couple of bugs in the mbuf and packet ctors. In the latter case,
bmilekic [Tue, 1 Jun 2004 16:17:10 +0000 (16:17 +0000)]
Fix a couple of bugs in the mbuf and packet ctors.  In the latter case,
nextpkt within the m_hdr was not being initialized to NULL for
!M_PKTHDR cases.  *Maybe* this will fix weird socket buffer
inconsistency panics, but we'll see.

20 years agoCommit the correct version of the patch from last night. This fixes an
scottl [Tue, 1 Jun 2004 15:50:11 +0000 (15:50 +0000)]
Commit the correct version of the patch from last night.  This fixes an
immediate panic when doing any i/o, and it closes a completion race.

20 years agoGainfully employ the new ttyioctl in the trivial cases.
phk [Tue, 1 Jun 2004 13:49:28 +0000 (13:49 +0000)]
Gainfully employ the new ttyioctl in the trivial cases.

20 years agoIntroduce a ttyioctl() cdevsw default function.
phk [Tue, 1 Jun 2004 13:39:02 +0000 (13:39 +0000)]
Introduce a ttyioctl() cdevsw default function.

20 years agoRemoved a leftover from the previous change.
ru [Tue, 1 Jun 2004 13:15:32 +0000 (13:15 +0000)]
Removed a leftover from the previous change.

Submitted by: Gleb Smirnoff

20 years agoWhen waiting for drive to become ready, reinit the request params as they
sos [Tue, 1 Jun 2004 12:28:45 +0000 (12:28 +0000)]
When waiting for drive to become ready, reinit the request params as they
might get trashed by autosensing.

20 years agoUse the right cmd+errorcode if we are in autosense/not.
sos [Tue, 1 Jun 2004 12:26:08 +0000 (12:26 +0000)]
Use the right cmd+errorcode if we are in autosense/not.

20 years agoThere is no need to explicitly call the stop function. In all likelyhood
phk [Tue, 1 Jun 2004 11:57:15 +0000 (11:57 +0000)]
There is no need to explicitly call the stop function.  In all likelyhood
->l_close() did it and ttyclose certainly will.

20 years agoshift the four cdevsw functions for ttys to sys/conf.h and prototype
phk [Tue, 1 Jun 2004 11:56:04 +0000 (11:56 +0000)]
shift the four cdevsw functions for ttys to sys/conf.h and prototype
them with the correct typedef.

20 years agoThere is no need to explicitly call ttwakeup() and ttwwakeup() after
phk [Tue, 1 Jun 2004 11:38:06 +0000 (11:38 +0000)]
There is no need to explicitly call ttwakeup() and ttwwakeup() after
ttyclose() has been called.  It's already been done once by ttyclose,
and probably once by the line-discipline too.

20 years agoOnly set and report error if not set already.
sos [Tue, 1 Jun 2004 11:37:24 +0000 (11:37 +0000)]
Only set and report error if not set already.

20 years agoDont retry on devices that left the system.
sos [Tue, 1 Jun 2004 11:34:46 +0000 (11:34 +0000)]
Dont retry on devices that left the system.
Ignore "fake" devices that has 0x7f status.