Go to file
dyoung 1ee8f4a418 Extract common code from i386, xen, and sparc64, creating
config_handle_wedges() and read_disk_sectors().  On x86, handle_wedges()
is a thin wrapper for config_handle_wedges().  Share opendisk()
across architectures.

Add kernel code in support of specifying a root partition by wedge
name.  E.g., root specifications "wedge:wd0a", "wedge:David's Root
Volume" are possible.  (Patches for config(1) coming soon.)

In support of moving disks between architectures (esp. i386 <->
evbmips), I've written a routine convertdisklabel() that ensures
that the raw partition is at RAW_DISK by following these steps:

        0 If we have read a disklabel that has a RAW_PART with
          p_offset == 0 and p_size != 0, then use that raw partition.

        1 If we have read a disklabel that has both partitions 'c'
          and 'd', and RAW_PART has p_offset != 0 or p_size == 0,
          but the other partition is suitable for a raw partition
          (p_offset == 0, p_size != 0), then swap the two partitions
          and use the new raw partition.

        2 If the architecture's raw partition is 'd', and if there
          is no partition 'd', but there is a partition 'c' that
          is suitable for a raw partition, then copy partition 'c'
          to partition 'd'.

        3 Determine the drive's last sector, using either the
          d_secperunit the drive reported, or by guessing (0x1fffffff).
          If we cannot read the drive's last sector, then fail.

        4 If we have read a disklabel that has no partition slot
          RAW_PART, then create a partition RAW_PART.  Make it span
          the whole drive.

        5 If there are fewer than MAXPARTITIONS partitions,
          then "slide" the unsuitable raw partition RAW_PART, and
          subsequent partitions, into partition slots RAW_PART+1
          and subsequent slots.  Create a raw partition at RAW_PART.
          Make it span the whole drive.

The convertdisklabel() procedure can probably stand to be simplified,
but it ought to deal with all but an extraordinarily broken disklabel,
now.

i386: compiled and tested, sparc64: compiled, evbmips: compiled.
2007-06-24 01:43:34 +00:00
bin Remove a "CFLAGS+=-g" that seems to have snuck in with no good reason. 2007-06-22 03:24:16 +00:00
common Apply the patch, with some minor tweaks, supplied in PR/36513. 2007-06-21 21:37:04 +00:00
crypto From Paul Winder <Paul.Winder@tadpole.com>: 2007-06-07 20:04:26 +00:00
dist Move my own code from a 4 clause to a 3 clause licence. 2007-06-16 23:13:25 +00:00
distrib add newgrp.debug. 2007-06-23 05:25:29 +00:00
doc Document how to import new services and protocols files. 2007-06-23 18:16:46 +00:00
etc sync with IANA 2007-06-23 18:15:28 +00:00
games Increased WARNS to 4, since it passes both gcc333 and gcc411 on i386. 2007-06-06 06:10:50 +00:00
gnu re-run mknative with GCC 4.1.3 2007-06-21 16:58:44 +00:00
include - Misc cleanups to make the code more readable. 2007-06-03 17:41:19 +00:00
lib Since we are going to be looking for ports many times, use a centralized 2007-06-23 17:32:08 +00:00
libexec PR/36468: Andreas Wrede: ftpd(8) always logs hostnames. Add -n option to display 2007-06-10 20:24:31 +00:00
regress Remove debugging code accidently left in the original commit. This should 2007-06-19 20:44:28 +00:00
rescue libssp is no more 2007-05-30 14:25:32 +00:00
sbin Produce more useful error messages. 2007-06-11 04:22:00 +00:00
share struct dirent is padded to an 8 byte boundary according to sys/dirent.h. 2007-06-22 15:03:40 +00:00
sys Extract common code from i386, xen, and sparc64, creating 2007-06-24 01:43:34 +00:00
tools Instead of inventing a new environment variable to override the 2007-06-07 14:36:27 +00:00
usr.bin Add the newgrp(1) utility, which changes effective group ID. This 2007-06-21 14:09:23 +00:00
usr.sbin Don't use __arraycount because this is a 700L, and toolz have messed up 2007-06-23 23:18:29 +00:00
x11 build sunffb and xf8_32wid on sparc 2007-04-22 23:42:38 +00:00
build.sh Fix some problems with the change from revision 1.167: 2007-04-14 10:50:48 +00:00
BUILDING Document recent changes to "make iso-image". 2007-04-13 19:43:38 +00:00
Makefile Add an iso_image target (iso-image as a target name doesn't play well with 2007-03-06 21:56:47 +00:00
Makefile.inc
UPDATING Nuke most of 2000-2006, but keep 1 year worth of changes. 2007-06-10 00:45:08 +00:00