Commit Graph

6832 Commits

Author SHA1 Message Date
Ruslan Ermilov
db8993ce9e Capitalize ASCII code names.
Approved by:	re
2002-12-05 08:50:00 +00:00
Ruslan Ermilov
ae82896268 Consistently mark std(in|out|err) with .Dv, because that's how they
are marked up in stdio(3), and because they are defined expressions
of type "FILE *".

Approved by:	re
2002-12-04 18:57:46 +00:00
Ruslan Ermilov
898f520da8 mdoc(7) police: markup overhaul.
Approved by:	re
2002-12-04 17:49:15 +00:00
Ruslan Ermilov
3b29692060 mdoc(7) police: markup overhaul.
Approved by:	re
2002-12-04 16:28:45 +00:00
Ruslan Ermilov
304d1f73fe mdoc(7) police: overhaul.
Approved by:	re
2002-12-04 15:47:41 +00:00
Peter Grehan
8238b87b55 Minimal libc for PowerPC.
Reviewed by: benno

Approved by: re (blanket)
2002-12-04 07:25:14 +00:00
Jake Burkholder
7b628f43e0 Reduce WARNS level to 3 in the non-crypto case to fix make release on sparc64.
This may only be turning up now to changes in the cpp predefines for sparc64,
which may be turning on more strict alignment checking.

Approved by:	re
2002-12-04 04:34:59 +00:00
Jake Burkholder
5afad5832a Update the second copy of libstand to deal with the new ufs2 superblock
format.  The one in sys/boot/libstand is not connected to the build.

Approved by:	re
2002-12-03 16:25:29 +00:00
John Baldwin
ba0b471d64 Break up a bunch of crazy if statements to use a case statement instead
to be cleaner.  Also, when deleting a chunk, try to find the mother chunk
as a whole chunk by default if this isn't a BSD partition or a unused or
whole chunk.  Before we just did this for FreeBSD and FAT slices, which
means that other chunk types such as EFI and mbr (mbr is used for slices
that don't have their own chunk type).

Submitted by:	nyan (mostly)
Approved by:	re
2002-12-02 21:42:29 +00:00
Peter Wemm
a5bf4e71ef Replace rev 1.33 with a real fix. The problem was integer overflows
when trying to store the year in a signed int.  The maximum time_t on ia64
is around 292 billion years in the future, but 'int' and struct tm.tm_year
can only represent then ext 2.1 billion years or so.

This solves the problem of mktime/localtime looping on ia64.  Unfortunately,
the standards say that tm_year is an 'int', so we are still stuck with a
y2147483647 bug.  bash2's configure script looks for bugs in mktime() and
fails on ia64 because of this.  However, mktime() on FreeBSD fails the test
normally anyway so this is no big loss.

This change does not affect any other platforms besides ia64.

Approved by:	re
2002-12-02 01:05:08 +00:00
Bruce Evans
4ce32d5dee Backed out previous commit (alignment suitable for RELENG_4) as planned
since it has been MFC'ed.  See the log message for the previous commit
for more details.  The alignment bug in gcc-3 has not been fixed, but
it is not very serious and the previous commit just moved it (as intended).

Approved by:	re (murray)
2002-12-01 17:36:18 +00:00
Ruslan Ermilov
279062fae1 mdoc(7) police: sweep. 2002-11-29 17:35:09 +00:00
Ruslan Ermilov
92b1f2f7a3 mdoc(7) police: sweep. 2002-11-29 16:42:23 +00:00
Ruslan Ermilov
1798791d24 mdoc(7) police: formatting nits.
Approved by:	re
2002-11-29 15:57:50 +00:00
Dag-Erling Smørgrav
bb16bd87d7 Whitespace nits.
Approved by:	re (bmah)
2002-11-28 20:11:31 +00:00
Dag-Erling Smørgrav
3fdd8a4036 Add a PAM_MODULE_ENTRY to this module so it'll actually do something.
Approved by:	re (bmah)
2002-11-28 20:05:42 +00:00
Hajimu UMEMOTO
c86d6b6cb7 try SIOCGIFINDEX 1st to be able to use network aliasing.
Submitted by:	jlemon
Approved by:	re
2002-11-28 17:46:40 +00:00
Dag-Erling Smørgrav
d5216a4fb7 Implement and document support for an HTTP_REFERER environment variable.
PR:		28171
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Approved by:	re (bmah)
MFC after:	1 week
2002-11-28 12:07:15 +00:00
Kirk McKusick
ada981b228 Create a new 32-bit fs_flags word in the superblock. Add code to move
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.

Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.

Suggested by:	BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by:   DARPA & NAI Labs.
2002-11-27 02:18:58 +00:00
Jonathan Mini
e9d0431f0b Schedule spinlocked threads by moving them through the work queue, instead
of the wait queue.

Approved by: re (blanket)
Stolen from: davidxu
2002-11-24 06:45:45 +00:00
Jonathan Mini
4df51f23bb Get the wall clock time from the KSE mailbox, rather than doing another
syscall.
2002-11-24 06:43:21 +00:00
David Xu
2442bdd81b Directly load %edx from mailbox 2002-11-23 04:39:52 +00:00
Archie Cobbs
e804e4b013 Describe newly added fields in the KSE and thread mailboxes.
Approved by:	re
2002-11-22 23:48:38 +00:00
Chris Costello
2db19028d3 Document the `label' capability.
Approved by:	re
Sponsored by:	DARPA, Network Associates Labs
Obtained from:	TrustedBSD Project
2002-11-22 22:22:10 +00:00
David Xu
4949943c48 In _thread_enter_uts, fix eflags saving bug.
In _thread_switch, set current thread pointer in kse mailbox
only after all registers copied out of thread mailbox, kernel will do
upcall at trap time, if set current thread pointer before loading all
registers from thread mailbox, at trap time, the thread mailbox data
will be overwritten by kernel, result is junk data is loaded into CPU.
2002-11-22 11:43:06 +00:00
David Xu
662c0429b9 Fix idle timeout bug, use correct current time of day. 2002-11-20 12:35:59 +00:00
Ruslan Ermilov
c51d717f0c libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
Marcel Moolenaar
ed7ba3cfc2 This file has reincarnated as src/include/uuid.h with a whole new
future ahead of it.
2002-11-18 08:06:39 +00:00
Marcel Moolenaar
c544e42bcf libc header files are normally in src/include. Therefore, uuid.h has
been repo-copied from src/lib/libc/uuid to src/include. Update the
makefiles.

While in src/include/Makefile, reformat and resort INCS. Reverting
the functional change only involves removing uuid.h.

Pompted by: ru
2002-11-18 07:34:56 +00:00
David Xu
4ab365e720 Adjust code for new mailbox format.
Reviewed by: deischen, mini
2002-11-18 02:02:08 +00:00
Peter Wemm
f316609eb4 Oops. Some ut_time stuff slipped through the cracks. These turned out
to be non-fatal due to stack alignment roundups.
2002-11-17 23:46:45 +00:00
Mike Barcroft
4624c61c2d Update SYNOPSIS to reflect the standardized header. Add STANDARDS
section.

PR:	43270
2002-11-17 16:34:07 +00:00
Yoshihiro Takahashi
1cfcbbd71c - Ease sanity check to get cylinders.
- Get the slice name from the result of kern.geom.conftxt.
2002-11-17 13:51:22 +00:00
Doug Barton
7fd268cce6 goto break; != break;
I've no idea if this is the right behavior for the library, but this
at least fixes the build, and matches what seems to be alfred's intent
in the commit message for 1.19.
2002-11-17 08:54:29 +00:00
Alfred Perlstein
f51c1e897d Rework the sysconf(3) interaction with aio:
sysconf.c:
  Use 'break' rather than 'goto yesno' in sysconf.c so that we report a '0'
  return value from the kernel sysctl.

vfs_aio.c:
  Make aio reset its configuration parameters to -1 after unloading
  instead of 0.

posix4_mib.c:
  Initialize the aio configuration parameters to -1
  to indicate that it is not loaded.
  Add a facility (p31b_iscfg()) to determine if a posix4 facility has been
  initialized to avoid having to re-order the SYSINITs.
  Use p31b_iscfg() to determine if aio has had a chance to run yet which
  is likely if it is compiled into the kernel and avoid spamming its
  values.
  Introduce a macro P31B_VALID() instead of doing the same comparison over
  and over.

posix4.h:
  Prototype p31b_iscfg().
2002-11-17 04:15:34 +00:00
Marcel Moolenaar
f8739dd5f9 Implement the lock with a cmpxchg instruction instead of a xchg.
Both are atomic, but the cmpxchg has memory ordering hints. We
give this acquire semantics.

NOTE: The unlock in libc_r is implemented by a "normal" assign
statement. This is not correct on ia64 due to the memory ordering
characteristics of the architecture. We need release semantics
for an unlock.
2002-11-16 17:05:06 +00:00
Daniel Eischen
9ed358fddc Disconnect the userland get/set/swapcontext() functions from
libc.  I want to keep these in some version for the thread
library/ies, but don't know whether to have them repo-copied
to libc_r or renamed and kept in libc.

Change the name of an alpha macro that was changed with the
system call commit.
2002-11-16 06:39:11 +00:00
Alfred Perlstein
3d8ce33a50 Provide more correct default values for sysconf(3) reporting of the AIO
subsystems capabilities:

_SC_AIO_LISTIO_MAX returns the default of _POSIX_AIO_LISTIO_MAX
_SC_AIO_MAX returns the default _POSIX_AIO_MAX
_SC_AIO_PRIO_DELTA_MAX returns the default of 0

Without these adjustments the values returned are -1 even when the
aio side of the kernel returns '0' for them which is incorrect.

Noticed by: Craig Rodrigues <rodrigc@attbi.com>
2002-11-16 06:35:20 +00:00
Marcel Moolenaar
fef38f259f Sort SRCS. 2002-11-16 01:41:33 +00:00
Peter Wemm
6ceeb6902a utmp.ut_time and lastlog.ll_time are explicitly int32_t rather than
time_t.  Deal with the possibility that time_t != int32_t.  This boils
down to this sort of thing:
 -   time(&ut.ut_time);
 +   ut.ut_time = time(NULL);
and similar for ctime(3) etc.  I've kept it minimal for the stuff
that may need to be portable (or 3rd party code), but used Matt's time32
stuff for cases where that isn't as much of a concern.

Approved by: re (jhb)
2002-11-15 22:42:00 +00:00
Yoshihiro Takahashi
021587f8c1 Fixed style(9) 2002-11-15 13:24:29 +00:00
Archie Cobbs
e46cac58cd When about to do an execve(), don't reset the O_NONBLOCK flag on any file
descriptors that have the close-on-exec flag set, as that will have no
effect anyway and might screw something else up if the file descriptor
happens to be shared with another process.

PR:		standards/43335
MFC after:	1 week
2002-11-15 00:34:28 +00:00
Ruslan Ermilov
3f66c888ec Make dynamic PAM modules depend on dynamic PAM library.
Requested by:	des, markm
2002-11-14 19:24:51 +00:00
Robert Drehmel
7ea630865e Define `Sudden_Underflow' when compiling for the Alpha
architecture, mainly to avoid getting a SIGFPE signal sent
when calling strtod(3) with certain input.

The SIGFPE has been sent because the code was not aware that
a Gradual Underflow is handled in software via traps on the
Alpha architecture, but is not implemented in our Alpha kernel
layer.

With `Sudden_Underflow' defined, strtod(3) should not depend
on Gradual Underflow and adjust its calculations accordingly,
which means that other, more subtle errors than the sending of
SIGFPE could be solved by this.

Discussed with:	bde
PR:		alpha/12623
PR:		alpha/17032
PR:		alpha/43567
MFC after:	7 days
2002-11-14 17:06:01 +00:00
Warner Losh
cf04ed1bdf bde points out that the LIBC_MAJOR macro doesn't exist and requests
that we not use it here.  In its place I've put a comment about the
current state of play.

Submitted by: bde
2002-11-14 14:06:14 +00:00
Ruslan Ermilov
bedff4e805 Reset LogTag to NULL in closelog(3). This fixes mysterious crashes
caused by dynamic PAM modules that call openlog(3) and closelog(3),
e.g. ports/security/pam_pwdfile.

What happened here is that the module first registered its "ident"
with openlog(3), then PAM library unloaded module with dlclose(3),
and the next call to syslog(3) resulted in SIGSEGV.

MFC after:	3 days
2002-11-14 12:40:14 +00:00
Marcel Moolenaar
122dd01309 o Fix _longjmp() to return 1 when the return value is given as 0.
o  Remove the unwanted smartness in _longjmp() where it compares
   the current ar.bspstore with the saved ar.bspstore and restores
   ar.rnat based on it. This either avoids saving ar.rnat in the
   jmp_buf or is the consequence of not saving ar.rnat. All this
   complexity breaks libc_r where we use longjmp() to switch to
   different threads and the current ar.bspstore has no relation
   to the saved ar.bspstore. Thus: we save ar.rnat in setjmp()
   and simply restore ar.bspstore and ar.rnat in longjmp().

This code needs a cleanup.
2002-11-14 06:40:23 +00:00
Daniel Eischen
fcfc20c88a Argh, change declaration of two-dimensional array so that it actually
builds.
2002-11-13 21:55:22 +00:00
Daniel Eischen
28c104a549 Make this compile with whatever error-checking is enabled in buildworld
and/or beast.
2002-11-13 19:35:40 +00:00
Daniel Eischen
f38fac1471 At initialization, override the pthread stub routines in libc
by filling in the jump table.

Convert uses of pthread routines within libc_r to use the internal
versions (_pthread_foo instead of pthread_foo).

Remove a couple of globals from application namespace.
2002-11-13 18:13:26 +00:00