Commit Graph

254 Commits

Author SHA1 Message Date
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
phk
807fc7de0e Offer better advice in #error.
Remove yet a usage message about -N/-W
2003-01-26 12:39:46 +00:00
phk
ad2fa30e32 Remove ia64 and powerpc #ifdefs: this is i386/pc98/alpha only code. 2003-01-26 12:22:26 +00:00
phk
f3345c20fa Remove #ifdef __sparc64__ code. GEOM uses native SUN labels on this arch,
so no hacks are needed.
2003-01-26 11:43:50 +00:00
phk
977978310d Fix typo in last commit.
Rearrange bits in writelabel() a bit for improved readability.
2003-01-26 11:41:37 +00:00
phk
722d5435d7 Remember to remove -N and -W from usage. 2003-01-26 11:28:34 +00:00
phk
5ee78ecce5 Don't fiddle write-protect status of disklabel, it's a discontinued feature. 2003-01-26 11:16:25 +00:00
phk
dc7edb5afb Retire the "-N" and "-W" options which implemented write-protection
for the disklabel:  This facility is OBE.

First of all, we cannot sensibly implement this in a properly stacked
environment.

Second, if we did, it would confuse the heck out of users who
wouldn't be able to "start from scratch" by dd(8)'ing /dev/zero
onto /dev/da0.

Third, the offered protection is not comprehensive: no other software
would respect it.

Fourth and finally, the disklabel is already protected against
tampering if it controls open partitions.

Uselessness of these options discussed with:	peter
2003-01-26 11:11:19 +00:00
des
eac0b70cbc Clear part_set, part_size_type and part_offset_type before parsing the
ascii label; otherwise checklabel() might report spurious errors because
of leftovers from a previous pass.

Reviewed by:	bde
MFC after:	1 week
2003-01-16 12:57:53 +00:00
nyan
864080610e Rename the dos_partition structure for pc98 to pc98_partition. 2003-01-04 08:50:48 +00:00
ru
4979ab8d81 mdoc(7) police: Deal with self-xrefs. 2002-12-24 13:41:48 +00:00
ru
041d1287e8 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
grog
ac39319766 Relax partition overlap check to allow Vinum partitions to overlap
other partitiosns.  This is necessary when migrating conventional
partitions to Vinum and was broken by recent more stringent overlap
checks.  This is arguably the wrong way to do it.  A better method
would be to have the loader understand a subset of Vinum partitioning
and allow an install directly to Vinum, but until then, this is the
best we have.

Reviewed by:	jhb
Approved by:	re (rwatson)
2002-12-02 23:49:59 +00:00
ru
892437167f mdoc(7) police: Added missing markup bit.
Approved by:	re
2002-11-25 15:43:18 +00:00
julian
98ba605081 Everything in the disklabel is unsigned so make all the input routines
take unsigned values.
his allows one to label disk with the number of blocks > 31 bits
(though less then 32 bits)

e.g.
#        size   offset fstype [fsize bsize bps/cpg]
  c: 3125755904  0   unused    0     0        # (Cyl.    0 - 194569*)
  d: 3125755840  64  unused    0     0        # (Cyl.    0*- 194569*)
which is needd to test UFS2
2002-11-18 04:58:11 +00:00
schweikh
c554f3f243 Document that write(2) et al can return EROFS for attempts to write the
disk label area.

PR:		43891
Submitted by:	Diomidis D. Spinellis <dds@istlab.dmst.aueb.gr>
MFC after:	3 days
2002-10-10 19:16:10 +00:00
nyan
4c34626aa8 Fix to support pc98. 2002-10-08 12:13:19 +00:00
phk
d50e0d7392 Don't be noisy if DIOCWLABEL fails, it's probably because we're writing
the first label to the raw disk.

Sponsored by:	DARPA & NAI Labs.
2002-10-05 21:57:05 +00:00
phk
19150ba4f8 Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:
Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h.

These two new copies are still intact copies of disklabel.h and
therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them
in programs which already include <sys.disklabel.h> is currently a
no-op.

This commit adds a number of such #includes.

Once I have verified that I have fixed all the places which need fixing,
I will commit the updated versions of the three #include files.

Sponsored by:   DARPA & NAI Labs.
2002-10-01 07:24:55 +00:00
phk
2f9ce7f609 Construct new disklabels based on the medias stated parameters in
userland, rather than expect all possible GEOMetries to know about
BSD disklabels.

Sponsored by:	DARPA & NAI Labs
2002-09-20 09:18:31 +00:00
trhodes
136be46680 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
bmilekic
df335c7ca3 Fix more breakage due to FSTYPENAMES/DKTYPENAMES split.
Also submitted by: David Wolfskill <david@catwhisker.org>
2002-08-16 16:08:36 +00:00
charnier
a2accd01f0 The .Nm utility 2002-07-06 19:34:18 +00:00
markm
99da2f435c Apply __FBSDID(); fix local variable(names) that stomp on global
definitions; fix some const strings; fix some signedness issues.
2002-07-03 16:43:11 +00:00
iedowse
306d84207e Oops, unbreak parsing of the `type' field in getasciilabel(). I had
changed a `goto' to a `continue' in revision 1.52, but it continued
the wrong loop.

Noticed by:	bde
2002-06-05 08:11:28 +00:00
alfred
166dc2c9af correct comment (replace i386 with __i386__) 2002-05-30 07:12:12 +00:00
iedowse
a337baf222 Fix some serious brain damage in the default block/frag/cpg parameters
that are used if none at all are specified for a partition. Don't
keep replaying the last field if we run out of fields when processing
a line. Use a 8:1 frag:block ratio for both defaults.

More work here is required. I think disklabel should not attempt
to choose default filesystem parameters, and instead let newfs pick
any defaults if required.

PR:		i386/38703
Reported by:	Martin Kraemer <Martin.Kraemer@Fujitsu-Siemens.com>
2002-05-30 01:44:35 +00:00
iedowse
078e6c4721 Split out the code for parsing the partition specification lines
into a separate function to avoid some over-long lines.
2002-05-30 01:19:25 +00:00
benno
0e8bf3d65e Spread the word of PowerPC. 2002-05-21 04:25:24 +00:00
trhodes
896f3841bf more file system > filesystem 2002-05-16 04:10:46 +00:00
phk
02fe70f68e Retire the bogus uses of the disklabel field d_sbsize and begin to
initialize it to zero so we don't have to have everbody and their
aunt including FFS specific header files.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:49:41 +00:00
trhodes
9e9c2c31ac disklabel(8) manual page:
--change "-s newboot" to "-s newboot2" in an example
--Fixed spelling
--Fixed some confusion between slice/parition/primary partition and other
things.

PR:		35947 and 35951
Noticed by:	Gary W. Swearingen <swear@blarg.net>
Reviewed by:	keramida
Thanks to:	grog
MFC after:	2 days
2002-04-15 22:24:34 +00:00
phk
0c60225131 Don't set WARNS to 2, we're default compatible now.
Noticed by:		bde
2002-04-08 06:26:46 +00:00
phk
8823e26b95 Get us to WARNS=2 with a bit of constification and some printf fiddling.
Pick up the c-partitions magicness from sys/disklabel.h instead
of defining our own magicness for it, remove trivial comment.

Sponsored by: DARPA and NAI Labs.
2002-04-07 10:57:00 +00:00
phk
0e00996d76 Nuke a totally pointless optional debug option
Sponsored by: DARPA and NAI Labs.
2002-04-07 10:39:23 +00:00
phk
0f8b0dba50 Remove remaining traces of d_boot[01] 2002-04-04 20:22:15 +00:00
phk
d25c54bf89 Kill only usage of the undocumnted and unuse d_boot[01] fields of
struct disklabel.

Sponsored by:	DARPA & NAI Labs.
2002-04-03 15:46:56 +00:00
imp
554c50af26 Remove stray register 2002-03-19 18:47:50 +00:00
imp
c59132f682 De-__P the man page, but I suspect that we need to freshly import
sys/disklabel.h since the one in here looks a little crunchy.
2002-03-19 18:44:56 +00:00
imp
396e147482 o remove __P
o Use ANSI function definitions
o const poison
o remove register
2002-03-18 06:17:50 +00:00
obrien
c4c8eefa48 Add complete Sparc64 support.
Submitted by:	tmm

Dike out vax support.
2002-03-11 04:41:42 +00:00
obrien
960cf2a975 * Support the Sparc64.
* Do not default to any particular platform.  Require that we explicitly
  support a particular platform.
2002-03-11 04:20:37 +00:00
dd
69ed61e704 Remove inappropriate .Op calls in examples.
PR:		35689
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2002-03-10 09:10:06 +00:00
phk
7b0ce36f94 A bit of premptive GEOM POLA magic: If we don't get a virgin disklabel
from /dev/food0, then try from /dev/f00d0c, in strange cases this work.
2002-03-03 21:21:45 +00:00
dd
c52f88ea97 In the words of the submitter:
disklabel(8)'s "Reading the disk label" section starts out "To examine
	or save the label on a disk drive,...".  This is confusing.  The given
	command (disklabel [-r] disk) doesn't save anything (except to standard
	out, but that should go without saying).  It reads as if the command
	might save something on the disk drive.

PR:		32452
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2002-01-07 06:45:17 +00:00
obrien
9baf2f1b03 Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
ru
255dbf6990 -r is implied with -B. 2001-10-10 16:26:56 +00:00
ru
623da62a5a mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
ru
e9cbb548b9 The defaults for bsize and fsize were interchanged.
PR:		docs/30330
2001-09-05 08:51:21 +00:00
kris
5e75b336b9 Silence non-constant format string warnings by marking functions
as __printflike()/__printf0like(), adding const, or adding missing "%s"
format strings, as appropriate.

MFC after:	2 weeks
2001-08-19 08:19:37 +00:00
ru
24c7b0a61d mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
dd
a145482cf6 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
ru
7cef49ff86 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
dd
eaa6ee03b8 mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
brian
8636b161b3 Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
dd
ce0c9a0b23 Nuke unused variables. 2001-06-24 23:31:07 +00:00
ru
d437f73f22 mdoc(7) police: fix markup in revision 1.27. 2001-05-15 16:03:59 +00:00
grog
1cebf23d9e Clarify the currently used partition types.
Add cross-references to ccd(4) and vinum(8).
2001-05-14 23:26:40 +00:00
imp
461acba9c0 Say "add -r" rather than 'use -r' since the former is more correct.
The latter implies to many people that they use only -r, which is
incorrect.
2001-04-24 17:40:54 +00:00
ru
86642a4ab4 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
ru
f59b6e4348 mdoc(7) police: misc formatting fixes.
(This page still needs a lot of work.)
2001-03-05 15:33:54 +00:00
imp
a0cea41d15 First attempt to not overflow in disk space calculations. Use off_t
for the size variable used to calculate the size of the partition.
Also use ULL suffix for constants to ensure that we use 64 bit math.
2001-03-05 03:39:57 +00:00
obrien
351944801b Fix style nit. 2001-03-04 13:19:51 +00:00
jwd
1143bdb717 Allow for easier configuration when using disklabel. A sample
being:

#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   400M        0    4.2BSD     4096 16384    75     # (Cyl.    0 - 812*)
  b:     1G        *      swap
  c:      *        *    unused
  e: 204800        *    4.2BSD
  f:     5g        *    4.2BSD
  g:      *        *    4.2BSD

   These patches are the original work of Randell Jesup, and
I believe Matt Dillon, with additional work by Warner Losh.
Please let me know if I've left someone out.

   Incorporated into this is the fix for PR bin/22727.

   This patchset still has style issues and a possible problem on
large disks. However, it was a agreed to get these committed before
performing major surgery on them.

PR:		bin/22727
Submitted by:	Randell Jesup <rjesup@wgate.com>
2001-02-25 16:47:44 +00:00
ru
8a6f8b5fe4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
hoek
84af6c9cce typo: modifes -> modifies 2000-12-28 16:44:47 +00:00
ru
7fe8bd2b88 Prepare for mdoc(7)NG. 2000-12-18 15:16:24 +00:00
ben
42e83a53cf Fix typos and layout problem.
PR:		23109
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-28 20:38:20 +00:00
ru
ea31070695 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
ru
7d99729431 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
ru
a6f5d950d8 Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
jkh
c992086474 Add support for virgin disklabels
Submitted by:	dillon
2000-10-31 07:07:39 +00:00
phk
fc5495e38e Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
2000-09-16 13:43:00 +00:00
grog
cf47c7da56 Correct typo. 2000-08-29 02:42:02 +00:00
nyan
fd65d0b7d9 Add '-DPC98' to CFLAGS if MACHINE == pc98. 2000-05-09 13:46:14 +00:00
obrien
c094165ba4 /dev/r<FOO> => /dev/<FOO> 2000-04-26 11:24:44 +00:00
obrien
6d7995db99 A local WIP snook in rev 1.31.
Noticed by:	bde
2000-04-21 05:40:05 +00:00
obrien
fd604ada09 Found more places where 'r' was being prepended to the device name. 2000-04-20 08:00:29 +00:00
imp
7fec3d2787 Add include of errno.h where needed, remove extern int errno where not.
These commits were inspired by a similar commit to netbsd.
2000-04-14 06:15:01 +00:00
obrien
9fe5b6aa8f Don't prepend "r" for the raw device anymore. 2000-04-10 05:54:47 +00:00
bde
f91e1883f7 Backed out removal of vendor id and gratuitous change of tmpfile prefix
in previous commit.
2000-01-11 07:28:46 +00:00
kris
ac11ce63fd 10 X's for mkstemp(), and don't redefine _PATH_TMP 2000-01-10 09:25:32 +00:00
bde
1646afbfa7 Refreshed the silly copy of <sys/disklabel.h>. The old copy was
seriously out of date.  It older than Lite1 (it has an undeprecated
DISKTAB but not _PATH_DISKTAB).
2000-01-05 17:34:00 +00:00
billf
905cb42c4d Remove duplicate declarations for two internal functions.
Remove delcaration for getenv(), we already get it from stdlib.h
1999-09-25 02:23:19 +00:00
peter
76f0c923fe $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
mpp
432c46fbda Minor style fix. 1999-08-15 12:16:12 +00:00
mpp
ebc58e0b20 Various man page cleanup:
- Sort xrefs
- FreeBSD.ORG -> FreeBSD.org
- Properly xref RFCs.
- Be consistent with section names as outlined in mdoc(7).
- Other misc mdoc cleanup.

PR:		doc/13144
Submitted by:	Alexey M. Zelkin <phantom@cris.net>
1999-08-15 08:06:12 +00:00
grog
8e1f774f0c Remove inappropriate references to the wrong name for the bootstrap
manager, thus killing two birds with one stone.

Objected-to-by:	      bde
		      rnordier
1999-08-01 06:40:11 +00:00
grog
81f82c8a8c Make intelligible:
Describe the command formats in English.
  Add references to other programs (boot0cfg, fdisk).
  Remove some old cruft, including FUD about single-level bootstraps.
  Add example of output format.

Not-objected-to-by:	msmith
			rnordier
1999-07-31 08:11:58 +00:00
billf
5fa702dfc6 Fix a gcc stupidity where it thought a variable was being used uninitialized
Add a case for UNSPEC which is in order by the enum definition, but out of
order alphabetically.
1999-07-21 03:04:36 +00:00
jkh
2364b04a86 Update for boot block location change. 1999-01-02 23:28:44 +00:00
jkh
586eaf95b2 Look for boot blocks in new default location. 1998-12-17 16:50:10 +00:00
rnordier
369a99d1d7 Refer to "da" rather than "sd" device.
Suggested by: jdp
1998-11-28 09:43:31 +00:00
bde
5525376a91 Oops, don't quite use RAW_PART instead of RAWPARTITION. Use 'a' + RAW_PART
in both places.
1998-10-23 18:57:39 +00:00
bde
77c4345dcb Updated the error message for EXDEV to match recent kernel fixes.
Fixed nearby indentation.

Use RAW_PART instead of RAWPARTITION.
1998-10-17 09:56:32 +00:00
bde
7a7aef0b85 Attempt to fix my breakage of the alpha makebootarea() in rev.1.19.
The previous attempt just converted compile time breakage to runtime
breakage.
1998-08-23 07:32:37 +00:00
gpalmer
83d0a1cbad Try to make this compile on both alpha and i386 1998-08-21 23:44:16 +00:00
bde
744645c034 Fixed style bugs in previous commit.
Added some comments on #endifs.
1998-08-17 21:13:57 +00:00
dfr
72c760c68b Teach disklabel how to install a bootstrap on an alpha with SRM console. 1998-08-17 07:43:54 +00:00
bde
c382e95b1e Fixed bugs in `disklabel -R...':
- nonstandard sector sizes didn't work because the sector size in the
  ASCII label was not read before a (default, wrong) sector size was used.
- the exit status was 0 after exiting early due to an invalid ASCII label.

Abort `disklabel -B...' if the secondary bootstrap doesn't fit.
1998-07-25 16:19:10 +00:00
bde
870a72fe1f Clear d_boot0 and d_boot1 in the virgin label. These are overlaid by
d_packname in in-core labels, so they are garbage if d_packname is
initialized in the dummy label for the whole disk.  dsopen() will soon
initialize d_packname to "fictitious" if it is not already initialized.

Fixed nearby error handling.  Rev.1.7 apparently confused Perror()
with perror().
1998-07-20 11:34:06 +00:00
bde
10722c906f Fixed printf format errors. 1998-06-28 18:59:04 +00:00
charnier
3aaa3dc793 Use warnx()+fprintf() to handle multi-line messages. Correct K&R support and
KNF continuation indent rule.
Requested by: Bruce.
1998-06-08 06:41:47 +00:00
charnier
9be5100a22 Add section number to .Xr. Use of .Nm. Typo. Add rcsid. Remove unused
#includes. Use err(3).
1998-06-04 06:49:13 +00:00
jkoshy
cac643447a Use the correct macro for file names. Remove empty `HISTORY' section.
PR: 6780
Submitted by: Yoshishige Arai <ryo2@on.rim.or.jp>
1998-05-29 10:15:28 +00:00
bde
5d07031ba3 Fixed annoying warning for unused sccsid. 1998-02-24 01:36:58 +00:00
jdp
0dc7249409 Die and stay dead. Ya got it?! 1997-07-04 01:30:09 +00:00
bde
1c936ab215 Import Lite2's src/sbin, except for XNSrouted and routed. All relevant
files in src/sbin are off the vendor branch, so this doesn't change the
active versions.
1997-07-02 00:25:26 +00:00
steve
7a5541cde7 Show the real revision date and not the date that this
manpage is being viewed.
1997-06-23 04:03:49 +00:00
charnier
31625b3c6b Add Id. Use err(3). Costmetic in usage string. 1997-06-10 11:08:53 +00:00
imp
167db52912 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 03:33:12 +00:00
imp
17787893f3 Use mkstemp rather than mktemp to prevent a small race.
Obtained from: OpenBSD
1997-03-24 05:44:28 +00:00
peter
4968036f61 Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
wosch
71f5160702 Sort cross references. 1997-01-13 00:25:51 +00:00
bde
69a59390f6 Moved initialization of defaults for the label for the whole disk from
disklabel(8) to the kernel (dsopen()).  Drivers should initialize the
hardware values (rpm, interleave, skews).  Drivers currently don't do
this, but it usually doesn't matter since rotational position stuff is
normally disabled.
1996-06-17 14:43:54 +00:00
mpp
86b292ffbd Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
joerg
0989a701a0 Try to preserve the fdisk table in the primary bootstrap, should it
already exist.

Mention the cases where this doesn't work in the BUGS section of the
man page.
1996-02-03 21:14:09 +00:00
joerg
fb2cd624b1 Finally implement the "auto" disktype. It attempts to get all the
required information from the driver, and produce a virgin disklabel
for it.  The latter might be further edited with `disklabel -e' to
satisfy the user's need.

The magic sequence is:

	disklabel -r -w sdX auto
	disklabel -e sdX
1996-01-22 01:01:15 +00:00
joerg
663b14fb2f Declare functions, resolve printf-format warnings. 1996-01-21 23:55:47 +00:00
peter
ab124e78b0 recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
rgrimes
f3a2b348da Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
bde
e55d5d3716 Don't clobber d_secperunit in disklabel -e'. disklabel -e' replaces all
the values that it doesn't print by defaults.  This seems wrong.  I want
to be able to see the total number of sectors more than edit it.  The
default d_secperunit of (sectors/track * tracks/cylinder * cylinders) is
bogus if sectors/track is only an approximation and more bogus if
sectors/track and tracks/cylinder are dummy values such as 4096 and 1
to defeat ufs's pessimizations.
1995-02-22 23:21:29 +00:00
gibbs
0df1a28aca Allow for the specification of bsize, fsize, and bps (blocks per segment)
for LFS filesystems.
1995-01-04 23:49:51 +00:00