Commit Graph

7117 Commits

Author SHA1 Message Date
trhodes
bc104c5a36 Document what really occurs when we obtain an error.
PR:		43357
Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
2002-12-20 01:01:24 +00:00
dillon
8a472af487 The zalloc pool's size calculation breaks if sbrk() does not return
contiguous chunks of memory.  It happens to do so in the bootstrap
code, but not necessarily in other places.
MFC after:	7 days
2002-12-19 23:23:20 +00:00
ceri
0a01322c47 Grammatical fixup: s/be the -1/be -1/
MFC after: 1 day
2002-12-19 21:48:43 +00:00
jake
663105bbf1 Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c. 2002-12-19 19:34:59 +00:00
ru
79529ca165 Make accept(), connect(), recvfrom(), recvmsg(), sendmsg(),
and sendto() cancelation points, as required by POSIX.1-2001.

Reviewed by:	deischen
2002-12-19 11:39:20 +00:00
tjr
06b2e62cb8 Add back the Standards section claiming conformance to 1003.1-2001 and
C99 now that all known standards-related bugs have been fixed.
2002-12-19 10:24:52 +00:00
tjr
bff31eb78a Write the message to stderr, not file descriptor 2, so that perror()
writes to the correct stream if stderr has been redirected with freopen().
2002-12-19 09:53:26 +00:00
tjr
de9d9fe6f8 Use strerror_r() to format the error message so that strerror()'s static
buffer does not get clobbered.

ISO/IEC 9899:1999 7.21.6.2 3:
"The implementation shall behave as if no library function calls the
strerror function."
2002-12-19 09:50:10 +00:00
ru
f229f0705f mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
ru
bca41a417f mdoc(7) police: Fixed a few .Fa abuses. 2002-12-19 09:33:34 +00:00
ru
ddbf7ab583 mdoc(7) police: excessive quotes. 2002-12-19 08:13:27 +00:00
obrien
4fe55e9344 Update with the 4.7 libraries, and add libposix1e to the mix. 2002-12-18 18:05:07 +00:00
mike
900ff36ca2 Rearrange strerror() so that its itoa procedure can be used with
strerror_r().  Doing this allows us to ensure that strerror_r() always
fills the supplied buffer regardless of EINVAL or ERANGE errors.

strerror()'s semantics have changed slightly such that an argument of
0 is now considered invalid and errno is set to EINVAL.

Remove internal regression test for strerror() and strerror_r().  This
will be reincarnated in src/tools/regression/lib/libc/string.

In strerror(3), add a comment about strerror()'s bogus return type.

PR:	44356
2002-12-18 16:53:31 +00:00
ru
b7ef44c09a mdoc(7) police: Fixed abuses of the .Ar and .Em macros. 2002-12-18 13:33:04 +00:00
ru
5151e61327 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
ru
7274d3ee3c mdoc(7) police: "The .Fn system call". 2002-12-18 12:39:25 +00:00
ru
d56e517c2f mdoc(7) police: "The .Fn function". 2002-12-18 10:13:54 +00:00
ru
35df510715 mdoc(7) police: Fixed the .Nm abuse. 2002-12-18 10:10:32 +00:00
ru
a9cd20be86 mdoc(7) police: Tidy up the syscall language.
Stop calling system calls "function calls".

Use "The .Fn system call" a-la "The .Nm utility".

When referring to a non-BSD implementation in
the HISTORY section, call syscall a function,
to be safe.
2002-12-18 09:22:32 +00:00
tjr
09fe083601 Document what happens when the format string contains insufficient
conversion specifications to completely specify the resulting struct tm.

PR:		46331
Submitted by:	Christian S.J. Peron
MFC after:	2 weeks
2002-12-18 05:00:54 +00:00
mbr
9729cc6a4e Change the name for the local unix-socket based protocol
from "unix" back to "local".  Add some compat stuff so both
ways work for some time.

Reviewed by:    phk
Approved by:    imp (UPDATING)
Requested by:   iedowse, lukem@netbsd.org
2002-12-16 22:24:26 +00:00
des
a57990aa04 Merge in most non-style differences from Andrew Korty's pam_ssh 1.7. 2002-12-16 14:33:18 +00:00
maxim
235e5193f6 o getsockopt(2) 'level' argument should be 0, not SOCK_STREAM. It
does not hurt anything because uipc_ctloutput() does not check
sopt->sopt_level.

Pointed out by:	ru
MFC after:	1 week
2002-12-16 13:42:13 +00:00
dillon
c2d085eb9b This is David Schultz's swapoff code which I am finally able to commit.
This should be considered highly experimental for the moment.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	3 weeks
2002-12-15 19:17:57 +00:00
maxim
b236b8e6da o Fix bogus getsockopt(2) call: swap SOCK_STREAM and LOCAL_PEERCRED.
The bug does not affect anything because SOCK_STREAM == LOCAL_PEERCRED == 0x1.

PR:		bin/46165
Submitted by:	Alain Thivillon <at@rominet.net>
Reviewed by:	dd
MFC after:	1 week
2002-12-15 09:37:54 +00:00
ru
63f1f7ee01 mdoc(7) police: markup overhaul. 2002-12-14 15:29:27 +00:00
fenner
b240619903 Add an implementation of the POSIX.1 sockatmark(3). 2002-12-13 22:22:55 +00:00
ru
4f5374cc7e mdoc(7) police: sort xrefs in SEE ALSO. 2002-12-13 16:53:51 +00:00
trhodes
05dd3548d5 Fix the HISTORY to match reality. They were never MFC'ed to 4.X.
Submitted by:	R. Imura <imura@ryu16.org>
Approved by:	re (murray)
2002-12-12 22:22:51 +00:00
ru
88d368906e Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
ru
58c45ee540 mdoc(7) police: .Dt is ALL UPPERCASE.
Approved by:	re
2002-12-12 08:19:47 +00:00
ru
abe7c94ab3 mdoc(7) police: Added the missing .Os call; it's not strictly
necessary nowadays, but is documented as "required", and may
become so again in the future.

Approved by:	re
2002-12-11 15:55:29 +00:00
ru
fd0dc9475a Fixed the parameter's name.
PR:		docs/46183
Submitted by:	Dirk Gouders <gouders@et.bocholt.fh-ge.de>
Approved by:	re
2002-12-11 14:04:37 +00:00
ru
b23977d66b mdoc(7) police: tiny nits.
Approved by:	re
2002-12-09 14:11:37 +00:00
ru
0aa1fc31ef mdoc(7) police: tiny nits.
Approved by:	re
2002-12-09 14:04:05 +00:00
ru
9719f84752 mdoc(7) police: overhaul.
Approved by:	re
2002-12-09 13:54:29 +00:00
ru
cc1ee458f4 mdoc(7) police: nits.
Approved by:	re
2002-12-09 13:14:15 +00:00
ru
3b966b0168 mdoc(7) police: nits.
Approved by:	re
2002-12-09 12:47:18 +00:00
ru
a4961eb037 mdoc(7) police: overhaul. 2002-12-09 12:41:29 +00:00
deischen
c707472879 For now, build and install this as libkse instead of libpthread.
This will avoid any accidental use of an experimental library.

Suggested by:	rwatson
Approved by:	re (jhb)
2002-12-08 22:43:31 +00:00
peter
27c46fcccf Do not guarantee an overflow of tm_year when doing the binary search in
localtime/mktime/tmcomp and friends on ia64.

Approved by:	re
2002-12-05 19:54:47 +00:00
ru
049d95bf04 Capitalize ASCII code names.
Approved by:	re
2002-12-05 08:50:00 +00:00
ru
35dfeeace5 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
ru
b127fd2891 mdoc(7) police: markup overhaul.
Approved by:	re
2002-12-04 17:49:15 +00:00
ru
b7d0c823f7 mdoc(7) police: markup overhaul.
Approved by:	re
2002-12-04 16:28:45 +00:00
ru
03ce085004 mdoc(7) police: overhaul.
Approved by:	re
2002-12-04 15:47:41 +00:00
grehan
f731925a6e Minimal libc for PowerPC.
Reviewed by: benno

Approved by: re (blanket)
2002-12-04 07:25:14 +00:00
jake
2fabf87f4f 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
f2a426d76e 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
jhb
e8dc777e55 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
75b5d9f3f9 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
bde
abc5352478 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
ru
0c8caea760 mdoc(7) police: sweep. 2002-11-29 17:35:09 +00:00
ru
f457bce1a0 mdoc(7) police: sweep. 2002-11-29 16:42:23 +00:00
ru
45774d91ab mdoc(7) police: formatting nits.
Approved by:	re
2002-11-29 15:57:50 +00:00
des
ba8e825f28 Whitespace nits.
Approved by:	re (bmah)
2002-11-28 20:11:31 +00:00
des
5c961e5029 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
ume
c98e4b8a75 try SIOCGIFINDEX 1st to be able to use network aliasing.
Submitted by:	jlemon
Approved by:	re
2002-11-28 17:46:40 +00:00
des
9ee793ca7c 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
mckusick
559c7a3a76 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
mini
25bd85aed0 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
mini
71ed6b09a9 Get the wall clock time from the KSE mailbox, rather than doing another
syscall.
2002-11-24 06:43:21 +00:00
davidxu
84a797cd67 Directly load %edx from mailbox 2002-11-23 04:39:52 +00:00
archie
97aa98e5f5 Describe newly added fields in the KSE and thread mailboxes.
Approved by:	re
2002-11-22 23:48:38 +00:00
chris
d4b3149f1e 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
davidxu
042c7fec24 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
davidxu
0f68381e53 Fix idle timeout bug, use correct current time of day. 2002-11-20 12:35:59 +00:00
ru
839c9a1a35 libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
marcel
d8bdc03426 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
f825c4ca1c 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
davidxu
e852ee1807 Adjust code for new mailbox format.
Reviewed by: deischen, mini
2002-11-18 02:02:08 +00:00
peter
a42cfe9a71 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
f36d52a85f Update SYNOPSIS to reflect the standardized header. Add STANDARDS
section.

PR:	43270
2002-11-17 16:34:07 +00:00
nyan
fdce27bd31 - 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
dougb
ae2f6a0b74 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
6bff15edfe 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
179f4e7818 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
deischen
bcc12061b3 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
cf4ee2c904 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
18c7c901b3 Sort SRCS. 2002-11-16 01:41:33 +00:00
peter
65e05c6a3f 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
nyan
01b4faa9bb Fixed style(9) 2002-11-15 13:24:29 +00:00
archie
d6c09d4431 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
ru
a15fd49354 Make dynamic PAM modules depend on dynamic PAM library.
Requested by:	des, markm
2002-11-14 19:24:51 +00:00
robert
f99a581fb6 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
imp
5e25b9dc7a 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
ru
3fc0232dbf 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
6d90567d4d 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
deischen
b35cc25f5a Argh, change declaration of two-dimensional array so that it actually
builds.
2002-11-13 21:55:22 +00:00
deischen
85a74f903e Make this compile with whatever error-checking is enabled in buildworld
and/or beast.
2002-11-13 19:35:40 +00:00
deischen
5875f2828e 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
deischen
ee85c2b679 Use a jump table (a la Solaris) for pthread routines with default
entries in the table being stubs.  While I'm here, add macros to
auto-generate the stubs.  A conforming threads library can override
the stub routines by filling in the jump table.

Add some entries to namespace.h and sync un-namespace.h to it.
Also add a comment to remind folks to update un-namespace.h
when changing namespace.h.
2002-11-13 18:12:09 +00:00
nectar
0c8e372e2c The pam_krb5 module stored a reference to a krb5_ccache structure as
PAM module state (created in pam_sm_authenticate and referenced later
in pam_sm_setcred and pam_sm_acct_mgmt).  However, the krb5_ccache
structure shares some data members with the krb5_context structure
that was used in its creation.  Since a new krb5_context is created
and destroyed at each PAM entry point, this inevitably caused the
krb5_ccache structure to reference free'd memory.

Now instead of storing a pointer to the krb5_ccache structure,
we store the name of the cache (e.g. `MEMORY:0x123CACHE') in
pam_sm_authenticate, and resolve the name in the other entry points.

This bug was uncovered by phkmalloc's free'd memory scrubbing.

Approved by:	re (jhb)
2002-11-13 17:46:15 +00:00
nectar
c95815d296 Use krb5_get_err_text' instead of error_message' so that instead of
e.g.

   Unknown error: -1765328378

we get

   Client not found in Kerberos database

Another way to accomplish this would have been to leave
`error_message' alone, but to explicitly load the Kerberos com_err
error tables.  However, I don't really like the idea of a PAM module
dorking with global tables.

Approved by:	re (jhb)
2002-11-13 17:44:29 +00:00
ru
7f2358cbe3 Actually check if stdbool.h exists when BOOTSTRAPPING. 2002-11-13 13:47:48 +00:00
ru
840bf04e2a Bootstrapping aid for 4.0-RELEASE. 2002-11-13 11:50:40 +00:00
marcel
8736ff402f Handle EFI partitions the same as regular FAT partitions. The only
difference between the two from a low-level point of view is that
the partition type is different. This change adds EFI related cases
to existing switch statements with existing FAT related cases.
2002-11-13 05:31:32 +00:00
rwatson
7b7a06ac4d Add LOGIN_SETMAC to the list of flags that can't be set without class
information, since we rely on the pwd entry to know what MAC labels
to set as part of the login process.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-12 22:30:01 +00:00
archie
29d0bcc157 Fix bogus return values from libc_r's writev() routine in situations where
a partial-write is followed by an error.

PR:		43335
MFC after:	3 days
2002-11-12 19:01:49 +00:00
mini
fe1adb9794 Schedule an idle context to block until timeouts expire without blocking
further upcalls.
2002-11-12 00:55:01 +00:00
davidc
592f4ad598 - Document the chunk_name() function that replaces chunk_n[].
- Rearrange things a tiny bit.
2002-11-11 19:37:19 +00:00
davidc
bf5e272aa4 Remove parameter names from function prototypes (at least one collided
with stdlib.h).

discussed with: phk
2002-11-11 18:55:57 +00:00
phk
c66adfdb09 Remove debugging printfs. 2002-11-11 10:08:46 +00:00
marcel
6909b46641 ia64 ABI breaker:
Don't force 16-byte alignment at run-time. Do it at compile-time.
This saves us the pointer fiddling by the setjmp functions and
reduces complexity. While here, increase the jmp_buf by 16 bytes
to an even 512 bytes. Coincidentally, due to the way alignment
was handled prior to this change, the jmp_buf has not changed in
size, but only in how the space is used. Prior to this change
the 16 bytes were reserved for enforcing alignment; now they are
reserved by us for future extensions.
Therefore, this ABI breaker is relatively save: the failure is
always an alignment trap.
2002-11-11 08:11:44 +00:00
marcel
9b16851f2f MBR slices are named the same on ia64 as they are on i386. 2002-11-11 04:46:39 +00:00
marcel
29a0b1f17a Given that we have 3 places to document UUID related information,
namely uuidgen(1), uuidgen(2) and uuid(3), the following division
has been choosen:
	uuidgen(1)	A description of the command line utility,
			and other user oriented UUID information.
	uuidgen(2)	A mostly technical description of UUIDs.
	uuid(3)		A description of the functions and other
			programmer oriented UUID information.

According to the division: add more technical contents.

Contributed by: Hiten Pandya <hiten@uk.FreeBSD.org>
Edited and enhanced: marcel
2002-11-11 00:29:01 +00:00
jake
803f4d0f99 Write the boot block to the first 16 sectors of all partitions, instead of
always to the first 16 sectors of the disk.  The firmware reads the boot
code from a partition, defaulting to 'a' if none is specified, which only
corresponds to the first 16 sectors of the disk if 'a' is first.  Solaris
often makes the swap partition first, instead of the root partition, and
users expect to be able to do the same with freebsd as well.  This also
allows one to temporarily boot from another partition if the boot block
on the root partition gets scrambled somehow.
2002-11-10 21:07:29 +00:00
marcel
ac09bb6a29 Add efi to the list of types for which we need to return tha name.
Also, return chunk type efi in case we find an EFI partition in
the GPT. We used to return FAT due to a lack of EFI type.
2002-11-10 20:53:10 +00:00
marcel
79cdbbc9f5 Add an efi chunk type. We need to be able to create an EFI partition
on ia64, because that's where we need to put the loader and the
kernel.
2002-11-10 20:49:28 +00:00
marcel
7ff7ce0577 General cleanup:
o  Remove all code guarded by !defined(__ia64__). This file is
   specifically written for ia64,
o  Handle the case when read_block() or write_block() fails. We
   don't want sysinstall(8) to signal a thumbs-up on error,
o  Set the starting (cyl,hd,sect) triple to 0xFFFFFF when either
   bios_hd or bios_sect is zero or the LBA us not representable
   with the triple. In that case automaticly initialize the
   ending triple with 0xFFFFFF as well,
o  Reindent Write_Int32() as it was different than the rest of
   the file,
o  Remove some unused variables that appeared to be used but
   were effectively useless.
o  Plug a memory leak: The second timne we read the MBR, we write
   out a modified block, but didn't free the memory after writing.
o  Replace d1->sector_size with 512 when we read/write the MBR.
   We ignore the sector size in cases we shouldn't but adhered to
   it in cases it would be wrong if the sector_size wasn't 512.

This file should eventually be rewritten to write out a GPT. For
now, a MBR will do...
2002-11-10 20:47:02 +00:00
tjr
4455f4263a Add cross references to mbrtowc(3) and wcrtomb(3). 2002-11-10 11:14:58 +00:00
tjr
c7620f2614 Don't check whether the first byte of the buffer is a null byte when
the buffer has zero length (n == 0).
2002-11-10 10:49:14 +00:00
imp
b7d37a9816 Restore Peter's version of static __sF. There's too much pain for it
to be static for 5.0.  I may remove this for 5.1 or 5.2.  No more
binaries or libarires will be generated with __sF starting as of
yesterday.  Originally the plan had been to eliminate this for 5.0,
but we didn't get the __std{in,out,err}p changes merged into -stable
until yesterday (rather than in September 2001 like it should have
been).  Given that didn't happen on time, we can't do the other part
of the scheme now.

# Please do not change this without talking to me first.
2002-11-10 08:44:38 +00:00
tjr
48d63f2101 Describe the n' and ps' arguments to mbrlen(). 2002-11-09 10:21:01 +00:00
tjr
5cd1a1b77d Typo: pointer to -> pointed to 2002-11-09 09:47:06 +00:00
tjr
ff842e7fe4 Use wide character ctype functions directly instead of relying on
4.4BSD extensions to the single-byte ctype functions.
2002-11-09 05:19:08 +00:00
tjr
9ffce4ee47 Add a missing return statement for the pwcs == NULL case (XSI extension). 2002-11-09 04:13:26 +00:00
fenner
bcc6bc2a4e Fix two typos. 2002-11-08 19:10:05 +00:00
nyan
763f412e6c - Recognize FAT partition on MBR and PC98 disks.
- Fix to convert to the name of partition.
2002-11-08 15:25:15 +00:00
rwatson
f457f1a279 Update acl.3 to xref getfacl(1) and setfacl(1), the recommended tools for
manipulating file ACLs.  Update the status of the implementation a bit,
update the copyright, etc.

Obtained from:	TrustedBSD Project
2002-11-08 15:01:28 +00:00
nyan
f5e97a2008 MFi386: revision 1.4. 2002-11-08 14:49:14 +00:00
jhb
748b8ba234 Don't set a variable to a bogus value right before setting it to the
correct value in the next statement.
2002-11-08 14:00:44 +00:00
jhb
7738807f20 Don't set a value to a variable that we don't use. 2002-11-08 14:00:09 +00:00
jhb
af89e1d51e - Merge Write_FreeBSD() into Write_Disk().
- Miscellaneous cleanups.
2002-11-08 13:58:00 +00:00
rwatson
e083d8dfb5 License and blurb update authorized by Network Associates. 2002-11-07 20:37:04 +00:00
nyan
158724351f Fixed pc98 support.
(merged i386 changes from chunk.c 1.41 and disk.c 1.100)
2002-11-07 14:54:53 +00:00
jhb
94c04b95e3 Get this closer to working. The Write_Disk() function's for loop needed
to use the same start condition as the i386 version.  However, since
Alpha's only have one fake "slice" from sysinstall's perspective we don't
need to use a loop, but can just write out the BSD label in the first
fake "slice".
2002-11-07 14:39:21 +00:00
chris
73aa3eaa63 o Make the COMPATIBILITY section a bit less redundant.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Labs
2002-11-06 17:38:18 +00:00
chris
1c693a942e o Update man page to reflect the new prototypes for mac_{to,from}_text.
o Remove a (currently) no-longer-pertinent entry from errors.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Labs
2002-11-06 17:34:29 +00:00
rwatson
09fad498b0 Hook up the userland wrapper for __mac_execve().
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-06 03:38:47 +00:00
jmallett
c7d0130b1b Wrap function prototype declarations in __BEGIN_DECLS to do the right thing
with them in non-C cases.

Requested by:	Patrick Hartling <patrick@137.org>
2002-11-05 10:55:16 +00:00
rwatson
1007edeb1c License update authorized by NAI: remove clause 3. 2002-11-05 01:42:35 +00:00
archie
2dac01176b Fix bogus return values from libc_r's write() routine in situations where
a partial-write is followed by an error.

PR:		43335
MFC after:	1 week
2002-11-05 00:59:18 +00:00
rwatson
d01c897518 Clarify language relating to ACLs, Capabtilities, and MAC, since the
implementation status of these services has changed substantially
since this man page was last updated.
2002-11-04 20:52:09 +00:00
rwatson
ac714e562a Update license, historical information. 2002-11-04 20:45:44 +00:00
rwatson
b22ddef54c Point out that the MAC Framework is considered experimental. 2002-11-04 20:42:58 +00:00
nsayer
da03068c3b After waiting for help with the markup, I finally decided to just patch
the page myself. The new language is more accurate than what was there
before, but the most accurate way of describing the funcionality eludes
me.

PR:		kern/33904
MFC after:	1 month
2002-11-04 19:30:04 +00:00
tjr
07240c4b78 Add descriptions for some _PC_* variables from <sys/unistd.h> that
were missing.
2002-11-04 07:21:44 +00:00
alfred
0999268677 Backout "compatibility hack" for __sF.
Requested by: Steve Kargl <sgk@troutmask.apl.washington.edu> (submitter)
2002-11-04 03:23:56 +00:00
jhb
818447ebcc Remove unused MBR gunk leftover from i386. 2002-11-03 21:18:17 +00:00
nyan
50e48d0cc4 Fix to compile for pc98. 2002-11-03 09:35:08 +00:00
marcel
8384dee1e5 Initialize d->bios_cyl. We know the media size in sectors, the number
of heads end the number of sectors per track. If there's an obvious
insanity (heads and sectors are both zero or the media size is not
an integral multiple of heads times sector) we set the number of
cylinders to zero.
2002-11-03 01:37:08 +00:00
alfred
506fbc7293 Provide a hook to make __sF visible outside of libc for commercial apps
if WANT_COMPAT4_STDIO is defined when compiling libc.

Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
2002-11-02 19:47:53 +00:00
marcel
3aa2ed6a7e Add support for GPT:
1. When the parition type is not an integer, try to parse the type
   as an UUID. If that succeeds, map the UUID to chunk_e.
2. For GPT partitions, pass the type constructed in point 1 above
   to Add_Chunk.

While here, fix the MBREXT case by only checking if the first 3
characters are MBR. This avoids duplication.
2002-11-02 12:14:04 +00:00
marcel
5eee0c971a Add support for ia64. This is almost identical to i386, except that
with GPT chunks of type "part" do not necessarily live under chunks
of type "freebsd". We don't necessarily have a disklabel.
2002-11-02 12:05:16 +00:00
phk
8db889e121 Don't claim all MBR's have subtype 165 on i386.
Spotted by:	Frode Nordahl <frode@nordahl.net>
2002-11-02 10:57:44 +00:00
kbyanc
36d9f23e28 Track the number of non-data chararacters stored in socket buffers so that
the data value returned by kevent()'s EVFILT_READ filter on non-TCP
sockets accurately reflects the amount of data that can be read from the
sockets by applications.

PR:		30634
Reviewed by:	-net, -arch
Sponsored by:	NTT Multimedia Communications Labs
MFC after:	2 weeks
2002-11-01 21:27:59 +00:00
phk
292cbe8176 Fill in partition 2 with with "whole disk" parameters. 2002-11-01 16:28:19 +00:00
dfr
9c0f8eeb17 * Add stubs for pthread_cond_broadcast.
* Fix typos in rwlock stubs.
* Add pthread_XXX counterparts to the _pthread_XXX stubs which libraries
  like libX11 can use to ensure thread-safety without requiring the use
  of a thread library.

Submitted by: Terry Lambert (pthread_cond_broadcast)
Reviewed by: deischen
2002-11-01 09:37:17 +00:00
tjr
d04e4cf549 No need to include floatio.h here: vfscanf() no longer uses anything
it defines.
2002-11-01 05:13:01 +00:00
archie
bdc5b263bf Re-apply the previously backed-out commit that fixes the problem where
HUGE_VAL is not properly aligned on some architectures. The previous
fix now works because the two versions of 'math.h' (include/math.h
and lib/msun/src/math.h) have since been merged into one.

PR:	bin/43544
2002-10-31 23:05:20 +00:00
deischen
dec012af12 Use the strong symbol'd version of pthread_mutex_init so we don't
accidentally call a stub or application provided version of the
same routine.

Submitted by:	dfr
2002-10-31 18:17:58 +00:00
phk
4d4dfe7ba2 Style(9) improvements. 2002-10-31 07:56:40 +00:00
phk
e76d07828c Set the sector size for the disk. 2002-10-31 07:55:38 +00:00
nyan
c5e080e948 Restore to pc98 support. 2002-10-31 05:51:25 +00:00
nyan
1d9a77e08f Use ${MACHINE} variable instead of using '.if .endif' each machines. 2002-10-31 05:43:49 +00:00
nyan
5dd8e605c0 Add '#include <err.h>' for warn(). 2002-10-31 05:38:48 +00:00
jake
342d40125a Actually save the bootblock in the disk structure. Write the bootblock
to the right place on the disk instead of srewn all over it.
2002-10-31 04:25:17 +00:00
alfred
7917529bdf Make __sF static. This can not be allowed to exist in 5.x. 2002-10-31 01:54:27 +00:00
phk
51e2b669a7 Untested alpha disk writer. 2002-10-30 20:54:22 +00:00
phk
7d6adbcb44 Write out 15 sectors of boot code. 2002-10-30 20:52:07 +00:00
des
9af63db167 Use __func__ and break a long line. 2002-10-30 15:01:29 +00:00
des
e2a5c9e6c2 Fix a bug in fenner's _fetch_writev() patch (rev 1.36)
Submitted by:	fenner
2002-10-30 14:25:00 +00:00
tjr
e7fa72e3f0 Add two additional references to the See Also section, which contain much
better descriptions of UTF-8 and related issues.
2002-10-30 11:49:05 +00:00
sheldonh
31e0cc6c0f Use "deprecated" instead of "depreciated" where appropriate. 2002-10-30 07:49:11 +00:00
mini
88004693e3 Make pthread_sigmask(3) operate on the thread signal mask, not the process
signal mask.
2002-10-30 07:13:27 +00:00
mini
02fc8b20b5 Use KSE to schedule threads. 2002-10-30 06:07:18 +00:00
des
b3815a8615 Recognize the (incorrect) error code a MediaHawk server sends in reply to
unrecognized commands such as MDTM.

Requested by:	Stephen Roome <stephen_roome@pepcross.com>
2002-10-30 06:06:16 +00:00
des
bde988ef15 Clarify my feelings towards fetch / libfetch. 2002-10-30 04:53:58 +00:00
des
9d6e377825 Recommit the non-broken parts of 1.34 and 1.37.
Change the type and name of a variable introduced in 1.33.
2002-10-30 04:43:00 +00:00
des
6a7fe6e363 Don't forget to set the error flag when _fetch_read() returns -1. 2002-10-30 04:42:01 +00:00
marcel
bc0fc15cfe Implement DCE 1.1 compliant UUID functions. Immediate use of these
functions is expected for uuidgen(1), mca(8) and gpt(8). Given the
generic use of UUIDs beyond the scope of the DCE 1.1 specification,
visibility of the data structure at all levels of the machine,
including firmware and the wish to not create a permanent build-
time FreeBSD-ism for DCE compliant applications by creating a new
library, it was decided that libc would be the least inappropriate
place. Also, because the UUID functions live in libc under IRIX as
well, we have maximized our portability and left as many options
open as possible.

This implementation introduces an extension not found in the
specification: the status parameter is allowed to be a NULL-
pointer. The reason for introducing the extension is because
the status is almost never of any use.

The manpage that's part of this commit is a minimal place-holder
and is further fleshed-out in the near future.

Approved by: re@
Contributed by: Hiten Mahesh Pandya <hiten@unixdaemons.com>
Sponsored by: marcel :-)
Tested on: alpha, i386, ia64
2002-10-30 03:51:00 +00:00
imp
3fe448f373 Reinstate revs 1.35-36 and 1.38. Revisions 1.34 and 1.37 were specifically
the root cause of the bus errors I was experiencing.

Submitted by:	fenner
Tested by:	obrien
Prompted by:	peter
2002-10-30 00:17:16 +00:00
rwatson
390889f2e7 While an interface can be depreciated, we prefer deprecated.
Submitted by:	Wayne Morrison <tewok@tislabs.com>
2002-10-29 20:53:46 +00:00
phk
eef36b6ff3 Getting closer to getting things right:
Always ignore the RAW_PART for BSD.
Having no quirks is not a mistake for an architecture.

Tested by:	DES
2002-10-29 17:12:02 +00:00
ru
8b99c738fb Cosmetics. 2002-10-29 15:00:10 +00:00
ru
b72f870406 bsd.doc.mk changes:
Don't gratuitously pipe thru a cat(1) if NODOCCOMPRESS.

Only create _stamp.extra when necessary.

Get rid of SOELIMPP and OBJS.

Use Groff version of soelim(1); we need its -I option
for the following to work.

Don't needlessly chdir to SRCDIR.  Only a few documents
need CD_HACK, and those that need it either use refer(1)
or .PSPIC macro which internally uses the .psbb call.
2002-10-29 14:56:09 +00:00
phk
97b1111d80 Don't call warn(3). 2002-10-29 14:45:43 +00:00
des
454a64be10 Don't forget to '\n'-terminate new entries. This unbreaks chpass -a.
Submitted by:	joerg
2002-10-29 13:58:42 +00:00
obrien
04ec43bef2 Fix `pkg_add -r' by backing out revs 1.34-1.38.
Revs 1.37-8 produce a bus error in some environments.
Revs 1.34-6 do not bus error, but write corrupted files.
2002-10-29 12:17:43 +00:00
phk
55b173002a Since make release is toast anyway, add wood to the pyre:
This significantly rewamps libdisks discovery of existing disk
layout.

Please send me reports if this does not work as expected on
i386 or sparc64 platforms.

I need to sort out alpha, pc98 and ia64 (in that order) before
testing on those platforms make a lot of sense.

Belived to work for:	i386 sparc64
Unknown state:		pc98 alpha ia64
2002-10-29 12:13:36 +00:00
tjr
dbfdd265f9 Remove unnecessary inclusion of <rune.h> to make it obvious that this file
does not use the deprecated rune system.
2002-10-29 09:03:57 +00:00
phk
424bca117f Fix various minor issues.
Don't explode on 'write' because we access a pointer we just freed.
2002-10-29 07:39:18 +00:00
phk
5a92949fea the 'd' partition hasn't been magic for years, so allocate it in natural
order instead of last.
2002-10-29 07:37:11 +00:00
phk
de210c6e8f Add the write_spar64_disk.c to make life easier for testers.
This file depends on some major surgery in the rest of libdisk which is
not yet committed.
2002-10-29 07:35:36 +00:00
chris
8dac09de9c Scoop out examples illustrating the label text format and refer to
maclabel(7) instead.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Labs
2002-10-28 23:06:04 +00:00
des
610f30442d libfetch is now WARNS5 clean in the non-SSL case. 2002-10-28 10:37:31 +00:00
tjr
bc0e30e8cd Cross-reference putc(3). 2002-10-28 10:35:18 +00:00
des
af2d63f09f Allow the admin to specify a different NAS identifier than the hostname.
Submitted by:	Boris Kovalenko <boris@ntmk.ru>
2002-10-28 10:28:46 +00:00
des
82217d5553 Fix an off-by-one error (> where >= should have been used) which caused
_fetch_writev() to incorrectly report EPIPE in certain cases.

Also fix a number of const warnings by using __DECONST(), plus a signed /
unsigned comparison by casting the rhs to ssize_t.

Submitted by:	fenner, Craig Rodrigues <rodrigc@attbi.com>
2002-10-28 10:19:03 +00:00
tjr
1554cc3dda Handle boundary cases more correctly; mblen(s, 0) and mbtowc(NULL, s, 0)
return -1 regardless of what s points to, mbtowc(&w, s, 1) sets w to a
null wide character when s points to a null byte. This seems to be closer
to what most other implementations do, but the C99 standard contradicts
itself for these cases.
2002-10-28 08:24:46 +00:00
fenner
9a1f47baa2 Up WARNS to 3 if not building with crypto.
Approved by:	des
2002-10-28 01:41:28 +00:00
wollman
6da8a280d0 Create a small library function, check_utility_compat(3), to determine
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard).  The configuration is done
malloc(3)-style, with either an environment variable or a symlink.

Update expr(1) to use this new interface.
2002-10-28 00:15:43 +00:00
wollman
2f21e15f81 Update limits and configuration parameters for 1003.1/TC1/D6.
Implement new sysconf keys.  Change the implenentation of
_SC_ASYNCHRONOUS_IO in preparation for the next set of changes.

Move some limits which had been in <sys/syslimits.h> to <limits.h> where
they belong.  They had only ever been in syslimits.h to provide for the
kernel implementation of the CTL_USER MIB branch, which went away with
newsysctl years ago.  (There is a #error in <sys/syslimits.h> which I
will downgrade in the next commit.)
2002-10-27 18:03:02 +00:00
wollman
fd47be1489 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
des
da4ac4fa83 Slight amendment to rev 1.34: instead of considering any short read an
error, only report an error if no data was read at all (unless len was
0 to start with).  Otherwise, the final read of practically any transfer
will end in a fatal error.
2002-10-27 17:20:49 +00:00
des
a68f827727 Introduce _fetch_writev(), which is the conn_t version of writev(2). In
the SSL case, it is no different from the old _fetch_write(), but in the
non-SSL case it uses writev(2) to send the entire vector as a single
packet (provided it can fit in one packet).  Implement _fetch_write()
and _fetch_putln() in terms of _fetch_writev().

This should improve performance in the non-SSL case (by reducing protocol
overhead) and solve the problem where too-smart-for-their-own-good
firewalls reject FTP packets that do not end in CRLF.

PR:		bin/44123
Submitted by:	fenner
2002-10-27 16:11:21 +00:00
des
3b29692357 Eliminate two cases of undefined behaviour: total in _fetch_write() was
not initialized before use, and _http_growbuf() did not return a value
on success.

Reported by:	Peter Edwards <pmedwards@eircom.net>
MFC after:	2 weeks
2002-10-27 15:43:40 +00:00
des
8e68b07af2 Back out the previous commit, and fix the bug rather than try to hide its
symptoms: make timeouts and short transfers fatal, and set errno to an
appropriate value (ETIMEDOUT for a timeout, EPIPE for a short transfer).

MFC after:	2 weeks
2002-10-27 15:08:21 +00:00
tjr
5cf0c1b7fb Style sweep. 2002-10-27 10:41:21 +00:00
peter
0111f1e330 Add back ia64 support that was removed in the last few revisions.
I've cloned write_ia64_disk.c from write_i386_disk.c.
2002-10-27 00:21:02 +00:00
ume
e5e6fbd539 query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.
MFC after:	5 days
2002-10-26 19:00:14 +00:00
phantom
7c24cfd639 Add & hookup manpage for pthread_attr_get_np(3).
MFC after:	3 days
2002-10-26 15:04:29 +00:00
phantom
18e1c0423d Hook uthread_attr_get_np.c to build 2002-10-26 13:55:35 +00:00
phantom
6d89d71a94 Add pthread_attr_get_np() function. This is FreeBSD non-portable POSIX threads
extenston function. It supposed to provide facility to get already created
thread's attributes. Looks like it's last thing we need to make JDK's Hotspot
building without requirement to have source tree.

Reviewed by:	deischen
MFC after:	3 days
2002-10-26 13:53:22 +00:00
phantom
4f33ed961f Be more agresive on arguments' checking.
OK'ed by:	deischen
MFC after:	3 days
2002-10-26 13:47:06 +00:00
ume
3c061374d1 - scopeid is u_int32_t
- strtoul pedant.  pointed out by deraadt

Obtained from:	KAME
MFC after:	1 week
2002-10-25 17:07:02 +00:00
ume
ee2aff0eca - kill strcpy
- port range check need to be done before htons.  from deraadt
- %d/%u audit
- correct bad practice in the code - it uses two changing variables
  to manage buffer (buf and buflen).  we eliminate buflen and use
  fixed point (ep) as the ending pointer.
- use snprintf, not sprintf
- pass correct name into q.name.  from lukem@netbsd
- sync comment

Obtained from:	KAME
MFC after:	1 week
2002-10-25 16:24:28 +00:00
tjr
9a377af2e1 Use an internal buffer for the result when the first argument is NULL. 2002-10-25 13:24:45 +00:00
tjr
9bd133b149 The ORIENTLOCK macro is no longer needed since all functions use
FLOCKFILE/FUNLOCKFILE explicitly.
2002-10-25 07:01:56 +00:00
njl
0717b726b4 The FTP connection caching needs a better interface -- connections are
closed through _fetch_close() which is the only one who knows the connection
REALLY was closed (since ref -> 0).  However, FTP keeps its own local
cached_connection and checks if it is valid by comparing it to NULL.  This
is bogus since it may have been freed elsewhere by _fetch_close().

This change checks if we are closing the cached_connection and the ref is 1
(soon to be 0).  If so, set cached_connection to NULL so we don't
accidentally reuse it.  The REAL fix should be to move connection caching
to the common.c level (_fetch_* functions) and NULL the cache(s) in
_fetch_close().  Then all layers could benefit from caching.
2002-10-25 01:17:32 +00:00
gallatin
87ee772af1 #ifdef out assignToPartition on non x86 arches to unbreak the world
on alpha, sparc64 and ia64
2002-10-24 13:35:52 +00:00
bde
68a24da0b9 Restored sigaction's name in its prototype. 2002-10-24 13:03:46 +00:00
sheldonh
4a05ff75c4 * Modernize aio(4), providing instructions for static and dynamic kernel
linking.

* Fix disorder in the SEE ALSO sections of aio_*(2).

* Remove unnecessary cross-references from the SEE ALSO sections of
  aio_*(2); config(8), kldload(8) and kldunload(8) are cross-referenced
  from aio(4).

* Remove the KERNEL OPTIONS sections from aio_*(2), now that these
  pages cross-reference aio(4), which contains suitable kernel linking
  reference material.
2002-10-24 12:57:05 +00:00
des
2bf287abe5 Add cross-references to the aio(4) manual page.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-10-24 12:22:57 +00:00
tjr
543807d90f Replace wcsstr() with an implementation based on strstr(), which is far
more efficient. The problem with the previous implementation was that it
calculated the length of the first argument ("big") with wcslen() when
it was not necessary.
2002-10-24 02:53:45 +00:00
tjr
9d0a8f31b7 Restore Berkeley SCCS id. 2002-10-24 02:48:45 +00:00
tjr
eb21d2216b Remove the Standards section again until we get these functions sorted
out. This will probably have to wait until after 5.0-R.
2002-10-24 01:24:26 +00:00
chris
16da5a2abf Place mac_prepare() with the other mac_prepare*() functions. 2002-10-24 01:16:56 +00:00
chris
6129d5a2a4 mac_free() no longer accepts a void * parameter; only mac_t's are supposed
to be passed.  Point this out in a warning notice, which will eventually
go away, sometime between now and -RELEASE.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-24 01:01:29 +00:00
chris
69fccf4c0f Remove superfluous empty "FILES" section.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-23 23:56:15 +00:00
chris
e21e3a1891 Remove hard sentence breaks.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-23 23:55:23 +00:00
phk
e21791b49b More lobotomy:
remove CHUNK_BSD_COMPAT, it was a bad idea, and now its gone.
        remove DOSPTYP_ONTRACK, missed in OnTrack removal commit.
        unifdef -DHAVE_GEOM
make tst01 compile again.
2002-10-23 21:05:42 +00:00
phk
125681e67a Remove another 10 mindless #ifdefs. 2002-10-23 20:35:42 +00:00
phk
e0ef9c1c34 Rely on sysctl kern.disks to be there, and get rid of one of the far too
many lists of disk device driver names in the system.  At this point
we should really get the names from the XML, but hey...
2002-10-23 20:15:10 +00:00
phk
8295afb4a1 Remove unnecessary ioctls tickling kernel side to realize that we fiddled
with the disk.  GEOM will automatically retaste when we closet he filedesc.
2002-10-23 20:02:33 +00:00
phk
18fd17feb5 Untangle #ifdefs in the write-end of things by giving each arch its
own file and own copy of WriteDisk() to do things in.

This should have happened years ago, instead of adding #ifdefs all
over the place.
2002-10-23 19:52:32 +00:00
phk
d0832d0407 Separate the struct disklabel filling stuff from the rest of Write_FreeBSD(). 2002-10-23 19:32:18 +00:00
markm
8adb974e67 Remove duplicate declaration. 2002-10-23 17:35:11 +00:00
markm
2aee74623b Make the first argument of getbsize a size_t* instead of an int*, as this is what the quantity actually is. Fix an easy const while I'm here. 2002-10-23 14:18:07 +00:00
nyan
37767fc815 - The GEOM system does not work on pc98.
- Fix to build w/o the HAVE_GEOM option.
2002-10-23 13:00:09 +00:00
tjr
4b54f9209b Fix the NetBSD RCS id's on these files; somehow they were initially
committed with the tags unexpanded.
2002-10-23 11:08:40 +00:00
tjr
41c07a02f3 Reimplement more efficiently, using a single forward scan (like strrchr(3))
instead of scanning forwards to find the end of the string then scanning
backwards to find the character.
2002-10-23 10:52:04 +00:00
tjr
21e9810e52 Reimplement, handling the case where c == L'\0' correctly and fixing
some style(9) bugs.
2002-10-23 10:47:47 +00:00
phk
a984dccf21 Add the new extra argument also in the alpha case. 2002-10-23 10:47:00 +00:00
ume
f04b173318 query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.
Obtained from:	KAME
MFC after:	1 week
2002-10-23 10:45:09 +00:00
tjr
ba3593cbca Add a Standards section, claiming conformance to IEEE Std. 1003.1-2001.
Also add a note to the Bugs section pointing out that strerror() and
perror() share the same static buffer.
2002-10-23 10:16:21 +00:00
des
3198f288eb Translate to English. 2002-10-23 08:55:14 +00:00
tjr
937c1a6384 Replace this wcsncpy() implementation with one based on strncpy.c to fix
two major bugs:
- off-by-one overflow when the length of the source string exceeds or
  equals the destination buffer size.
- old version was not padding the destination buffer with null wide chars
2002-10-23 04:35:25 +00:00
rwatson
6e44996655 If LOGIN_SETMAC is set and MAC is enabled in the kernel, then see
if the user has a 'label' entry in their login class.  If so, attempt
to set that label on the process as part of the credential setup.  If
we're unable to parse the label, or unable to set the label, fail.
In the future, we may also want to warn if a label is set but the
kernel doesn't support MAC.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 03:17:22 +00:00
jmallett
fb4140c848 Use an error message closer to old dumpfs(8) in the case of truncated/no
superblock.

Submitted by:	kkenn

Can't use it verbatim, at least I hate to, as the ", skipped" bit doesn't
make much sense in a library, to me.
2002-10-22 19:36:10 +00:00
jmallett
8731837c6f Add the concept of a per-disk error string, and a function which prints it
along with the errno, if one is set.
2002-10-22 19:25:58 +00:00
fjoe
e6fa5efe68 remove unused __sys_sigaltstack() declaration
Approved by:	deischen
2002-10-22 17:13:32 +00:00
alfred
d3f8d88191 Explain to users that they may want to kldload aio.
Move Xref sections.

Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2002-10-22 16:12:27 +00:00
phk
f9498188ce No longer needed. 2002-10-22 15:22:36 +00:00
jake
1e97f17378 Rename the libc signal trampoline to __sigtramp to match netbsd. This
should allow gdb to detect when we're executing in a signal trampoline.
2002-10-22 15:15:39 +00:00
phk
90744cdc82 Remove the last traces of bogus MAKEDEV functionality. 2002-10-22 15:07:50 +00:00
rwatson
dae495e3eb Reflect MAC kernel/user API changes into the libc MAC implementation.
This removes a lot of complexity, since we basically just reserve
space on a retrieval of a label, and pass around strings.  Two new
elements: (1) consumers of the API must now declare what label
elements they are interested in retrieving, or (2) rely on the default
provided in a new configuration file, mac.conf.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-22 14:36:11 +00:00
phk
5f3d067f01 Live with it: I had hoped to find a neat way to deal with all the magic
numbers, but so far havn't come up with anything:  Add an #ifdef PC98.
2002-10-22 11:55:27 +00:00
phk
7d31e25fb7 Avoid a lot of #ifdef PC98 code by giving a couple of the Chunk functions
an extra argument for all archs.
2002-10-22 10:51:58 +00:00