Andrew Gallatin [Fri, 27 Aug 1999 14:47:23 +0000 (14:47 +0000)]
Fix the child's return path from fork so that fork will return 0
in the child. This corrects a problem where linux/alpha binaries see
the child's return value of fork as the parent's pid. This happens because
linux/alpha binaries apparently check the return value directly, rather
than looking for a non-zero value in a4, as *BSD & OSF/1 do.
David E. O'Brien [Fri, 27 Aug 1999 11:02:42 +0000 (11:02 +0000)]
Fix conflicts. This brings in rev 1.2 (FreeBSD native support -- do not
search the multitude of extended include file paths that do not exist)
into EGCS 1.1.2.
David E. O'Brien [Fri, 27 Aug 1999 10:05:08 +0000 (10:05 +0000)]
Don't accept %q length specifiers in the kernel (more precisely,
if compiling with -fformat-extensions). Gcc's format checker never
actually supported %q length specifiers. It treats %q as an alias
for %ll, which is correct if quad_t is long long (e.g., on i386's)
and broken otherwise (e.g., on alphas).
quad_t's currently should be printed in the same way that they
already need to be printed to avoid compiler warnings on all
supported systems: cast them to a standard type that is at least
as large (long or long long) and use the length specifier for that
(%l or %ll). This is problematic since long long isn't standard
yet. C9x's intmax_t should be implemented soon.
Don't accept %L length specifiers in the kernel either. The only
legitimate ones are for long doubles, but the kernel doesn't even
support plain doubles. (gcc bogusly accepts %Ld as an alias for
%lld, and it sometimes prints "q" in error messages about "ll" and
"L" length specifiers, becauses it represents all these specifiers
as 'q'.)
David E. O'Brien [Fri, 27 Aug 1999 10:02:56 +0000 (10:02 +0000)]
Fixed kernel format checking:
- plain %r and %z were disallowed. The hard NULs in the warnings were
hopefully caused by disallowing of plain formats being nonsense.
- new formats for shortening to a byte were allowed, but even the libc
printf doesn't support them.
- old %hr and %hz formats were allowed, but the kernel printf doesn't
support them. The kernel doesn't support %hd either, but this is
harder to fix.
Kazutaka YOKOTA [Fri, 27 Aug 1999 09:20:41 +0000 (09:20 +0000)]
- Retain the previous vty and history buffers when setting up
the graphics mode. This was the behavior prior to syscons.c
rev 1.278, but broken in scvidctl.c rev 1.1.
Sheldon Hearn [Fri, 27 Aug 1999 08:59:32 +0000 (08:59 +0000)]
Add ``-i'' option, which is the same as ``-''. The -i option is the
recommended option in the manpage, but the - option remains for
backward compatibility and is documented as such.
PR: 13363
Reported by: James Howard <howardjp@wam.umd.edu>
Reviewed by: bde
I misunderstood the failure mode - revert BINMODE to 4554. I'm still
going to remove ppp from the installation options in 5 days if ppp is
still broken, however, as it hasn't worked at installation time
for several weeks now and it's only causing people to fill my mailbox
with questions.
I don't know who decided that an install mode of 4544 was correct, but
for a binary it's far from it. This is why sysinstall is unable to run
ppp at startup time and causing weirdies in -current.
Nik Clayton [Thu, 26 Aug 1999 19:50:14 +0000 (19:50 +0000)]
Handle the new Makefile infrastructure in the doc/ repository.
Set ALLLANG to install all the languages, otherwise set DOC_LANG
to just the languages (and encodings) you want to install.
Default to building the html-split (lots of small HTML files, with
links to go between them), html (one big honking HTML file), and plain
text versions of the documentation. Does not compress any of the docs
prior to doing the installation.
Testing and feedback: Jack O'Neill <jack@germanium.xtalwind.net>,
Cockups and typos: nik
Nik Clayton [Thu, 26 Aug 1999 19:48:39 +0000 (19:48 +0000)]
Pull the FDP maintained documents (that's the FAQ, the Handbook, the
tutorials, and all the language translations thereof) out of here. They
still install here, but the installation routine in doc/ sorts that
out.
Simplify the handling of VCHR and VBLK vnodes using the new dev_t:
Make the alias list a SLIST.
Drop the "fast recycling" optimization of vnodes (including
the returning of a prexisting but stale vnode from checkalias).
It doesn't buy us anything now that we don't hardlimit
vnodes anymore.
Rename checkalias2() and checkalias() to addalias() and
addaliasu() - which takes dev_t and udev_t arg respectively.
Make the revoke syscalls use vcount() instead of VALIASED.
Remove VALIASED flag, we don't need it now and it is faster
to traverse the much shorter lists than to maintain the
flag.
vfs_mountedon() can check the dev_t directly, all the vnodes
point to the same one.
Greg Lehey [Thu, 26 Aug 1999 03:26:39 +0000 (03:26 +0000)]
complete_rqe: explicitly reinitialize b.b_iodone. This shouldn't have
changed, but we've seen some weird cases of b_iodone
being NULL, and they don't make any sense.
Greg Lehey [Thu, 26 Aug 1999 03:25:38 +0000 (03:25 +0000)]
config_plex: don't allocate a rangelock struct.
lockrange: correctly expand rangelock struct, including expanding a
null struct. Previously lockrange would attempt to lock a
NULL pointer under these circumstances.
Peter Wemm [Thu, 26 Aug 1999 00:45:36 +0000 (00:45 +0000)]
unifdef -DINTERNAL_LS - it's too useful to be off by default. If anyone
really dislikes this, we could add a switch to disable it at runtime and
check in popen.c.
Peter Wemm [Wed, 25 Aug 1999 23:50:03 +0000 (23:50 +0000)]
Use .p2align to ensure consistant a.out/elf alignment. I'd have used
SUPERALIGN_TEXT, but this is inline assembler and after cpp has run.
Inspired by bde's comments on linux_locore.s.
Peter Wemm [Wed, 25 Aug 1999 23:42:02 +0000 (23:42 +0000)]
It would help if things that MUST be 32 bit aligned were really 32 bit
aligned. If I recall correctly, this is to ensure apic_imen can be
accessed in a single bus cycle. Also, use TEXT_ALIGN rather than a
.align 2 (which means 2 byte align on ELF and 4 byte align on a.out)
Marcel Moolenaar [Wed, 25 Aug 1999 15:23:54 +0000 (15:23 +0000)]
Fix linux_newlstat in that it doesn't return the attributes of its containing
directory. Also, update arguments of NDINIT for both newstat and newlstat.
While I'm at it, fix style bugs in all {s|ls|fs}tat syscalls.
Marcel Moolenaar [Wed, 25 Aug 1999 14:11:01 +0000 (14:11 +0000)]
Fix {g|s}etgroups semantics. We use cr_groups[0] to hold egid. This means that
egid will be twice in the set and that setting cr_groups[0] will change egid.
This is simply solved by ignoring cr_groups[0]. That is; linux_getgroups does
not return cr_groups[0] and linux_setgroups does not touch it.
Noticed by: bde
Brought to my attention by: sheldonh
Marcel Moolenaar [Wed, 25 Aug 1999 11:19:03 +0000 (11:19 +0000)]
Change all UNIMPL syscalls to STD and add them to linux_dummy. Now we always
know if and when an unimplemented or obsoleted syscall is being used. Make the
message more end-user friendly.
And as long as we're here, rename some unimplemeted syscalls (linux_phys ->
linux_umount2, linux_vm86 -> linux_vm86old, linux_new_vm86 -> linux_vm86).
Change prototype for linux_newuname from `struct linux_newuname_t *' into
`struct linux_new_utsname *'. This change is reflected in linux.h and
linux_misc.c.
Marcel Moolenaar [Wed, 25 Aug 1999 11:17:36 +0000 (11:17 +0000)]
Change all UNIMPL syscalls to STD and add them to linux_dummy. Now we always
know if and when an unimplemented or obsoleted syscall is being used. Make the
message more end-user friendly.
And as long as we're here, rename some unimplemeted syscalls (linux_phys ->
linux_umount2, linux_vm86 -> linux_vm86old, linux_new_vm86 -> linux_vm86).
Change prototype for linux_newuname from `struct linux_newuname_t *' into
`struct linux_new_utsname *'. This change is reflected in linux.h and
linux_misc.c.
Lastly, make line-continuation and indentation more uniform.
Marcel Moolenaar [Wed, 25 Aug 1999 09:05:29 +0000 (09:05 +0000)]
Fix stack misalignment for Linux binaries caused by `linux_sigcode' not being
a multiple of 4 bytes in size. This solves the recent SIGBUS errors for
glibc2.1 configurations.
Peter Wemm [Wed, 25 Aug 1999 06:44:32 +0000 (06:44 +0000)]
Use the far jump for the base of the page arithmatic rather than the
calling function, otherwise Bad Things Happen(tm) when bios16_call is
not in the same page as bios_jmp.
Bruce Evans [Wed, 25 Aug 1999 03:01:54 +0000 (03:01 +0000)]
Don't open the swap file. The open descriptor for it hasn't been used
for over 5 years since we switched to using procfs for kvm_uread().
This cleanup was motivated by recent breakage of the default swap file
(/dev/drum) when swapon() has not been called.
Julian Elischer [Wed, 25 Aug 1999 02:04:40 +0000 (02:04 +0000)]
Make DEVFS ops reflect some of the changes that have recently occured in the
specfs version of the same ops. Merging with phk's dev_t changes is not yet
complete.
i.e. devfs still uses it's own devsw pointer rather than following
devsw(a_vp->v_rdev), and it's own copy of the dev_t.
This fixes some broken actions re: syscons and DEVFS due to bitrot in
devfs vops.
Mike Smith [Tue, 24 Aug 1999 16:42:08 +0000 (16:42 +0000)]
Work around a bad design in some PnP BIOS code whereby the BIOS can reach
off the top of our constructed stack segment while it's trying to copy a
maximally-sized PnP argument frame around.
Sheldon Hearn [Tue, 24 Aug 1999 08:39:41 +0000 (08:39 +0000)]
Fix bug introduced in rev 1.28, which causes kernel build to break for
the case where DEBUG is defined but not DIAGNOSTIC. ffs_checkblk is
declared conditionally on DIAGNOSTIC, not DEBUG.
Brian Feldman [Tue, 24 Aug 1999 05:58:35 +0000 (05:58 +0000)]
When the SYSINIT() was removed, it was replaced with a make_dev on-demand
creation of /dev/drum via calling swapon. However, the make_dev has a
bogus (insofar that it hasn't been added yet) cdevsw, so later we end
up crashing with a null pointer dereference on the swap vp's specinfo.
The specinfo points to a dev_t with a major of 254 (uninitialized), and
we get a crash on its d_strategy being called.
The simple solution to this is to call cdevsw_add before the make_dev
is ever used. This fixes the panic which occurred upon swapping.
Kazutaka YOKOTA [Tue, 24 Aug 1999 04:26:54 +0000 (04:26 +0000)]
Correct the mode information for the VGA mode X.
- This mode uses four planes rather than one.
- "# of bytes in a scan line" = "# of pixels in the line"/2