Commit Graph

29588 Commits

Author SHA1 Message Date
peter
7a359c2e0c fchflags(8) -> fchflags(2)
Submitted by:  Kenneth Merry <ken@plutotech.com>

Also, while here, mention that other FS's don't do flags.
1998-06-10 07:17:59 +00:00
peter
e9944da631 There is no need to make nochange imply ignore as well.
Suggested by: bde
1998-06-10 06:45:08 +00:00
peter
e18ee5bdc0 Don't silently accept attempts to change flags where they are not
supported.
1998-06-10 06:34:57 +00:00
peter
f7008b4ff1 Return EOPNOTSUPP rather than EINVAL for flags that are not supported. 1998-06-10 06:30:31 +00:00
peter
6aad18db89 Don't attempt to change owner/mode/flags that don't need to changed.
This should calm down attempts to `cp -p' to a nfs mount or some other
filesystem that doesn't accept flags or all combinations of flags.
It will warn if it fails to change flags though.
1998-06-10 06:29:23 +00:00
julian
538c54fd9e Allow syslogd to separate out kernel log messages with a known
category.
e.g. separate out ipfw entries to a separate file.

Reviewed by:	(briefly) phk
Submitted by:	archie@whistle.com
Obtained from:	Whistle source tree
1998-06-10 04:34:56 +00:00
jdp
aa1c40519a This is a null commit to log the fact that I have done a repository
copy to bring these files into libc from libcompat.  I will enable
them and kill off the libcompat versions on the main branch soon.

PR:		step one toward closing misc/6763
1998-06-10 04:24:21 +00:00
jkh
63968d2c6e Stop including COMPAT_21 unconditionally for X now; that kludge hasn't
been necessary for awhile.
1998-06-10 01:15:46 +00:00
brian
4ff4152e09 Quieten gcc 2.8.1 1998-06-10 00:26:19 +00:00
brian
62a6d48ec9 Cast pid_t to int for sprintf.
Pointed out by: Charlie Sorsby <crs@hgo.net>
1998-06-10 00:16:28 +00:00
brian
7c8026a0e0 Fix a couple of warnings noted with -Wall on FreeBSD-2.1.5.
Pointed out by: Charlie Sorsby <crs@hgo.net>
1998-06-10 00:16:07 +00:00
jb
5728cd1f8f Add a commented out CFLAGS entry that can be uncommented to compile thread
lock debug into libc_r. I don't know if this is the best place to document
this, but at least it is recorded somewhere. 8-)
1998-06-09 23:25:13 +00:00
jb
765df5f4d2 Implement compile time debug support instead of tracking file name and
line number every time a file descriptor is locked.

This looks like a big change but it isn't. It should reduce the size
of libc_r and make it run slightly faster.
1998-06-09 23:21:05 +00:00
jb
5ed1d7e948 Add compile time debug instead of doing this all the time. Reduce the
time that a thread keeps the file descriptor table locked. In particular,
perform malloc/free calls outside the lock and handle the situation
where two threads can race to initialise the table entry for the same
file descriptor.
1998-06-09 23:16:53 +00:00
jb
4d1f252a40 Add support for compile time debug. This is enabled if libc_r is built
with -D_LOCK_DEBUG. This adds the file name and line number to each lock
call and these are stored in the spinlock structure. When using debug
mode, the lock function will check if the thread is trying to lock
something it has already locked. This is not supposed to happen because
the lock will be freed too early.

Without lock debug, libc_r should be smaller and slightly faster.
1998-06-09 23:13:10 +00:00
jb
10b40100e5 POSIX says that pthread_exit() is not allowed to be called from a
cleanup destructor, so trap this case to prevent me from being being
burnt again by applications that try to do this. With this change, an
application (like one using a mis-configured ACE) will exit the process
after displaying a message quoting the POSIX section that the application
has violated.
1998-06-09 23:08:41 +00:00
jb
ca0476a680 Add compile time thread lock debug support.
Add a thread specific flag to trap the case where pthread_exit() is
called from a destructor in violation of the Posix standard.
1998-06-09 23:02:43 +00:00
jb
44521e5a33 Remove __NETBSD_SYSCALLS from CFLAGS now that it is set in sys.mk. 1998-06-09 22:59:16 +00:00
jb
dd948fe380 Rename calls when building libc_r. 1998-06-09 22:57:34 +00:00
jb
14b9607019 Make this thread-safe in both libc as well as libc_r. 1998-06-09 22:56:24 +00:00
jb
2f5fa8684d Rename when building libc_r. 1998-06-09 22:45:39 +00:00
jb
47cdbd2757 Add rename support for libc_r. 1998-06-09 22:43:34 +00:00
ache
6b49c1beaa Fix usage string 1998-06-09 20:19:59 +00:00
brian
681bc52f5f Show the time that we reached maximum throughput.
Submitted by: "Stephane E. Potvin" <sepotvin@videotron.ca>
1998-06-09 18:49:10 +00:00
ache
9587eb787a Indicate optional signal number field 1998-06-09 18:26:16 +00:00
ache
5a97515861 Add optional config file field: signal number to send (defaulted to HUP)
F.e. apache restarts less agressively  on USR1 then on HUP
1998-06-09 18:24:04 +00:00
wpaul
9ac915bc7d Fix potential resource leak: when call to des_crypt_1() fails, remember
to destroy the RPC CLIENT handle before returning.
1998-06-09 17:38:33 +00:00
imp
04f329cb39 sizeof(foo - 1) isn't the same as sizeof(foo) - 1.
Pointed out by: Theo De Raadt.
1998-06-09 14:51:05 +00:00
dfr
9d3db765ca Add (mostly stub) alpha support. Incidentally, it doesn't build on stable
unless I manually construct y.tab.h.  Is this normal?
1998-06-09 14:02:08 +00:00
dt
a89f496cbf Print correct error message if we copy an unreadable directory. 1998-06-09 13:42:51 +00:00
dt
043f2beb05 Fix typo in a comment. 1998-06-09 13:20:29 +00:00
phk
3c3eaf50d5 Add a tc_ prefix to struct timecounter members.
Urged by:	bde
1998-06-09 13:10:54 +00:00
bde
dbddecf49e Pass lists of possible root devices and their names up to the
machine-independent code and try mounting the devices in the
lists instead of guessing alternative root devices in a machine-
dependent way.

autoconf.c:
Reject preposterous slice numbers instead of silently converting
them to COMPATIBILITY_SLICE.

Don't forget to force slice = COMPATIBILITY_SLICE in the floppy
device name.

Eliminated most magic numbers and magic device names in setroot().

Fixed dozens of style bugs.

vfs_conf.c:
Put the actual root device name instead of "root_device" in the
mount struct if the actual name is available.  This is useful after
booting with -s.  If it were set in all cases then it could be used
to do mount(8)'s ROOTSLICE_HUNT and fsck(8)'s hotroot guess better.
1998-06-09 12:52:35 +00:00
jb
1d52ca33dc Implement compile time thread lock debug. 1998-06-09 08:37:35 +00:00
jb
2d48c54020 Rename fstat as _thread_sys_fstat if being built into libc_r. 1998-06-09 08:35:42 +00:00
jb
d209219348 Implement thread support for libc_r. Make the lseek syscall directly
to avoid recursive locking.
1998-06-09 08:34:35 +00:00
jb
05385aab22 Implement compile time debug mode for thread locks. 1998-06-09 08:32:23 +00:00
jb
439aa43648 Add support for thread lock debug. No impact of the malloc code. 1998-06-09 08:30:32 +00:00
jb
fe07ac9fc2 Implement compile time debug support for spinlocks.
Simplify the atomic lock prototype, removing the lock value.

Delete the unlock prototypes that are not required.
1998-06-09 08:28:49 +00:00
jb
ffa7278469 Delete the atomic unlock function since it is no longer required.
Simplify the atomic lock to just write a value of 1 to the lock instead
of taking the value passed by the caller (which just confused things).
1998-06-09 08:25:41 +00:00
jb
6433b79084 Atomic lock asm code for the alpha version of libc_r. 1998-06-09 08:21:55 +00:00
bde
cd35d4abdf Quick fixes for the mtree bootstrap:
- don't announce `mtree' as `mtools'.
- don't install to ${DESTDIR}/usr/sbin (which often doesn't exist if
  DESTDIR is set and may be read-only if DESTDIR is not set).
- install to (${WORLDTMP}/usr/sbin so that the new mtree is actually
  in $PATH if DESTDIR is set.
- don't use the host make or the host sys.mk.  This is probably
  unimportant.
- use a temporary obj dir like the one for `make'.  This was mainly
  necessary because I forgot to remove the MAKEOBJDIRPREFIX unsetting
  which was just a bug for mtree.  A non-quick fix would handle mtree
  more like a bootstrap tool (the only additional complications are to
  create ${BINDIR} and avoid excessive cleaning).  Except a non-quick
  fix would change much more.
1998-06-09 07:19:13 +00:00
imp
b6bacf38ca $@ is deprecated, use longer forms of single char macros 1998-06-09 05:36:48 +00:00
imp
5a2b97449d $@ deprecated, use long form.
PR:	conf/3273
1998-06-09 05:14:43 +00:00
imp
887f1b959b If we get back too much data to fit in result, return NULL. This avoids
a buffer overflow, but might negatively impact those hosts who have
enough aliases to fill MAXHOSTNAMELEN * 2 characters in them.

Good candidate for merging back into -stable.  Lightly tested by me, but
it came from OpenBSD a while ago.

Obtained from: OpenBSD
1998-06-09 05:06:27 +00:00
imp
eba733f6ce Use correct size for readlink buffer. This is the size of the
buffer -1 since readlink adds its own NUL to the end.

Inspired by: Similar changes in OpenBSD
1998-06-09 05:02:29 +00:00
imp
87738602a9 use strncpy correctly
use strncat correctly
check buffer size in graph_name
Change paths from /tmp to /var/run for server sockets

This has been building in my tree for ages, but has remained lightly
tested.
Reviewed by:	jkh ages ago
1998-06-09 05:01:38 +00:00
imp
d07721cd78 o be careful about buffer overflows
o Use snprintf rather than sprintf

This is only lightly tested.
1998-06-09 04:58:36 +00:00
imp
078b9d996a Remove unused strvisx. 1998-06-09 04:35:20 +00:00
imp
8c96be00ef Don't assume that hp->h_lenght == 4. Be conservative in its use.
Submitted by:	 J. Assange a long time ago.
1998-06-09 04:31:02 +00:00