marcel [Tue, 28 May 2002 09:04:48 +0000 (09:04 +0000)]
Add support to GEOM for GUID Partition Tables (GPTs). The support
is currently conditional on both the GEOM and GEOM_GPT options to
avoid getting GPT by default and having the MBR and GPT classes
clash.
The correct behaviour of the MBR class would be to back-off (reject)
a MBR if it's a Protective MBR (a MBR with a single partition of type
0xEE that spans the whole disk (as far as the MBR is concerned).
The correct behaviour if the GPT class would be to back-off (reject)
a GPT if there's a MBR that's not a Protective MBR.
At this stage it's inconvenient to destroy a good MBR when working
with GPTs that it's more convenient to have the MBR class back-off
when it detects the GPT signature on disk and have the GPT class
ignore the MBR.
In sys/gpt.h UUIDs (GUIDs) for the following FreeBSD partitions
have been defined:
GPT_ENT_TYPE_FREEBSD
FreeBSD slice with disklabel. This is the equivalent of
the well-known FreeBSD MBR partition type.
GPT_ENT_TYPE_FREEBSD_{SWAP|UFS|UFS2|VINUM}
FreeBSD partitions in the context of disklabel. This is
speculating on the idea to use the GPT to hold partitions
instead if slices and removing the fixed (and low) limits
we have on the number of partitions.
This commit lacks a GPT image for the regression suite.
des [Tue, 28 May 2002 06:52:21 +0000 (06:52 +0000)]
If unable to retrive maxfiles / openfiles, fail rather than print garbage.
Gratuitously rename a couple of variables.
Remove unused macros.
Add NAI copyright.
des [Tue, 28 May 2002 06:37:27 +0000 (06:37 +0000)]
Remove the code that was disabled in a recent commit; it is of very limited
use and has been broken in -CURRENT for a long time.
Clean up unneeded entries in the nlist array.
Implement kvm-backed ttymode (which we never had before). Incomplete as we
do not (yet?) print the correct device, sid or pgid.
marcel [Tue, 28 May 2002 06:16:08 +0000 (06:16 +0000)]
Add uuidgen(2) and uuidgen(1).
The uuidgen command, by means of the uuidgen syscall, generates one
or more Universally Unique Identifiers compatible with OSF/DCE 1.1
version 1 UUIDs.
From the Perforce logs (change 11995):
Round of cleanups:
o Give uuidgen() the correct prototype in syscalls.master
o Define struct uuid according to DCE 1.1 in sys/uuid.h
o Use struct uuid instead of uuid_t. The latter is defined
in sys/uuid.h but should not be used in kernel land.
o Add snprintf_uuid(), printf_uuid() and sbuf_printf_uuid()
to kern_uuid.c for use in the kernel (currently geom_gpt.c).
o Rename the non-standard struct uuid in kern/kern_uuid.c
to struct uuid_private and give it a slightly better definition
for better byte-order handling. See below.
o In sys/gpt.h, fix the broken uuid definitions to match the now
compliant struct uuid definition. See below.
o In usr.bin/uuidgen/uuidgen.c catch up with struct uuid change.
A note about byte-order:
The standard failed to provide a non-conflicting and
unambiguous definition for the binary representation. My initial
implementation always wrote the timestamp as a 64-bit little-endian
(2s-complement) integral. The clock sequence was always written
as a 16-bit big-endian (2s-complement) integral. After a good
nights sleep and couple of Pan Galactic Gargle Blasters (not
necessarily in that order :-) I reread the spec and came to the
conclusion that the time fields are always written in the native
by order, provided the the low, mid and hi chopping still occurs.
The spec mentions that you "might need to swap bytes if you talk
to a machine that has a different byte-order". The clock sequence
is always written in big-endian order (as is the IEEE 802 address)
because its division is resulting in bytes, making the ordering
unambiguous.
asmodai [Tue, 28 May 2002 06:03:50 +0000 (06:03 +0000)]
Remove, with extreme prejudice, the notion that /tmp best needs to be a
softlink to /var/tmp.
This is horribly wrong since /tmp and /var/tmp serve different goals.
Even given the text that in the old days things were different doesn't help,
since our scripts clean /tmp, and we depend on /var/tmp to persist for
vi editing sessions recovery and other likewise applications.
marcel [Tue, 28 May 2002 05:58:06 +0000 (05:58 +0000)]
Add syscall uuidgen() for generating Univerally Unique Identifiers
(UUIDs). On ia64 UUIDs, aka GUIDs, are used by EFI and the firmware
among others. To create GUID Partition Tables (GPTs), we need to
be able to generate UUIDs.
des [Tue, 28 May 2002 05:40:53 +0000 (05:40 +0000)]
Introduce struct xtty, used when exporting tty information to userland.
Make kern.ttys export a struct xtty rather than struct tty. Since struct
tty is no longer exposed to userland, remove the dev_t / udev_t hack.
mike [Tue, 28 May 2002 04:32:25 +0000 (04:32 +0000)]
Prepend BIG_ENDIAN, BYTE_ORDER, LITTLE_ENDIAN, and PDP_ENDIAN with an
underscore. This is the preferred form. Also fix a preprocessor
syntax error in an error-detection section.
dwmalone [Mon, 27 May 2002 13:39:01 +0000 (13:39 +0000)]
As far as I can tell, the maximum packet size for 802.11b is 2346,
which means that the valid range for the RTS threshold is 0-2347.
The default is definitely 2347.
benno [Mon, 27 May 2002 11:18:12 +0000 (11:18 +0000)]
Get the correct memory regions from OpenFirmware. We were getting the
"available" ranges, not the "physical" ranges. Clean up some of the
bootstrap code in the process.
Submitted by: Peter Grehan <peterg@ptree32.com.au>
robert [Mon, 27 May 2002 11:01:30 +0000 (11:01 +0000)]
- Move the loop conditional into the "for" header.
- Remove redundant "? :" construct.
style(9):
- Place a space after return statements.
- Compare pointers to NULL.
- Do not use ! to compare a character to nul.
marcel [Mon, 27 May 2002 07:54:43 +0000 (07:54 +0000)]
Work around a memory fault on ia64 caused by having the 1MB buffer on
the stack in DoFile(). This needs some investigation. In the mean time
we do a one time malloc() for the buffer to have it on the heap instead.
tjr [Mon, 27 May 2002 03:17:28 +0000 (03:17 +0000)]
From NetBSD:
Revision 1.10 Sat Oct 14 17:41:55 2000 UTC by bjh21
Don't core dump with an empty format string. Fixes PR#11218.
Patch supplied by Launey Thomas.
joe [Sun, 26 May 2002 22:11:34 +0000 (22:11 +0000)]
MFNetBSD:
revision 1.124
date: 2002/05/26 03:10:02; author: minoura; state: Exp; lines: +3 -3
Clear done_head in the HCCA *before* acknoledging the interrupt.
Driver lost some completed transfers under heavy loads.
NetBSD have adopted our way of using the KERNADDR macro. Update
the revision tags to show that we're in sync, and remove the casts
that they did in their adaptation.
ue [Sun, 26 May 2002 19:35:41 +0000 (19:35 +0000)]
The pre-release sweep continues:
Just update the 'original revision' markers of some files where the last
update of the english version has no impact on the translated version
(spelling checks are a premium cause of this) except making it harder
to find the changes that still need to be translated/comitted.
phk [Sun, 26 May 2002 17:17:25 +0000 (17:17 +0000)]
Only clear the spoiled flag if the class had no spoiled method, the spoiled
method may have deallocated the consumer already and modifying free()'ed
memory is bad style.
obrien [Sun, 26 May 2002 16:04:37 +0000 (16:04 +0000)]
The special checks for %b and %D in rev 1.1 were done before skipping over
any characters between the % and the [bD], so only plain %b and %B worked.
This may un-1/2ass our -fformat-extensions support.
alc [Sun, 26 May 2002 04:54:56 +0000 (04:54 +0000)]
o Acquire and release Giant around pmap operations in vm_fault_unwire()
and vm_map_delete(). Assert GIANT_REQUIRED in vm_map_delete()
only if operating on the kernel_object or the kmem_object.
o Remove GIANT_REQUIRED from vm_map_remove().
o Remove the acquisition and release of Giant from munmap().
brooks [Sat, 25 May 2002 20:17:04 +0000 (20:17 +0000)]
Move all unit number management cloned interfaces into the cloning
code. The reverts the API change which made the <if>_clone_destory()
functions return an int instead of void bringing us into closer
alignment with NetBSD.
markm [Sat, 25 May 2002 19:36:09 +0000 (19:36 +0000)]
This directory (whis was supposed to do indexes etc for the printable
documentation) hasn't had its nappies changed since FreeBSD-2.0, and
is now starting to smell rather ripe.
Its dependant on ancient and removed tools, and the last maintainer
can't remember looking at it 1 1/2 years ago.