Commit Graph

8755 Commits

Author SHA1 Message Date
kientzle
7cfb61a9b9 Clean up some consistent confusion between "dev" and "rdev."
Mostly, these were being used correctly even though a lot of
variables and function names were mis-named.

In the process, I found and fixed a couple of latent bugs and
added a guard against adding an archive to itself.
2004-06-27 18:38:13 +00:00
kientzle
3d735ceae4 More tweaks to implicit directory creation. Even such abominations as
a/././b/../b/../c/./../d/e/f now work correctly.  And yes, a/b and a/c
both get created in this example; if you want, you can create an
entire dir heirarchy from a tar archive with only one entry.

More tweaks to umask support: umasks are now obeyed for all objects,
not just directories; the umask used is now the one in effect at the
corresponding call to archive_read_extract(), so clients that want to
tinker with umask during extract should get the expected behavior.
2004-06-27 16:44:51 +00:00
mtm
32356d6049 Implement pthread_atfork in libthr. This is mostly from deichen's
work in libpthread.

Submitted by: Dan Nelson <dnelson@allantgroup.com>
2004-06-27 10:01:35 +00:00
mtm
b1b2cf639e In the case that the global thread list is being re-initialized after
a fork, make sure that the current thread isn't detached and freed. As
a consequence the thread should be inserted into the head of the
active list only once (in the beginning).
2004-06-27 09:53:06 +00:00
kientzle
cb03971cc7 * The mode for implicitly-created dirs is now 0777 modified by the
umask in effect when the archive is closed
* Correct a typo that broke implicit dir creation for non-directories.

Thanks to: Garret A Wollman for pointing out my umask oversight
2004-06-27 05:59:15 +00:00
kientzle
213bda712f Unify mkdirpath (used to automatically create missing parent dirs) and
read_extract_dir (which creates directories in the archive).  This
brings a number of advantages:
 * FINALLY fix the problems creating dirs ending in "/."  <sigh>
 * Missing parent dirs now get created securely, just like explicit dirs.
   (Created 0700 initially, then edited to 0755 at end of extraction.)
 * Eliminate some duplicate code and some weird special cases.

While I'm cleaning, inline the regular-file creation code as well.
2004-06-27 03:19:01 +00:00
kientzle
fc2f6ee069 Read gtar-style sparse archives.
This change also pointed out one API deficiency: the
archive_read_data_into_XXX functions were originally defined to return
the total bytes read.  This is, of course, ambiguous when dealing with
non-contiguous files.  Change it to just return a status value.
2004-06-27 01:15:31 +00:00
kan
211c1eafc9 Revert the last change. There are more 64bit platforms than amd64, and
they break due to diferent alignment restrictions.
2004-06-25 12:32:45 +00:00
kan
e14478e091 Remove the use of cast as lvalue. 2004-06-25 01:54:26 +00:00
kan
e8d7daaa93 Remove the use of cast as lvalue. GCC 3.4 isses a deprecation warning
for this now.
2004-06-25 01:16:02 +00:00
rik
d9087231a5 s/SS_CANTSENDMORE/SBS_CANTSENDMORE/ 2004-06-24 10:53:44 +00:00
marcel
b6e99841cc s/ARCH/ARCH_SUBDIR/g -- This reduces the chance of possible conflicts
with the user's environment.

Wondered why his cross-builds kept failing: marcel
2004-06-24 00:02:32 +00:00
gad
e687b8e846 Fix a test of bit-flag "P_SA" by adding parenthesis around the expression.
Submitted by:	Cyrille Lefevre
2004-06-23 21:59:56 +00:00
gad
6259da3c1d Replace a call to strncpy() with a call to strlcpy()
Submitted by:	Cyrille Lefevre
2004-06-23 21:31:43 +00:00
tjr
d04fd4700f Prefix the names of members of _RuneLocale and its sub-structures
with ``__'' to avoid polluting the namespace. This doesn't change the
documented rune interface at all, but breaks applications that accessed
_RuneLocale directly.
2004-06-23 07:01:44 +00:00
bms
d46dec63e5 Be specific about which socket properties are inherited from the original
socket upon accept(2).

PR:	docs/54995, kern/45733
2004-06-23 00:20:46 +00:00
mpp
4104a7f84f Spelling fixes. 2004-06-21 20:10:35 +00:00
mpp
98d43ce6f1 Spelling fixes. 2004-06-21 19:54:56 +00:00
mpp
02c1e0b63f Spelling fixes. 2004-06-21 19:38:25 +00:00
mpp
d32949cafe Spelling fixes. 2004-06-21 19:30:45 +00:00
mpp
1165f3c380 Spelling fixes. 2004-06-21 18:57:32 +00:00
mpp
da7008d252 PR: docs/67884
Submitted by:	Chirstopger Nehren <apeiron@comcast.net>
2004-06-21 18:24:48 +00:00
stefanf
bcffee208f Completely remove s_ilogb.S as the assembler implementation gives very little
speed improvement to none at all over the MI version.

Submitted by:	bde
2004-06-20 10:42:23 +00:00
das
2e83c4463a Uncomment some functions that we now support. 2004-06-20 10:39:09 +00:00
das
1dc40d294e Cross-reference round(3) and trunc(3) as appropriate. 2004-06-20 09:27:17 +00:00
das
59cebf2b44 Connect scalbln(), trunc(), and the associated documentation to the build. 2004-06-20 09:27:03 +00:00
das
62b8ef8dc2 Declare scalbln(), scalblnf(), trunc(), and truncf(). 2004-06-20 09:26:41 +00:00
das
a97ec37c72 Implement trunc() and truncf(). 2004-06-20 09:25:43 +00:00
das
dd81b94d1c Add trivial implementations of scalbln() and scalblnf().
These routines are specified in C99 for the sake of
architectures where an int isn't big enough to represent
the full range of floating-point exponents.  However,
even the 128-bit long double format has an exponent smaller
than 15 bits, so for all practical purposes, scalbln() and
scalblnf() are aliases for scalbn() and scalbnf(), respectively.
2004-06-20 09:25:27 +00:00
gad
bc3947b883 Fill in the some new fields 'struct kinfo_proc', namely ki_childstime,
ki_childutime, and ki_emul.  Also uses the timeradd() macro to correct
the calculation of ki_childtime.  That will correct the value returned
when ki_childtime.tv_usec > 1,000,000.

This also implements a new KERN_PROC_GID option for kvm_getprocs().
It also implements the KERN_PROC_RGID and KERN_PROC_SESSION options
which were added to sys/kern/kern_proc.c revision 1.203.

PR:		bin/65803  (a very tiny piece of the PR)
Submitted by:	Cyrille Lefevre
2004-06-19 14:08:10 +00:00
stefanf
c3b1d7dffc Document ilogb()'s return values in terms of the FP_ILOGB* macros. 2004-06-19 09:33:29 +00:00
stefanf
ac3aff3300 Return the same result as the MI version for 0.0, INFINITY and NaN.
Reviewed by:	standards@
2004-06-19 09:30:00 +00:00
stefanf
127bbb4fe3 Our MI implementation of ilogb() returns -INT_MAX for the argument 0.0 rather
than INT_MIN, so adjust FP_ILOGB0 to reflect this.  Use <machine/_limits.h> for
INT_MAX's value while there.

Reviewed by:	standards@
2004-06-19 09:25:21 +00:00
kientzle
a04c1a531b Ignore file flag bits that we don't support. In particular, this
corrects a segfault seen when archiving files from NTFS (which sets
bits in st_flags that are not documented in <sys/stat.h>.)

Thanks to: Doug Rabson
2004-06-19 04:19:27 +00:00
das
5cfbdc1d4a Memory's free, but all the world ain't a VAX anymore. Bring math.3
kicking and screaming into the 1980's.  This change converts most of
the markup from man(7) to mdoc(7) format, and I believe it removes or
updates everything that was flat out wrong.  However, much work is
still needed to sanitize the markup, improve coverage, and reduce
overlap with other manpages.  Some of the sections would better belong
in a philosophy_of_w_kahan.3 manpage, but they are informative and
remain at least as reminders of topics to cover.

Reviewed by:	doc@, trhodes@
2004-06-19 03:25:28 +00:00
kbyanc
c3dd8655c5 CLOCK_PROF and CLOCK_VIRTUAL are implemented now. 2004-06-17 23:13:38 +00:00
phk
40dd98a3bd Second half of the dev_t cleanup.
The big lines are:
	NODEV -> NULL
	NOUDEV -> NODEV
	udev_t -> dev_t
	udev2dev() -> findcdev()

Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
2004-06-17 17:16:53 +00:00
rwatson
41d29518c8 Add reference to mac_get_link() in man page, which was omitted when
mac_get_link() and mac_set_link() were added.
2004-06-17 16:08:36 +00:00
kientzle
a6a34c96e8 Always restore permissions for regular files, even if the
file already exists on disk.

Pointed out by: www/resin3 port (whose distfile contains the same file
  twice with different permissions and relies on the permissions associated
  with the second instance)
Thanks again to: Kris Kennaway
2004-06-17 03:09:06 +00:00
ume
1290261039 Rename variable name from name' to hostname'.
This is a corresponding change to bin/67994.  I'll soon commit
bin/67994 into 4-STABLE.  Actually, 5-CURRENT's getaddrinfo()
doesn't have the problem mentiond in bin/67994.  However, it is
good to be in sync variable name with 4-STABLE and KAME.

PR:		bin/67994
Submitted by:	JINMEI Tatuya <jinmei@ocean.jinmei.org>
2004-06-16 16:41:23 +00:00
julian
79f004cd9f This library has to change whenever the kernel process structure changes. 2004-06-16 00:34:31 +00:00
davidxu
682485c4b3 Avoid to touch red zone, in libpthread, ucontext may be saved by kernel's
get_mcontext, and libpthread will use signalcontext to deliver signal in
userland, it looks same as kernel's send_sig does.

Reviewed by: deischen, tjr
2004-06-15 21:46:36 +00:00
kientzle
d163cf7939 Be a little more careful about creating directories:
* Restore directories with 0700 permissions initially,
   then use the fixup pass to correct the permissions
 * Trim trailing "/" and "/." in mkdirpath()

Suggested by: Garrett Wollman
2004-06-15 07:12:04 +00:00
kbyanc
749e9ea6a2 The maximum value of iovcnt is IOV_MAX, not 16. 2004-06-15 01:24:41 +00:00
stefanf
fa309e933e Use %zu to print values with type size_t. 2004-06-14 20:55:30 +00:00
bms
012043d125 Document the location of the header file which declares the function
prototypes documented in this manual page.

PR:		bin/4459
2004-06-14 18:41:24 +00:00
bms
5ec68b5ea1 Date bump.
Requested by:	krion
2004-06-14 14:24:18 +00:00
bms
4561ab95f2 Document some return values.
PR:		bin/22198
Submitted by:	Nick Johnson (with cleanups)
2004-06-14 14:18:41 +00:00
stefanf
819398b145 Merge changes from the tzcode2004a import. Wherever possible I tried to bring
us closer to the vendor branch.

Requested by:	wollman
2004-06-14 10:31:52 +00:00
das
37428870e0 Use .Dv instead of .Li for all the RLIMIT_* constants.
Requested by:	ru
2004-06-14 01:32:40 +00:00