Commit Graph

7234 Commits

Author SHA1 Message Date
Max Khon
be6a158e0f - MAXPATHLEN -> PATH_MAX (pass correct buffer size to readlink as well)
Requested by:		bde
2003-03-28 12:05:45 +00:00
Juli Mallett
7a51271b68 Close the disk file descriptor that is RO before trying to open the
new one, and do not fall back to the RO fd.  There was a bug here
in that the RO fd was never closed, if the RDRW open succeeded, but
this code is bogus anyway, and it breaks newfs of floppies, at least
for me, due to "Device busy."  Anything that wants to fall back is
doing something significantly odd that it should have some more complex
code on its end.
2003-03-28 01:50:11 +00:00
Max Khon
226a0f0f8b Make realpath() thread-safe. New implementation does not use chdir(2) at all.
Submitted by:	Constantin S. Svintsoff <kostik (at) iclub.nsu.ru>
2003-03-27 20:48:53 +00:00
Poul-Henning Kamp
63728c47e8 Run a revision on the OAM api.
Use prefix gctl_ systematically.
Add flag with access perms for each argument.
Add ro/rw versions of argument building functions.
General cleanup.
2003-03-27 14:35:00 +00:00
Jeff Roberson
cc3521d660 - Define a _spinunlock() function so that threading implementations may do
more complicated things than just setting the lock to 0.
 - Implement stubs for this function in libc and the two threading libraries
   that are currently in the tree.
2003-03-26 04:02:24 +00:00
Matthew N. Dodd
7db77bf0c1 Back off WARNS until I've had a chance to deal with the problems on
sparc64/alpha.
2003-03-25 17:40:00 +00:00
Matthew N. Dodd
619531d847 Fix warnings. 2003-03-25 04:29:26 +00:00
Philippe Charnier
b43dc21149 The .Fn function
The ... 2 system call
2003-03-24 16:07:19 +00:00
Philippe Charnier
9d09157a0f The .Fn function. Use .Xr where appropriate. 2003-03-24 16:05:24 +00:00
Philippe Charnier
0552350ecc The .Fn function 2003-03-24 16:02:05 +00:00
Philippe Charnier
592bb5e477 The .Nm library 2003-03-24 16:01:01 +00:00
Philippe Charnier
4cacb61823 The .Fn function
The .Fa argument
2003-03-24 15:58:53 +00:00
Philippe Charnier
0dc90c7a0d The .Fn function
The .Nm library
2003-03-24 15:56:36 +00:00
Poul-Henning Kamp
4b8938c1d5 Add marshalling functions for OAM api. 2003-03-23 10:15:02 +00:00
Andrey A. Chernov
85bebbc156 According to C99 decimal_point can't be empty 2003-03-20 08:18:55 +00:00
Andrey A. Chernov
cfcd9a45b5 According to C99 decimal_point can't be the empty string, mention it. 2003-03-20 08:13:34 +00:00
Andrey A. Chernov
befb332a6b decimal_point can't be "" according to C99, so set it to standard "."
in that case.
2003-03-20 08:05:20 +00:00
Mike Makonnen
4418f9df30 The flags passed in to _ftp_get_proxy may be null
Approved by:	des, markm (mentor)(implicit)
2003-03-19 21:39:00 +00:00
Robert Drehmel
0d74f328ae - Revamp the function _nis_initshells() to make getusershell() backed
by NIS work, like nsswitch.conf(5) promises to be able to.
   (These modifications will be fed back to NetBSD, of course)
 - In endusershell(), do not set `sl' to NULL if we know it already has
   that value.
2003-03-19 14:17:24 +00:00
Poul-Henning Kamp
ec0fa09c8c typo 2003-03-19 14:15:32 +00:00
Poul-Henning Kamp
773865de4e Further unbreak devstat: sort the index array in correct order too. 2003-03-19 14:11:14 +00:00
Robert Drehmel
916560b152 If realloc(3) fails in copyline(), do not make matters worse by
leaving without deallocating `data' thereby creating a memory leak.
2003-03-19 14:01:35 +00:00
Poul-Henning Kamp
cb3733b78d ARGH!
Pointy hat to:	phk
2003-03-18 17:05:27 +00:00
Poul-Henning Kamp
0d2fdd7850 Commit ken@' changes to this file: Bump version and append new entries
to stay backwards compatible.
2003-03-18 16:44:10 +00:00
Poul-Henning Kamp
b193011a02 Update to match reality closer. 2003-03-18 13:45:08 +00:00
Poul-Henning Kamp
36eab1f55a Add more devstat calculations, mostly filling in holes, but also adding
a couple of reqests:  DSM_BUSY_PCT and DSM_QUEUE_LENGTH.

I have no further plans for mutilating this API at this point in
time, and will update the man-page to reflect current reality as
the next thing.

Reviewed by:    ken
2003-03-18 09:57:54 +00:00
Poul-Henning Kamp
2892a228ad Use devstat instead of GEOM private statistics structure. 2003-03-18 09:53:46 +00:00
Poul-Henning Kamp
2ad2651a98 Constify arg to geom_lookupid().
Improve a diagnostic printf.
2003-03-17 08:22:48 +00:00
Poul-Henning Kamp
2082addf66 Ignore GBDE devices.
Spotted by:	Lucky Green <shamrock@cypherpunks.to>
2003-03-17 07:25:50 +00:00
David Schultz
5d907c3dd2 Make pw_edit() use /bin/sh to interpret the EDITOR environment
variable.

PR:		48748
Reviewed by:	mike (mentor)
2003-03-17 02:12:55 +00:00
Poul-Henning Kamp
16830b0cc2 And I managed to make a regression here too.
I have too many source trees :-(
2003-03-15 22:22:11 +00:00
Poul-Henning Kamp
7194d335cf Run a revision of the devstat interface:
Kernel:

Change statistics to use the *uptime() timescale (ie: relative to
boottime) rather than the UTC aligned timescale.  This makes the
device statistics code oblivious to clock steps.

Change timestamps to bintime format, they are cheaper.

Remove the "busy_count", and replace it with two counter fields:
"start_count" and "end_count", which are updated in the down and
up paths respectively.  This removes the locking constraint on
devstat.

Add a timestamp argument to devstat_start_transaction(), this will
normally be a timestamp set by the *_bio() function in bp->bio_t0.
Use this field to calculate duration of I/O operations.

Add two timestamp arguments to devstat_end_transaction(), one is
the current time, a NULL pointer means "take timestamp yourself",
the other is the timestamp of when this transaction started (see
above).

Change calculation of busy_time to operate on "the salami principle":
Only when we are idle, which we can determine by the start+end
counts being identical, do we update the "busy_from" field in the
down path.  In the up path we accumulate the timeslice in busy_time
and update busy_from.

Change the byte_* and num_* fields into two arrays: bytes[] and
operations[].

Userland:

Change the misleading "busy_time" name to be called "snap_time" and
make the time long double since that is what most users need anyway,
fill it using clock_gettime(CLOCK_MONOTONIC) to put it on the same
timescale as the kernel fields.

Change devstat_compute_etime() to operate on struct bintime.

Remove the version 2 legacy interface: the change to bintime makes
compatibility far too expensive.

Fix a bug in systat's "vm" page where boot relative busy times would
be bogus.

Bump __FreeBSD_version to 500107

Review & Collaboration by:	ken
2003-03-15 21:59:06 +00:00
David Schultz
e31c9eb10b The gdtoa import apparently hasn't caused anything or anyone to
explode, so nix the old strtod() / dtoa().  This change is part
of the gdtoa patches reviewed on standards@.
2003-03-15 09:47:05 +00:00
David Xu
5b54b0891a Backout last commit.
Requested by: jhb
2003-03-15 04:45:42 +00:00
Tim J. Robbins
564529ff1a MFp4: Pentium/Athlon-optimised implementation of wcslen(). 2003-03-14 11:01:12 +00:00
Tim J. Robbins
ce7be15190 Merge vfprintf.c revision 1.52. 2003-03-14 08:50:43 +00:00
David Schultz
3ba6b6dd9d Kludge around a bug that results from printf() assuming that
dtoa() is buggy.  The bug would cause incorrect output to be
generated when format strings such as '%5.0f' were used with
nonzero numbers whose magnitude is less than 1.

Reported by:	df(1) by way of periodic(8)
Reviewed by:	mike
2003-03-14 04:48:09 +00:00
Tim J. Robbins
15a66d2798 Unexpand RCS tag. 2003-03-14 04:46:02 +00:00
Jean-Marc Zucconi
c6aa003c0d In src/lib/libz/gzio.c the function gzprintf does not check if the
amount of bytes (supposed to be) written by vsnprintf exceeds the
size of the buffer.

PR:		bin/48844
Submitted by:	Peter A Jonsson <pj@ludd.luth.se>
Obtained from:	OpenBSD
MFC after:	1 month
2003-03-14 01:47:01 +00:00
David Xu
047a20e644 Fix a bug in rwlock. When a rwlock was locked by reader threads, a
writter thread can block reader threads to get read lock.
2003-03-14 01:02:47 +00:00
John Baldwin
8b7a975ed4 Catch up to p_tracep -> p_tracevp rename to unbreak world.
Pointy hat to:	jhb
2003-03-13 21:40:54 +00:00
David E. O'Brien
120a95cb50 Clean up the way gdtoa sources are found.
OK'ed by:	das
2003-03-13 18:55:14 +00:00
Tim J. Robbins
be074a2dd8 Document return type of wordfree() (void). Reduce the space between
struct member names and the corresponding comments so the lines don't
wrap on 80-column terminals.
2003-03-13 11:18:53 +00:00
Tim J. Robbins
542bd65fcb MFp4: Implementations of the wcstof() and wcstold() functions. 2003-03-13 06:29:53 +00:00
Tim J. Robbins
48755f216d MFp4: Catch up to recent __dtoa() interface changes and removal of cvt()'s
last argument.
2003-03-13 05:49:09 +00:00
David Schultz
703d65601d Document strtof() and strtold(). Update vendor license.
Reviewed by:	bde (briefly), mike (mentor), obrien
2003-03-12 20:31:05 +00:00
David Schultz
6a66acb565 Replace our ancient dtoa/strtod implementation with the gdtoa
package, a more recent, generalized set of routines.  Among the
changes:
- Declare strtof() and strtold() in stdlib.h.
- Add glue to libc to support these routines for all kinds
  of ``long double''.
- Update printf() to reflect the fact that dtoa works slightly
  differently now.

As soon as I see that nothing has blown up, I will kill
src/lib/libc/stdlib/strtod.c.  Soon printf() will be able
to use the new routines to output long doubles without loss
of precision, but numerous bugs in the existing code must
be addressed first.

Reviewed by:	bde (briefly), mike (mentor), obrien
2003-03-12 20:30:00 +00:00
Mike Makonnen
fe71e0b83d Ditch a static global and the mutex that protected it. Achieve the
desired strptime(3) reentrancy by adding an extra argument to _strptime()
instead.

Approved by:	markm (mentor)
MFC:		4 weeks
2003-03-12 19:22:57 +00:00
David Malone
5560a5abb3 Document the fact that hdestory calls free on the keys added with
hsearch(.., ENTER). Make the example reflect this.

PR:		49951
Submitted by:	Peter Jeremy <peterjeremy@optushome.com.au>
2003-03-12 14:18:14 +00:00
Sean Chittenden
99c24e2b2c Update sendfile.2 to include a TUNING section that documents the
various tunables that are applicable to sendfile(2).  Update tuning.7
to mention a reference to sendfile.2.

Approved by:	keramida
2003-03-12 09:28:44 +00:00