Tim Kientzle [Sat, 21 Jun 2008 19:11:51 +0000 (19:11 +0000)]
Refactor one of the ISO extraction tests: Move the reference
file into a separate file (instead of embedding it in the C code)
and use later timestamps (timestamps too close to the Epoch fail
predictably on systems that lack timegm(), whose mktime() doesn't
support dates before the Epoch and which are running in timezones
with negative offsets from GMT). The goal here is to test the ISO
extraction, not the local platform's time support.
Tim Kientzle [Sat, 21 Jun 2008 19:06:37 +0000 (19:06 +0000)]
MfP4: Joerg Sonnenberg's extensions to the mtree support for more
complete quoting. In particular, this handles escaped newlines
and common C-style escapes.
Tim Kientzle [Sat, 21 Jun 2008 19:05:29 +0000 (19:05 +0000)]
A security-check failure here should be ARCHIVE_FAILED (cannot continue this
operation) and not ARCHIVE_WARN, since we don't actually open the file.
Both bsdtar and bsdcpio will try to copy file contents after an ARCHIVE_WARN,
which will fail loudly.
Tim Kientzle [Sat, 21 Jun 2008 17:47:56 +0000 (17:47 +0000)]
If we're using -l and can't hardlink the file because of a cross-device
link, just ignore the -l option and copy the file instead.
In particular, this should fix the COPYTREE_* macros used in the
ports infrastructure which use -l to preserve space but often get
used for cross-device copies.
Alexander Motin [Sat, 21 Jun 2008 16:22:56 +0000 (16:22 +0000)]
Add support for PORT/EPRT FTP commands in lowercase.
Use strncasecmp() instead of huge local implementation to reduce code size.
Check space presence after command/code.
Alan Cox [Fri, 20 Jun 2008 20:59:31 +0000 (20:59 +0000)]
Make preparations for increasing the size of the kernel virtual
address space on the amd64 architecture. The amd64 architecture
requires kernel code and global variables to reside in the highest 2GB
of the 64-bit virtual address space. Thus, KERNBASE cannot change.
However, KERNBASE is sometimes used as the start of the kernel virtual
address space. Henceforth, VM_MIN_KERNEL_ADDRESS should be used
instead. Since KERNBASE and VM_MIN_KERNEL_ADDRESS are still the same
address, there should be no visible effect from this change (yet).
That said, kris@ has tested crash dumps under the full patch that
increases the kernel virtual address space on amd64 to 6GB.
Warner Losh [Fri, 20 Jun 2008 16:58:15 +0000 (16:58 +0000)]
Split out the probing magic of device_probe_and_attach into
device_probe() so that it can be used by busses that may wish to do
additional processing between probe and attach.
Joerg Wunsch [Fri, 20 Jun 2008 08:39:42 +0000 (08:39 +0000)]
Make the search for sources in PATH_PORTS more accurate. I only
noticed that a "whereis -qs qemu" matched the distfiles subdir of qemu
rather than /usr/ports/emulators/qemu.
It now ignores all dot entries in /usr/ports, plus all entries
starting with a capital letter (maintenance stuff like Templates, but
also includes subdir CVS), plus /usr/ports/distfiles which is simply a
magic name in that respect.
Alan Cox [Fri, 20 Jun 2008 05:22:09 +0000 (05:22 +0000)]
Make preparations for increasing the size of the kernel virtual
address space on the amd64 architecture. The amd64 architecture
requires kernel code and global variables to reside in the highest 2GB
of the 64-bit virtual address space. Thus, KERNBASE cannot change.
However, KERNBASE is sometimes used as the start of the kernel virtual
address space. Henceforth, VM_MIN_KERNEL_ADDRESS should be used
instead. Since KERNBASE and VM_MIN_KERNEL_ADDRESS are still the same
address, there should be no visible effect from this change (yet).
Renew semaphore's pointer after wakeup since during msleep
sem_base may have been modified by destroying one of semaphores
and semptr would not be valid in this case.
Ed Schouten [Thu, 19 Jun 2008 07:30:32 +0000 (07:30 +0000)]
Remove __restrict keywords from array arguments to make GCC's -std=c99 work.
When GCC is invoked with -std=c99, the following errors are displayed when
including <spawn.h>:
/usr/include/spawn.h:69: error: static or type qualifiers in abstract declarator
/usr/include/spawn.h:69: error: static or type qualifiers in abstract declarator
/usr/include/spawn.h:72: error: static or type qualifiers in abstract declarator
/usr/include/spawn.h:72: error: static or type qualifiers in abstract declarator
We'd better remove the __restrict keywords here. The same is also done
in <regex.h>.
Submitted by: Andrzej Tobola <ato iem pw edu pl>
Reviewed by: davidxu
Approved by: philip (mentor, implicit)
Mike Makonnen [Thu, 19 Jun 2008 06:11:34 +0000 (06:11 +0000)]
Move the check for enabled knobs further down in run_rc_command() so
that bogus commands cause usage information to be printed instead of
diagnostics about enabling the knob.
John Baldwin [Wed, 18 Jun 2008 14:23:28 +0000 (14:23 +0000)]
Catch up to recentish kgdb changes:
- Use ptid_get_pid() rather than ptid_get_tid() (part of the changes to
let 'tid' work for remote kgdb).
- Add a stub kgdb_trgt_new_objfile() hook.
Weongyo Jeong [Wed, 18 Jun 2008 06:35:37 +0000 (06:35 +0000)]
handle .INF files for PCMCIA correctly that specify multiple entries in
their [Manufacturer] sections and prevent a case that NDIS_PCI_DEV_TABLE
definition was always emitted that it's only emitted once if a .INF file
is for PCI.
Marcel Moolenaar [Wed, 18 Jun 2008 01:13:34 +0000 (01:13 +0000)]
Add the set and unset verbs used to set and clear attributes for
partition entries. Implement the setunset method for the MBR
scheme to control the active flag.
Ed Schouten [Tue, 17 Jun 2008 14:05:03 +0000 (14:05 +0000)]
Don't export the unused __use_pts() routine.
The __use_pts() routine was once probably used by libutil to determine
if we are using BSD or UNIX98 style PTY device names. It doesn't seem to
be used outside grantpt.c, which means we can make it static and remove
it from the Symbol.map.
Reviewed by: cognet, kib
Approved by: philip (mentor)
David Xu [Tue, 17 Jun 2008 06:26:29 +0000 (06:26 +0000)]
Add POSIX routines called posix_spawn() and posix_spawnp(), which
can be used as replacements for exec/fork in a lot of cases. This
change also added execvpe() which allows environment variable
PATH to be used for searching executable file, it is used for
implementing posix_spawnp().
Stephan Uphoff [Mon, 16 Jun 2008 19:56:59 +0000 (19:56 +0000)]
Fix a check in SYN cache expansion (syncache_expand()) to accept packets that arrive in the receive window instead of just on the left edge of the receive window.
This is needed for correct behavior when packets are lost or reordered.
PR: kern/123950
Reviewed by: andre@, silby@
Reported by: Yahoo!, Wang Jin
MFC after: 1 week
Oliver Fromme [Mon, 16 Jun 2008 17:04:04 +0000 (17:04 +0000)]
Implement a workaround for a long-standing problem in
libi386's time(), caused by a qemu bug. The bug might
be present in other BIOSes, too.
qemu either does not simulate the AT RTC correctly or
has a broken BIOS 1A/02 implementation, and will return
an incorrect value if the RTC is read while it is being
updated.
The effect is worsened by the fact that qemu's INT 15/86
function ("wait" a.k.a. usleep) is non-implmeneted or
broken and returns immediately, causing beastie.4th to
spin in a tight loop calling the "read RTC" function
millions of times, triggering the problem quickly.
Therefore, we keep reading the BIOS value until we get
the same result twice. This change fixes beastie.4th's
countdown under qemu.
Doug Barton [Mon, 16 Jun 2008 05:48:15 +0000 (05:48 +0000)]
1. Make the BSD version of cpio the default [1]
a. The BSD version will be built and installed unless
WITHOUT_BSD_CPIO is defined.
b. The GNU version will not be built or installed unless
WITH_GNU_CPIO is defined. If this is defined, the symlink
in /usr/bin will be to the GNU version whether the BSD
version is present or not.
When these changes are MFCed the defaults should be flipped.
2. Add a knob to disable the building of GNU grep. This will
make it easier for those that want to test the BSD version in
the ports.
Randall Stewart [Sun, 15 Jun 2008 12:31:23 +0000 (12:31 +0000)]
More prep for Vimage:
- only one functino to destroy an SCTP stack sctp_finish()
- Make it so this function also arranges for any threads
created by the image to do a kthread_exit()
Tim Kientzle [Sun, 15 Jun 2008 10:45:57 +0000 (10:45 +0000)]
A number of minor corrections to the support for external compression
programs:
* Support platforms that have fork() but not vfork()
* Don't write(), select(), or poll() against closed file descriptors
Tim Kientzle [Sun, 15 Jun 2008 05:12:47 +0000 (05:12 +0000)]
Portability: We can get away with the older and better-supported
wctomb() here; we don't need wcrtomb(). In particular, this fixes
libarchive building on FreeBSD 4.
Robert Watson [Sat, 14 Jun 2008 15:17:02 +0000 (15:17 +0000)]
When NETATALK is compiled into the kernel, at_rmx.c is required regardless
of whether NETATALKDEBUG is enabled, so make building it conditional on
NETATALK instead. This problem appears to have been present from the time
that the netatalk implementation was imported.
PR: 124456
Submitted by: Nathan Whitehorn <whitehorn at wisc dot edu>
MFC after: 3 days
Ed Schouten [Sat, 14 Jun 2008 10:42:18 +0000 (10:42 +0000)]
Turn sgtty into a binary-only compatibility interface.
sgtty was the original interface to configure terminal attributes on my
UNIX-like operating systems. It has been deprecated by the POSIX termios
interface, which is implemented in almost any modern system.
An advantage of turning this into a binary compatibility interface, is
that we can now eventually remove the COMPAT_43TTY switch from kernel
configurations. This removes many ioctl()'s from the TTY layer.
While there, increase the __FreeBSD_version, which may be useful for the
people working on the Ports tree.
Randall Stewart [Sat, 14 Jun 2008 07:58:05 +0000 (07:58 +0000)]
- Macro-izes the packed declaration in all headers.
- Vimage prep - these are major restructures to move
all global variables to be accessed via a macro or two.
The variables all go into a single structure.
- Asconf address addition tweaks (add_or_del Interfaces)
- Fix rwnd calcualtion to be more conservative.
- Support SACK_IMMEDIATE flag to skip delayed sack
by demand of peer.
- Comment updates in the sack mapping calculations
- Invarients panic added.
- Pre-support for UDP tunneling (we can do this on
MAC but will need added support from UDP to
get a "pipe" of UDP packets in.
- clear trace buffer sysctl added when local tracing on.
Note the majority of this huge patch is all the vimage prep stuff :-)
Robert Watson [Fri, 13 Jun 2008 22:14:15 +0000 (22:14 +0000)]
The TrustedBSD MAC Framework named struct ipq instances 'ipq', which is the
same as the global variable defined in ip_input.c. Instead, adopt the name
'q' as found in about 1/2 of uses in ip_input.c, preventing a collision on
the name. This is non-harmful, but means that search and replace on the
global works less well (as in the virtualization work), as well as indexing
tools.