Tony Finch [Tue, 10 Sep 2002 20:48:44 +0000 (20:48 +0000)]
Fix tilde-expansion of the filename obtained from the "begin" line in -s
mode, and be more accurate about identifying begin lines so that spurious
ones don't have to be manually edited out, and be more forgiving about
errors so that -c mode is more useful.
Mike Barcroft [Tue, 10 Sep 2002 18:41:45 +0000 (18:41 +0000)]
Fix some style bugs:
o Space used instead of a tab after `#define' and `typedef'.
o Sentences not ended with a period.
o Unaligned function names and other spacing issues.
Robert Drehmel [Tue, 10 Sep 2002 14:48:38 +0000 (14:48 +0000)]
Add a paragraph which should clarify the separation of asterisks
and adjacent tokens in declarations.
The added text was originally a single sentence I wrote and which
was heavily modified and extended by Bruce Evans.
This clarification attempt originates from differing usage of the
'restrict' type-qualifier.
Although various documents documents dicussing the C Programming
Language put a space between an asterisk and the 'restrict' keyword,
including the C99 standard (at least the n869.txt draft) and other
ISO/IEC JTC1/SC22/WG14 documents, the IEEE Std 1003.1-2001 document
does not separate them.
Discussed with: bde
Requested by: tjr
Separation using a single space also liked by: mike
Bruce Evans [Tue, 10 Sep 2002 13:48:21 +0000 (13:48 +0000)]
Fixed namespace pollution in uma changes:
- use `struct uma_zone *' instead of uma_zone_t, so that <sys/uma.h> isn't
a prerequisite.
- don't include <sys/uma.h>.
Namespace pollution makes "opaque" types like uma_zone_t perfectly
non-opaque. Such types should never be used (see style(9)).
"Fixed" subsequently grown dependencies of this header on its own
pollution by polluting explicitly:
- include <sys/mutex.h> and its prerequisite <sys/lock.h> instead of
depending on namespace pollution 2 layers deep in <sys/uma.h>.
Bruce Evans [Tue, 10 Sep 2002 12:19:16 +0000 (12:19 +0000)]
Fixed namespace pollution in uma changes:
- use `struct uma_zone *' instead of uma_zone_t, so that <sys/uma.h> isn't
a prerequisite.
- don't include <sys/uma.h>.
Namespace pollution makes "opaque" types like uma_zone_t perfectly
non-opaque. Such types should never be used (see style(9)).
Bruce Evans [Tue, 10 Sep 2002 11:09:13 +0000 (11:09 +0000)]
vfs_syscalls.c:
Changed rename(2) to follow the letter of the POSIX spec. POSIX
requires rename() to have no effect if its args "resolve to the same
existing file". I think "file" can only reasonably be read as referring
to the inode, although the rationale and "resolve" seem to say that
sameness is at the level of (resolved) directory entries.
ext2fs_vnops.c, ufs_vnops.c:
Replaced code that gave the historical BSD behaviour of removing one
link name by checks that this code is now unreachable. This fixes
some races. All vnodes needed to be unlocked for the removal, and
locking at another level using something like IN_RENAME was not even
attempted, so it was possible for rename(x, y) to return with both x
and y removed even without any unlink(2) syscalls (one process can
remove x using rename(x, y) and another process can remove y using
rename(y, x)).
Tony Finch [Tue, 10 Sep 2002 10:54:39 +0000 (10:54 +0000)]
Remove a sentence about wrapping macro definitions in bare braces,
which became wrong after using do { } while (0) became recommended.
Move the definition of what braces are to their new first occurrence.
Warner Losh [Tue, 10 Sep 2002 06:32:18 +0000 (06:32 +0000)]
o Dike out the bogus reprobe stuff. It was getting in the way of newbus' own
reprobe code working. This bogusness was thrust upon me.
o Don't delete the device if no drivers attach. I had thrust this bogusness
upon others.
These two changes make kldload of a pccard driver work again.
Introduce notion of the package tools revision and allow to wrap all tools
included into pkg_install according to the content of /var/db/pkg_install.conf
file, which specifies version and alternative location of the tools. Format
of the said file is very simple: one line which specifies revision of the
alternative version of the tools and their location separated by space,
i.e.:
sshd didn't handle actual size of struct sockaddr correctly,
and did copy it as long as just size of struct sockaddr. So,
If connection is via IPv6, sshd didn't log hostname into utmp
correctly.
This problem occured only under FreeBSD because of our hack.
However, this is potential problem of OpenSSH-portable, and
they agreed to fix this.
Though, there is no fixed version of OpenSSH-portable available
yet, since this problem is serious for IPv6 users, I commit the
fix.
Reported by: many people
Reviewed by: current@ and stable@ (no objection)
MFC after: 3 days
Robert Drehmel [Mon, 9 Sep 2002 15:51:10 +0000 (15:51 +0000)]
- Fix iBCS2 emulation of COFF files that have multiple libraries
in their library (STYP_LIB) section.
- Attempt to make the code which calculates the next entry and
string offsets look clearer.
PR: kern/42580
Tested by: Olaf Klein <ok@adimus.de> (on 4.7-PRERELEASE)
Since from now on encap_input() also catches IPPROTO_MOBILE and IPPROTO_GRE
packets in addition to IPPROTO_IPV4 and IPPROTO_IPV6, explicitly specify
IPPROTO_IPV4 or IPPROTO_IPV6 instead of -1 when calling encap_attach().
MFC after: 28 days
(along with other if_gre changes)
- Do not swap out a process if it is in creation. The process may have no
address space yet.
- Check whether a process is a system process prior to dereferencing
its p_vmspace. Aio assumes that only the curthread switches the address
space of a system process.
Vastly decrease amount of memory comsumed in the case when we have to read
ports/INDEX, by allocating eactly amount of memory necessary for storing
each particular entry, insdead of 4K per entry (more than 7000 entries -
go figure). Memory consumption went down to some 500K from some 30M.
Tim J. Robbins [Mon, 9 Sep 2002 07:17:55 +0000 (07:17 +0000)]
Remove the typedef of wctype_t from this header; we don't support the
XSI mistake of making everything from <wctype.h> visible here.
If we did choose to support it, we could just #include <wctype.h>.
Use --fast-read mode to extract metadata from package file. Since metadata
files are located at the very beginning of the package, this patch in
conjuction with latest tar(1) --fast-mode fix greatly speeds up pkg_info(1)
operation on package files.
In the --fast-read mode send SIGTERM to decompressor once we have extracted
all files we have been asked for. This vastly improves performance of
pkg_add(1), because usually it only extract +CONTENTS file in --fast-read
mode, checks it and only then extracts full content of tarball in normal
mode. Without this patch, it have had to decompress the tarball twice,
effectively doubling consumed CPU time.
Mike Barcroft [Mon, 9 Sep 2002 05:38:05 +0000 (05:38 +0000)]
Solve the <runetype.h> pollution problem by disabling inline
optimizations when a standard has been requested, except when the
inline optimizations are also specifically requested.
Back out last commit where I moved pcn(4) off of the modules floppy back
into the install kernel. Unfortunately pcn(4) also needs mii(4) so that
would also have to added to install kernel, which will bloat it up so that it
doesn't fit on the floppy any more. Turns out we grew a lnc(4) module since
I last looked. So handle it as a kld loadable module during install rather
than have it statically compiled into the kernel.
Warner Losh [Sun, 8 Sep 2002 22:18:06 +0000 (22:18 +0000)]
Change the order that we look for free memory windows from 0 -> MAX-1
to MAX-1 -> 0. This should allow for less potential for conflict
between pccardd/pccardc and drivers. As far as I can tell no drivers
try to use window 4, so this should be a no-op for them.
John Polstra [Sun, 8 Sep 2002 19:12:02 +0000 (19:12 +0000)]
Add support for the BCM5703x chips. I do not have one of these
cards to test; however the submitter reports that this patch works
with the on-board interface on the IBM x235 server.
Submitted by: Jung-uk Kim <jkim@niksun.com>
MFC after: 1 month