Commit Graph

28321 Commits

Author SHA1 Message Date
bde
0c33af9265 Guess the position of the drive number in the device name better so
that `fsck -p' doesn't check multiple slices on the same drive
concurrently.  Don't invoke undefined behaviour when searching for
the drive number in strange device names.

PR:		6129
Reviewed by:	phk
Submitted by:	Yuichi MATSUTAKA <matutaka@osa.att.ne.jp>, but rewritten
		by me.
1998-04-07 12:43:57 +00:00
kato
ab8f0419da Sync with sys/i386/isa/npx.c revision 1.58. 1998-04-07 09:09:41 +00:00
kato
7354b70a08 Sync with sys/i386/conf/files.i386 revision 1.196. 1998-04-07 09:08:27 +00:00
kato
c04e14dfb2 Sync with sys/i386/i386/machdep.c revision 1.294. 1998-04-07 09:07:53 +00:00
peter
33b5f6b63d Today is not my lucky day. Fix missing brace and I got a request
to use EMLINK instead.
1998-04-06 19:32:37 +00:00
peter
b5d3779b73 Fix VM86 compiles. a #include "opt_vm86.h" was missing, and the my_tr
variable was needed in the non-SMP case.

Submitted by:  Jonathan Lemon <jlemon@americantv.com>
1998-04-06 18:59:15 +00:00
peter
db031c687b Use a different errno (ELOOP (as sef mentioned) since the text that goes
with the error sounds ok for the condition) if O_NOFOLLOW gets a link.
1998-04-06 18:43:28 +00:00
peter
b0a513624f Rather than let users get fd's to symlink files, make O_NOFOLLOW cause
an error if it gets a link (like it does if it gets a socket).  The
implications of letting users try and do file operations on symlinks
themselves were too worrying.
1998-04-06 18:25:21 +00:00
peter
14414bee85 Back this out, allowing users to get a fd connected to a symlink is
just too dangerous.
1998-04-06 18:18:50 +00:00
peter
b2396f73c8 Don't panic if a VOP_READ() gets through on a short link, Just Do It
(because we can :-).  This means you can open a link file (or pseudo-file
in the case of short links where the data is stored in the inode rather
than disk blocks) and read the contents.
However, trap any writes from the user as it's difficult to do the right
thing in all cases.  A link may be short and the user may be trying to
extend it beyond the limit and so on.  Although.. being able to re-target
a symlink without deleting it first might have been nice.
This stuff is a bit perverse since symlink() and readlink() calls can
end up actually being implemented as read/write vnode ops.

Reviewed by: phk
1998-04-06 17:44:40 +00:00
peter
d5ab1c3759 Implement a new open(2) flag: O_NOFOLLOW. This will instruct open
to not follow symlinks, but to open a handle on the link itself(!).
As strange as this might sound, it has several useful applications
safe race-free ways of opening files in hostile areas (eg: /tmp, a mode
1777 /var/mail, etc).  It also would allow things like fchown() to work
on the link rather than having to implement a new syscall specifically for
that task.

Reviewed by: phk
1998-04-06 17:38:43 +00:00
peter
7c3222498a Add a new -F flag which is a superset of -f. It will cause tail to
stat() the file being followed and do a close/reopen if the file has been
renamed and/or rotated.  This is damn useful for leaving running on files
in /var/log when newsyslog(8) rotates them.
1998-04-06 16:13:49 +00:00
peter
6e3ec235ff curproc is initialized in locore at the same time for both SMP and UP now. 1998-04-06 15:51:22 +00:00
peter
93c5e9e460 remove #ifdef declaration of npxproc, use globals.s and the extern always. 1998-04-06 15:50:29 +00:00
peter
3a2f3b0303 add globals.s for data that is treated differently on SMP. 1998-04-06 15:49:35 +00:00
peter
32a92c71b6 Use real types for the SMP pages being allocated rather than arrays of
ints.  Remove some no longer needed casts.  Initialize the per-cpu
global data area using the structs rather than knowing too much about
layout, alignment, etc.
1998-04-06 15:48:30 +00:00
peter
1a4b1c6550 clean up #ifdefs, define the variables that have to be per-cpu on SMP
in globals.s only and use externs always.
1998-04-06 15:46:17 +00:00
peter
5164f19dff _curpcb is always defined in globals.s instead of here in #ifdefs 1998-04-06 15:44:31 +00:00
peter
7f380682ae Bogus casts 1998-04-06 15:43:29 +00:00
peter
1e48b96ed9 Defunct, now part of globals.s 1998-04-06 15:42:54 +00:00
peter
62b8130425 Rather than filling this file up with SMP .sets, use those from
globals.s instead.
Initialize curproc in the same place for both UP and SMP.
1998-04-06 15:42:26 +00:00
peter
a31fe28469 Generate #defines that the asm code can access for the per-cpu data
structures.
1998-04-06 15:40:10 +00:00
peter
d7e0d95d1e generate .sets for variables used in asm and C that are stored in per-cpu
space under SMP.
1998-04-06 15:39:09 +00:00
peter
531b8c0e84 A pair of C structures used for laying out the SMP per-cpu data space. 1998-04-06 15:37:21 +00:00
peter
45ae9cd4b8 some missing symbols 1998-04-06 15:33:02 +00:00
phk
45ced96af0 Use getmicrotime() for if_lastchange, 10msec is plenty precision. 1998-04-06 11:43:12 +00:00
phk
fe94bc8288 Use random() to find our initial xid. 1998-04-06 11:41:07 +00:00
phk
4b6dfe92bd Use read_random() 1998-04-06 11:40:42 +00:00
phk
1e2405b5f1 Use random() for seq numbers and read_random for CHAP challenge. 1998-04-06 11:40:17 +00:00
phk
5394eb1aa3 Use random() rather then than homegrown stuff. 1998-04-06 11:39:04 +00:00
phk
b4d5f00838 Remove stuff related to microtime.s, which is gone. 1998-04-06 11:38:18 +00:00
phk
86ff9d1a6e Use getmicrotime insted of microtime, we only use the second part. 1998-04-06 11:37:17 +00:00
phk
ab5541db4c Make read_random() take a (void *) argument instead of (char *) 1998-04-06 09:30:42 +00:00
phk
3c122bd961 Make a kernel version of the timer* functions called timerval* to be
more consistent.

OK'ed by:	bde
1998-04-06 08:26:08 +00:00
ahasty
011360bdd9 take out opt_bktr.h from brooktree848.c 1998-04-06 07:57:55 +00:00
phk
e9827cb58f Remove the last traces of TUBA.
Inspired by:	PR kern/3317
1998-04-06 06:52:47 +00:00
charnier
fe8f3a58ea Prevent rdist from dumping core: do not free() pointer before using it.
Add rcsid. Document -D flag (debug mode). Remove unused includes.
PR:bin/3158 (part 1)
1998-04-06 06:18:32 +00:00
peter
631390e349 Really make this compile..
Pointed out by: bde
1998-04-06 05:11:42 +00:00
kato
81a8571091 Sync with sys/i386/isa/clock.c revision 1.119. 1998-04-06 03:38:18 +00:00
kato
f5a109a74e Sync with sys/i386/isa/syscons.c revision 1.258. 1998-04-06 03:37:55 +00:00
ahasty
17e8d9b9ca Reviewed by: Amancio
Submitted by:	Frank Nobis  <fn@Radio-do.de>

Mods to view german cable tv and minor fix to correctly identify bt849.
1998-04-05 20:57:46 +00:00
phk
b3e4247d70 Commit a much more functional version of this driver. 1998-04-05 19:26:08 +00:00
ache
cf4f0083bb Print explanation diagnostics when mount is impossible
Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
1998-04-05 13:10:11 +00:00
phk
2fdb617aee More fixes for the iterative case of nanosleep1 from bruce.
I hate the 2-arg time{spec|val}{add|sub} functions!
1998-04-05 12:10:41 +00:00
phk
ef09a47a6d Make the dummy timecounter run at 1 MHz rather than 100kHz (noticed by bde)
fix the itimer(REAL) handling.
1998-04-05 11:49:36 +00:00
peter
0a735b0829 If there is no error code, don't copyout the remaining time. (As
documented in the man page and the standards).  (and besides, nanosleep1
isn't setting it in this case at present anyway, so we'd be copying junk).
1998-04-05 11:17:19 +00:00
phk
08f33aeded Fix nanosleep1 based on Bruces suggestion. 1998-04-05 10:28:01 +00:00
ache
e0d8a4a2e6 Remove unused atv.tv_usec = 0; from select/poll code 1998-04-05 10:03:52 +00:00
peter
2a16d50561 tsleep() returns EWOULDBLOCK if the timeout expired. Don't return this
to usermode, otherwise sleep(3) fails, cron doesn't work, etc etc etc.
1998-04-05 07:31:44 +00:00
peter
fdb7a2eb67 Maybe fix netkey. I am not sure how to test this.. 1998-04-05 05:19:00 +00:00