David Malone [Wed, 19 May 2004 21:34:52 +0000 (21:34 +0000)]
Fix a couple of warnings:
1) Missing include for declaration of time conversion functions.
2) Avoid a couple of alignment warnings on 64 bit arches by memcpying the
things pointed to by caddrs into variables of the right type.
David Malone [Wed, 19 May 2004 20:39:22 +0000 (20:39 +0000)]
Add a man page for the kernel part of bpf. I made some edits to the
man page after Orla, so the mistakes are probably mine. Leave a
note on the door welcoming the mdoc police.
Tim Kientzle [Wed, 19 May 2004 17:09:24 +0000 (17:09 +0000)]
When combining ustar prefix and name fields, check before adding a '/'
character, as some tar implementations incorrectly include a '/' with
the prefix.
Thanks to: Divacky Roman for the UnixWare 7 tarfile that
demonstrated this issue.
Bruce Evans [Wed, 19 May 2004 16:19:11 +0000 (16:19 +0000)]
Fixed the type of fptrdiff_t. It needs to be 64 bits in theory, and in
practice too since kernel addresses are almost 2^64 higher than most
user addresses.
Bruce Evans [Wed, 19 May 2004 15:41:26 +0000 (15:41 +0000)]
Moved most of the "MI" definitions and declarations from <machine/profile.h>
to <sys/gmon.h>. Cleaned them up a little by not attempting to ifdef
for incomplete and out of date support for GUPROF in userland, as in
the sparc64 version.
Bruce Evans [Wed, 19 May 2004 14:36:38 +0000 (14:36 +0000)]
Include <sys/gmon.h> instead of <machine/profile.h> for the declaration
of kmupetext(). The declaration is misplaced in <machine/profile.h>
since it is not MD and not related to the lowest level of profiling.
It will be moved, but getting it via <sys/gmon.h> already works.
Josef Karthauser [Wed, 19 May 2004 09:18:08 +0000 (09:18 +0000)]
Allow the location of the INDEX file to specified to pkg_version.
This is particularly convenient on a cluster of machines to prevent
having to rebuild the INDEX file on each.
Tim Kientzle [Wed, 19 May 2004 06:38:38 +0000 (06:38 +0000)]
I've recently been looking at the Seventh Edition source
code available at tuhs.org, and found out that my chronology
is a bit off. In particular, Seventh Edition already used
the "linkflag" and "linkname" fields. Also, it appears that
there was no tar in Sixth Edition, contrary to what an earlier
tar.1 manpage claimed.
Tim Kientzle [Wed, 19 May 2004 06:35:47 +0000 (06:35 +0000)]
Refine the heuristic used to determine whether or not to obey
the size field for a hardlink entry. Specifically, ensure that
we do obey the size field for archives that we know are pax interchange
format archives, as required by POSIX.
Also, clarify the comment explaining why this is necessary and explain
the (very unusual) conditions under which it might fail.
Warner Losh [Wed, 19 May 2004 02:16:46 +0000 (02:16 +0000)]
Replace the lame big endian crc with wpaul's standard big endian crc
algorithm, supplied by wpaul himself. The lame one has an origin
that's been called into question, so rather than argue about that (one
could make an excellent fair use argument), replace it with better
code since that's what FreeBSD is about.
Submitted by: wpaul[1], Klaus Klein
[1] Bill called this a silly bikeshed. Maybe his is not incorrect.
Peter Wemm [Tue, 18 May 2004 22:52:32 +0000 (22:52 +0000)]
The 'call mcount' hooks that gcc inserts when profiling are in a place that
cannot handle the scratch registers being trashed. So we have to preserve
them ourselves.
Peter Wemm [Tue, 18 May 2004 22:49:15 +0000 (22:49 +0000)]
For amd64, explicitly compile mcount.po, rather than copying mcount.o. We
need to compile it with -fno-omit-frame-pointers since the mcount code
depends on that, and by default it omits them without -pg.
Tim Kientzle [Tue, 18 May 2004 18:16:30 +0000 (18:16 +0000)]
Be smarter about hardlink sizes: some tar programs write
a non-zero size but no body, some write a non-zero size and include
a body. To distinguish these cases, look for a valid tar header immediately
following a hardlink header with non-zero size.
Ken Smith [Tue, 18 May 2004 16:18:04 +0000 (16:18 +0000)]
Pressing 's' in the initial menu should result in selecting the 'Standard'
installation as far as most people are concerned but both 'Standard' and
'Select' begin with S and 'Select' is winning. This makes it so 'Select'
is not select-able using a keystroke but that is probably for the best
and the text on the screen adequately describes how to move back and forth
between 'Select' and 'Exit'.
Adapted from work by: josef@
PR: i386/37999
MFC after: 1 week
<stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN is
defined. Otherwise first including <wchar.h> and then <stdint.h> leads to no
WINT_M{AX,IN} at all.
Peter Wemm [Tue, 18 May 2004 05:14:19 +0000 (05:14 +0000)]
Remove leftover padding variables.
Convert some silent 'ignore programmer error' cases into panics
Remove 'align' field from section table (no longer needed)
Yaroslav Tykhiy [Mon, 17 May 2004 23:09:10 +0000 (23:09 +0000)]
Clarify and extend paragraphs on interoperation
of fcntl(2), flock(2), and lockf(3) advisory locks.
Add such a paragraph to the flock(2) manpage for the
sake of consistency.
Reviewed by: Cyrille Lefevre and Kirk McKusick on -arch
MFC after: 2 weeks
Tim Kientzle [Mon, 17 May 2004 22:15:49 +0000 (22:15 +0000)]
getgrent() and friends should set errno if there is an error.
Also, clarify the manpage description of when errno is set and
explain that clients should set errno=0 first if they want useful
error information.
Peter Wemm [Mon, 17 May 2004 21:24:39 +0000 (21:24 +0000)]
Since we go to the trouble of compiling the kobj ops table for each class,
and cannot handle it going away, add an explicit reference to the kobj
class inside each linker class. Without this, a class with no modules
loaded will sit with an idle refcount of 0. Loading and unloading
a module with it causes a 0->1->0 transition which frees the ops table
and causes subsequent loads using that class to explode. Normally, the
"kernel" module will remain forever loaded and prevent this happening, but
if you have more than one linker class active, only one owns the "kernel".
This finishes making modules work for kldload(8) on amd64.
Peter Wemm [Mon, 17 May 2004 21:20:23 +0000 (21:20 +0000)]
Clean up the code some more. Unify the text/data (progbits) and bss
(nobits) tables to simplify some code. Try and shorten some of the very
wide lines. Somewhere along the way, I think I fixed the memory
corruption that caused panics after going multiuser.
Peter Wemm [Mon, 17 May 2004 21:16:49 +0000 (21:16 +0000)]
Deal with REL records that have the addend embedded variable sized targets
rather than the RELA table. I dont know if bintutils will ever generate
REL records, but just in case.....
Don Lewis [Mon, 17 May 2004 20:16:40 +0000 (20:16 +0000)]
Switch from using the vnode interlock to a private mutex in fifo_open()
to avoid lock order problems when manipulating the sockets associated
with the fifo.
Minor optimization of a couple of calls to fifo_cleanup() from
fifo_open().
Joerg Wunsch [Mon, 17 May 2004 19:19:08 +0000 (19:19 +0000)]
Fix my own style(9) bugs:
. forward declare all static functions
. add a couple of redundant parens in return statements where they've
been missing
. remove the space after exit since it's a function
Joerg Wunsch [Mon, 17 May 2004 18:55:45 +0000 (18:55 +0000)]
Fix various style(9) bugs. This includes the removal of wrong
reimplementations of enodev() (for the smbread() and smbwrite()
functions), as well as fixing various errno values to conform to
errno(3).
Bruce also points out that a number of the pointer == NULL tests
are probably nonsense because the respective checks are already
done at upper layers.
Marcel Moolenaar [Mon, 17 May 2004 18:36:14 +0000 (18:36 +0000)]
Fix typo in comment. While here, end the sentence with a period and
remove the empty line between the fdc and sio devices. The empty
line suggests that the comment applies to fdc only while it applies
to all following devices and options.
Tim Kientzle [Mon, 17 May 2004 18:27:05 +0000 (18:27 +0000)]
POSIX prohibits any library function from setting errno to 0.
Correct my previous commit and add a comment to the manpage
indicating that the user must set errno to 0 if they wish to
distinguish "no such user" from "error".