Commit Graph

140030 Commits

Author SHA1 Message Date
Mike Makonnen
7a711eb359 No need to display the result of enabling the ipfw sysctl if it's
successfull. Issue a warning if it fails, however.
2008-07-05 15:27:39 +00:00
Mike Makonnen
8144c9ac9b There's no need to announce that we're mounting local filesystems when
running in quiet mode since if we fail to mount any of them the boot
process gets interrupted.
2008-07-05 15:19:58 +00:00
Mike Makonnen
c5a80a7a3b Quiet down rc.d/nfsclient by not printing anything in 'quiet' mode. Instead
issue a warning of it fails to set the sysctls.
2008-07-05 15:13:21 +00:00
Robert Watson
4f7d1876d5 Introduce a new lock, hostname_mtx, and use it to synchronize access
to global hostname and domainname variables.  Where necessary, copy
to or from a stack-local buffer before performing copyin() or
copyout().  A few uses, such as in cd9660 and daemon_saver, remain
under-synchronized and will require further updates.

Correct a bug in which a failed copyin() of domainname would leave
domainname potentially corrupted.

MFC after:	3 weeks
2008-07-05 13:10:10 +00:00
Poul-Henning Kamp
e1747bd4de Two quotes too good to miss. 2008-07-05 08:54:58 +00:00
Colin Percival
a6d7fc3469 Move duplicated code from tar_mode_[cru] into archive_write.
Fix a bug I introduced 7 minutes ago: clean up properly from archive_write
if we exit the argv-handling loop due to -C not having an argument.
2008-07-05 08:10:55 +00:00
Colin Percival
d47b2ddb21 Use malloc in write_archive to allocate a 64kB buffer for holding file data
instead of using 64kB of stack space in copy_file_data and write_file_data.
2008-07-05 08:03:08 +00:00
John Birrell
3a877a1d93 Add CTF conversion to the objects compiled from generated code.
This allows DTrace scripts to access variables like 'ostype'.
2008-07-05 06:12:14 +00:00
Colin Percival
85f32b2087 Clean up write_entry by eliminating fd except in the #ifdef __linux block
where it is used. [1]

Don't leak file descriptors in write_entry_backend if archive_write_header
returns ARCHIVE_FAILED.

Found by:	Coverity Prevent [1]
2008-07-05 06:05:34 +00:00
Tim Kientzle
ba779d5afd bsdcpio is now at version 1.0.0. 2008-07-05 05:17:33 +00:00
Tim Kientzle
0d35b0da0c In -pl mode, only hardlink regular files. I need to test
other implementations, but it's clear that dirs and symlinks,
at least, shouldn't be hardlinked.
2008-07-05 05:16:23 +00:00
Tim Kientzle
2ebfcda850 Remove an unused define. 2008-07-05 05:15:07 +00:00
Colin Percival
9af6e14a8c Revert CVS revision 1.68; it is now possible for entry to be NULL at the end
of write_entry.  (This was perfectly safe, since archive_entry_free(NULL) is
a no-op, but adding the check back makes the style more consistent.)
2008-07-05 02:21:51 +00:00
Tim Kientzle
6481fd43de FreeBSD-CURRENT bsdtar is synched up with libarchive-portable 2.5.5. 2008-07-05 02:09:54 +00:00
Tim Kientzle
aec34fd22e Remove HAVE_STRUCT_STAT_ST_RDEV, as it's not used anywhere. 2008-07-05 02:09:13 +00:00
Tim Kientzle
f12440da1e Stop using the deprecated linux/ext2_fs.h. 2008-07-05 02:06:55 +00:00
Tim Kientzle
fe8c1d9768 Use %H:%M for strftime() time formatting instead of the non-portable %R. 2008-07-05 02:05:55 +00:00
Tim Kientzle
1ad4959f57 libarchive in FreeBSD-CURRENT is now synched with libarchive-portable 2.5.5. 2008-07-05 01:50:40 +00:00
Tim Kientzle
f37f4b11e4 Remove a couple of capability definitions that are never used. 2008-07-05 01:50:07 +00:00
Tim Kientzle
f5a5cfb411 When ARCHIVE_EXTRACT_PERM is requested (e.g., by "tar -p"), always
schedule a chmod() fixup for directories.  In particular, this fixes
sgid handling on systems where the sgid bit is inherited from the
parent directory (which means that the actual mode of the dir
does not match the mode used in the mkdir() system call.

It may be possible to tighten this condition a bit.  In
working through this, I also found a few other places where
it looks like we can avoid a redundant syscall or two.  I've
commented those here but not yet tried to address them.
2008-07-05 01:48:33 +00:00
Tim Kientzle
4e8f10a152 Don't use the deprecated linux/ext2_fs.h include file. 2008-07-05 01:45:31 +00:00
Rui Paulo
0fc34be4c7 Fix my previous commit. We actually should pass evaluation args in
AcpiEvaluateObject() calls, otherwise, we are not able to bring devices
back up (NULL means 0, hence always off).
While there add missing WLAN on/off support.

MFC after:	3 days
Pointy hat to:	rpaulo
2008-07-04 23:40:53 +00:00
John Baldwin
a78c3ed89c Remove the sbsh(4) driver. No one responded to requests for testing the
MPSAFE patches on current@ and stable@.  This driver also has a fundamental
issue in that it sleeps when sending commands to the card including in the
if_init/if_start routines (which can be called from interrupt context).  As
such, the driver shouldn't be working reliably even on 4.x.
2008-07-04 21:24:35 +00:00
John Baldwin
ddab19ead9 Make sbsh(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device
  hardware.
- Setup interrupt handler after ether_ifattach().
- Remove unused sbsh_watchdog() routine.
- Protect against concurrent attempts to load firmware.
2008-07-04 21:13:18 +00:00
John Baldwin
e9a31041c0 Remove the sbni(4) driver. No one responded to calls to test it on
current@ and stable@.
2008-07-04 21:06:57 +00:00
Oleksandr Tymoshenko
06a37c4203 Enqueue de-capsulated packet instead of performing direct dispatch. It's
possible to exhaust and garble stack with a packet that contains a couple
of hundreds nested encapsulation levels.

Submitted by:   Ming Fu <fming@borderware.com>
Reviewed by:    rwatson
PR:             kern/85320
2008-07-04 21:01:30 +00:00
John Baldwin
5d3f96f731 Make sbni(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device
  hardware.
- Setup interrupt handler after attaching device to network stack.
- Use device_set_desc() rather than device_quiet() plus a manual printf
  that simulates the normal probe printf.
- Axe next_sbni_unit and instead just leave room for two sbni devices for
  each bus attachment.
- Don't bzero the already-zero'd softc.
- Add a detach method to the PCI driver.
- Add a lock to protect the list of available devices used to chain
  interrupt handlers for dual port ISA cards.
- Remove unused watchdog routine.
- If if_alloc() fails, make sbni_attach() return an error rather than
  panic'ing.
- Consolidate code to free bus resources into sbni_release_resources().
- Clear IFF_DRV_RUNNING|OACTIVE in stop() routine instead of in callers.
- Let ether_ioctl() handle SIOCSIFMTU.
2008-07-04 20:53:41 +00:00
Alan Cox
6819e13eeb Correct an error in the comments for init_param3().
Discussed with: silby
2008-07-04 19:36:58 +00:00
John Baldwin
67c58e8a6e Remove the cnw(4) driver. No one responded to calls to test it on current@
and stable@.  It also is a driver for an older non-802.11 wireless PC card
that is quite slow in comparison to say, wi(4).  I know Warner wants this
driver axed as well.
2008-07-04 19:13:15 +00:00
John Baldwin
a58736493e Make cnw(4) MPSAFE:
- Add a mutex to the softc and use it to lock the softc and device hardware.
- Use a private timer to replace if_watchdog/if_timer.
- Use if_printf() rather than if_xname.
- Setup interrupt handler after ether_ifattach().
2008-07-04 19:04:07 +00:00
John Baldwin
2c6298572e Remove the oltr(4) driver. No one responded to calls for testing on
current@ and stable@ for the locking patches.  The driver can always be
revived if someone tests it.

This driver also sleeps in its if_init routine, so it likely doesn't really
work at all anyway in modern releases.
2008-07-04 18:58:53 +00:00
John Baldwin
9732d2c92a Make oltr(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device
  hardware.
- Setup interrupt handler after interface attach.
- Retire 'unit' from softc and use if_printf() instead.
- Don't frob IFF_UP in the driver.
- Use callout_() rather than timeout() and untimeout().
2008-07-04 18:27:14 +00:00
John Baldwin
94f923b69d Remove the arl(4) driver. It is reported to not work on 6.x or later
even though the driver hasn't changed since 4.x (last known working
release).
2008-07-04 18:15:36 +00:00
John Baldwin
0c036c44dd Make arl(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device
  hardware.
- Setup interrupt handler after ether_ifattach().
- Use a private timer instead of if_timer/if_watchdog.
- Retire arl_unit from the softc and use if_printf() and device_printf()
  instead.

Note that the unpatched driver in 6.x and later does not work with the
hardware, so the one person who had volunteered to test the patch wasn't
able to test it.
2008-07-04 17:48:34 +00:00
Alan Cox
0cbeb44158 Eliminate an unused declaration. (In fact, the declaration is bogus
because the variable is defined static to pmap.c on i386.)

Found by: CScout
2008-07-04 17:36:12 +00:00
Nathan Whitehorn
97a04b5e19 Add manpage for Apple BMAC ethernet driver.
Approved by:	marcel (mentor)
2008-07-04 14:51:42 +00:00
Yoshihiro Takahashi
c190805b5d Remove Japanese document. 2008-07-04 12:19:56 +00:00
Konstantin Belousov
813d71de08 The uniqdosname() function takes char[12] as it third argument.
Found by:	-fstack-protector
Reported by:	dougb
Tested by:	dougb, Rainer Hurling <rhurlin gwdg de>
MFC after:	3 days
2008-07-04 09:40:52 +00:00
Andrew Thompson
6729225f36 port % count will never be greater than LAGG_MAX_PORTS so nuke the test. 2008-07-04 05:33:58 +00:00
Marcel Moolenaar
9eda082d52 sunlabel(8) is specific to sparc64. Remove from other platforms.
use gpart(8) on all platforms.
2008-07-04 04:39:45 +00:00
Marcel Moolenaar
773c9287f5 Make sunlabel specific to sparc64. This is mostly for backward
compatibility reasons. Sun labels, with VTOC8, are handled by
gpart(8).
2008-07-04 04:33:33 +00:00
Robert Watson
59dd72d040 Remove NETISR_MPSAFE, which allows specific netisr handlers to be directly
dispatched without Giant, and add NETISR_FORCEQUEUE, which allows specific
netisr handlers to always be dispatched via a queue (deferred).  Mark the
usb and if_ppp netisr handlers as NETISR_FORCEQUEUE, and explicitly
acquire Giant in those handlers.

Previously, any netisr handler not marked NETISR_MPSAFE would necessarily
run deferred and with Giant acquired.  This change removes Giant
scaffolding from the netisr infrastructure, but NETISR_FORCEQUEUE allows
non-MPSAFE handlers to continue to force deferred dispatch so as to avoid
lock order reversals between their acqusition of Giant and any calling
context.

It is likely we will be able to remove NETISR_FORCEQUEUE once
IFF_NEEDSGIANT is removed, as non-MPSAFE usb and if_ppp drivers will no
longer be supported.

Reviewed by:	bz
MFC after:	1 month
X-MFC note:	We can't remove NETISR_MPSAFE from stable/7 for KPI reasons,
		but the rest can go back.
2008-07-04 00:21:38 +00:00
Ed Maste
7928893d83 Use bcopy instead of strlcpy in uipc_bind and unp_connect, since
soun->sun_path isn't a null-terminated string.  As UNIX(4) states, "the
terminating NUL is not part of the address."  Since strlcpy has to return
"the total length of the string [it] tried to create," it walks off the end
of soun->sun_path looking for a \0.

This reverts r105332.

Reported by:    Ryan Stone
2008-07-03 23:26:10 +00:00
David Schultz
8bb8d6397d Add regression tests for fmin{,f,l} and fmax{,f,l}.
I wrote these to test amd64 asm functions that used
maxss, maxsd, minss, and minsd, but it turns out that
those instructions don't handle NaNs and signed zero
in the same way as fmin() and fmax() are required to,
so we're stuck with the C versions for now.
2008-07-03 23:06:06 +00:00
Edwin Groothuis
fffd993df2 On 64 bit architectures, you can run 32 bit executables and the rtld can trace them, but ldd(1) doesn't know yet how to detect them:
[/] root@ed-exigent>ldd `which httpd`
    ldd: /usr/local/sbin/httpd: can't read program header
    ldd: /usr/local/sbin/httpd: not a dynamic executable

    But...

    [/] root@ed-exigent>LD_32_TRACE_LOADED_OBJECTS==1 `which httpd`
    libm.so.4 => /lib32//libm.so.4 (0x280c8000)
    libaprutil-1.so.2 => /usr/local/lib/libaprutil-1.so.2 (0x280de000)
    libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x280f2000)
    libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28110000)
    libapr-1.so.2 => /usr/local/lib/libapr-1.so.2 (0x281fd000)
    libcrypt.so.3 => /lib32//libcrypt.so.3 (0x2821d000)
    libpthread.so.2 => not found (0x0)
    libc.so.6 => /lib32//libc.so.6 (0x28235000)
    libpthread.so.2 => /usr/lib32/libpthread.so.2 (0x2830d000)

Added support in ldd(1) for the LD_32_xxx environment variables if
the architecture of the machine is >32 bits. If we ever go to 128
bit architectures this excercise will have to be repeated but thanks
to earlier commits today it will be relative simple.

PR:		bin/124906
Submitted by:	edwin
Approved by:	bde (mentor)
MFC after:	1 week
2008-07-03 22:37:51 +00:00
Edwin Groothuis
d3c1e14b41 Extract the determination of the kind of (dynamic) executable from
the main-loop into a seperate function.
Instead of using hardcoded environment variables, define them in a
lookup table.
For the rest, no functionality changes.

Approved by:	bde (mentor)
MFC after:	1 week
2008-07-03 22:30:18 +00:00
Edwin Groothuis
a0d476a986 stylify ldd.c, no functional changes.
Approved by:	bde (mentor)
MFC after:	1 week
2008-07-03 22:26:43 +00:00
Nathan Whitehorn
682d1bdb27 Fix some locking and logic bugs pointed out by jhb. These fix driver detach and speed up data transfer by nearly a factor of 2.
Approved by:	marcel (mentor)
2008-07-03 21:51:30 +00:00
Coleman Kane
9ca73354c1 Belatedly add myself to the committers graph 2008-07-03 21:45:25 +00:00
Marcel Moolenaar
a0aaa49314 bsdlabel and fdisk are obsoleted on ia64.
While here, make sure to remove any remnants of the disklabel
manpage.
2008-07-03 21:00:16 +00:00