Commit Graph

177 Commits

Author SHA1 Message Date
ru
f6aa4621fd Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
markm
90f91e7879 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
luigi
7d2b7cf0e9 Implement a '-f' flag to teach bsdlabel to work on files instead of
disk partitions.
2004-03-30 23:15:03 +00:00
jhb
5670428480 When installing boot blocks into an Alpha BSD label, setup the location,
length, and flags fields at the end of the SRM boot sector so that SRM can
find the bootstrap code.  This fixes bsdlabel -m alpha to generate bootable
disklabels.

Reviewed by:	phk
2004-03-15 23:10:34 +00:00
nyan
e535657797 '-DPC98' is not needed. 2004-01-11 09:11:10 +00:00
phk
2d32752eb9 Only automatically create an 'a' partition when there is nothing
but a 'c' partition.
2003-10-18 19:32:35 +00:00
iedowse
24155b3ff1 Remove the hardcoded default block/frag/cpg values from bsdlabel
and the logic for setting them according to the partition size.
Instead, unspecified filesystem values are left at 0 so that newfs
will use its own defaults. It just caused confusion to have the
defaults duplicated in two different places.

Reviewed by:	phk
2003-10-05 19:40:02 +00:00
ru
1edcd1b018 mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
ru
1c23ef339b mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
phk
947bcdc573 When we initialize a disk with a virgin label, create also an 'a'
partition which starts after the bootstrap area and fills the entire
disk.
2003-08-27 22:34:57 +00:00
phk
d25df9535b Augh! Fix the sparc64 build:
If we don't have a default label location for the compiled architecture,
insist that a -m <architecture> option is specified.
2003-06-07 22:02:01 +00:00
phk
10afeb8271 Sanitize setting of labeloffset and labelsector. 2003-06-07 09:09:39 +00:00
phk
56091404e8 Give ia64 the exact same semantics as i386 with respect to non-512
byte sector devices.
2003-06-04 05:25:04 +00:00
marcel
781a492a3e Unbreak ia64. 'nuff said. 2003-06-04 02:01:05 +00:00
phk
2550ebdaa6 Fix sectorsize != 512 on i386 and pc98. Add test cases for same. 2003-06-02 14:19:31 +00:00
phk
069191fcbf Simplify the GEOM OAM api: Drop the request type, and let everything
hinge on the "verb" parameter which the class gets to interpret as
it sees fit.

Move the entire request into the kernel and move changed parameters
back when done.
2003-06-01 13:47:51 +00:00
phk
f1c49df79e Add pc98 arch to test set.
Remove ktrace which leaked out of test-setup.
2003-06-01 09:30:53 +00:00
obrien
a3c77bad15 Protext copyright[]. 2003-05-31 15:42:56 +00:00
ru
8bc4d4bba7 mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-24 19:53:08 +00:00
peter
4597dace1f Add amd64 to the MACHINE_ARCH list of systems that link bsdlabel to
disklabel.  I just got burnt again by having an old disklabel binary
kicking around.

Discussed with: phk
Approved by:    re (safe amd64 stuff)
2003-05-23 06:08:28 +00:00
ru
b0ddc74ad2 Style fixes.
Reviewed by:	phk
Approved by:	re (scottl)
2003-05-17 19:06:45 +00:00
ru
7ffefb5839 Moved libgeom.so dependencies to where they belong.
Reviewed by:	phk
Approved by:	re (scottl)
2003-05-17 19:05:17 +00:00
phk
3b9288c6f4 Add pc98 archtecture entry.
Approved by:	re/rwatson
2003-05-13 19:42:52 +00:00
phk
c4e628afb8 Before reading an ascii label, initialize with defaults so that
getasciipartspec() has a sectorisize in case it needs one.

Approved by:	re/jhb
2003-05-09 20:26:17 +00:00
phk
769c145dbe Sigh, this shows just how much one can be conditioned my the environment:
Just because we for the last ten years have fought for every byte
in the boot code on i386, doesn't mean that other architectures could
not actually have space to spare there.

Remore debugging message.
2003-05-09 19:07:59 +00:00
phk
fe7b626383 Compile bsdlabel on all platforms.
Install a link to the disklabel(8) name on i386 and alpha platforms.

Leave old disklabel(8) sources intact but disconnected from the build
for now.
2003-05-05 21:28:08 +00:00
phk
1067d41da3 Add transparent handling of mbroffset for backwards compatibility. 2003-05-04 19:27:22 +00:00
phk
a3b8d0b40b More axe-work:
Hide all the historical fields of the label, unless people ask for them with -A,
set them to intelligently chosen defaults otherwise.

Distill the manual page to remove inaccuracies, misundertandings and obsolete
information.  It can probably still be done better but now at least it is
not misinforming people.
2003-05-03 09:58:20 +00:00
phk
51336ad9ea Some minor remodelling with a large axe. 2003-05-03 09:02:27 +00:00
phk
2d603e9073 Use new geom.ctl based OAM instead of ioctls.
Various cleanup.
2003-05-03 08:04:24 +00:00
phk
023c16ae05 bsd_disklabel_le_dec() takes an extra argument now. 2003-05-02 22:46:44 +00:00
phk
283a9b563b Vastly simplify architecture handling: Use properties of label as
recorded in global variables, rather than checks on the architecture.

Drop horribly code to handle MBR/PC98's embedded in the BSD label area.
If you need to have an MBR or PC98 on your disk, you should not overlap
it with a BSDLABEL, if you don't need it, this code is nothing but trouble.
2003-05-02 20:14:48 +00:00
phk
da6f75bd54 Default the location to the compiled for architecture if no -m arg specified. 2003-05-02 20:02:11 +00:00
phk
55aa7c2b5c Add three global variables which contain the location, size and a flag
for the alpha checksum, and set them depending on the specified architecture

Don't look for disklabels every 16 bytes, look the only place they should
be for the current architecture.

Always read the label from the raw disk and decode it into struct
disklabel rather than trust a cast from random addresses.

When writing to the raw disk, encode the label properly.
2003-05-02 19:58:08 +00:00
phk
865a4611c8 Pull in geom_bsd_enc.c from sys/geom to encode and decode our labels. 2003-05-02 19:54:18 +00:00
phk
872854ec00 Remove the well-intentioned, but ill thought out check which prevents us
from dd(1)'ing the boot code off one drive and have bsdlabel write it
on another.
2003-05-02 19:14:38 +00:00
phk
cf0500a874 Update the test-script based on the sunlabel version, but put a for-loop
in there to run over the various architectures.
2003-05-02 19:12:20 +00:00
phk
90f1f27caa Add the beginning of a regression test.
So far it checks the overwrites of the BSD label inband (ie: dd
if=/dev/ad0a of=/dev/ad2a).

This excercises the geom::slice::hotspot code.
2003-04-18 22:20:46 +00:00
phk
8f433e738c First scrub of s/disklabel/bsdlabel/
bsdlabel.5 deliberately exempted, its contents looks less than useful.
2003-04-18 19:44:12 +00:00
trhodes
24d5a111cf Quick grammar fix. 2003-04-17 17:36:31 +00:00
yar
98acc8a3d7 Don't die of SIGSEGV on a missing fstype field
in a saved disklabel file.

MFC after:	1 week
2003-04-01 14:44:53 +00:00
seanc
44afb4dc11 Small mdoc fix 2003-03-29 02:09:02 +00:00
ru
6284f56b71 Teach disklabel(8) about different hardware architectures.
This is aimed at creating floppies during cross-releases.
For different endianness machines, a tool like bswapfs(8)
is necessary to make the generated floppies readable on
the target machine.  While here, fixed unaligned access
on Alphas.

Tested on:	i386, alpha
2003-03-16 00:11:49 +00:00
ru
ac112fdb57 Give this manpage a good overhaul, including the markup.
Notable changes:

- Removed the "disktype" argument from the -B only synopsis
  form.  This form doesn't touch the disk label, and doesn't
  use this argument.

- Fixed the first example in the EXAMPLES section.  Support
  for compatibility slices has been recently dropped from
  the GEOM kernels, and a bit later GEOM became standard.

- Removed the buggy notion from rev. 1.37 that disklabel(8)
  may be used to define mount points; it cannot.  Improve
  some DOS partition / FreeBSD slice wording.  Among these,
  ``dangerously-dedicated slice'' was just a nonsense.  ;-)
2003-03-15 22:00:45 +00:00
ru
92ca4bb33a Properly mark "auto" as a keyword. 2003-03-14 09:38:54 +00:00
ru
5ecd4995a5 Deal with vestiges of d_boot[01]. 2003-02-23 01:48:42 +00:00
phk
a27e16309d If we fail to open O_RDWR, try opening O_RDONLY, if we use ioctls
to fiddle the disk we can get away with it.

Try to use DIOCBSDBB to write boot code.
2003-01-26 21:55:43 +00:00
phk
8825e48f4a IA64 still needs to be able to run on MBR+BSD combination, so put disklabel
back.

Pointed out by:	peter
2003-01-26 18:33:54 +00:00
phk
4865a58cd6 Drop the silly notion that i386 has two bootstrap files now that sys/boot
creates a single file named just "boot".

Apart from the fact that the option "-s" is now gone and that "-b" should
be pointed at /boot/boot instead of /boot/boot1, this patch should be
a no-op.
2003-01-26 14:35:53 +00:00
phk
f67e3529e3 Remove #if checks for NUMBOOT==0, it's not relevant for any architecture
and if we get such an architecture, we can just avoid using the relevant
options.
2003-01-26 13:50:11 +00:00