ross
10078c4c8b
don't unbalance { } pairs with #ifdefs or ctags(1) gets confused
1999-09-17 18:30:33 +00:00
abs
b755b885d5
Accept 'Y' for label disk as well as 'y'
1999-09-05 07:27:55 +00:00
bouyer
21521cffe4
Sync with sys/disklabel.h
1999-08-13 10:23:39 +00:00
kleink
03f1e83295
Try $TMPDIR before resorting to _PATH_TMP.
1999-07-21 17:56:34 +00:00
is
a895e91016
Make BSDLFS a EXT2FS-like filesystem, that is, dont print or parse the cpg
...
field.
According to disklabel.h, its LFS semantics are "segment shift" (log2(segment
size)), but in the code it is used nowhere, and there are even plans to
allow non-poweroftwo segment sizes, so it won't ever work.
While at this, simplify the disktab-like output routine... here, currently,
BSDFFS, BSDLFS, EX2FS and ADOS do the same, so don't duplicate the code.
1999-06-04 19:02:34 +00:00
is
37cb96a063
Print bsize and fsize in disktab-format output also for LFS and ADOS.
1999-06-03 21:15:49 +00:00
is
85270790c6
Print/parse block size, fragment size and cpg for FS_BSDLFS and FS_ADOS.
...
(cpg has different semantics for LFS and ADOS, but is in use.)
XXX The disktab reading/disktab format output writing needs still to be done.
1999-06-03 20:59:04 +00:00
cgd
50f0c49606
On NetBSD/alpha, go out of the way to read the boot area's contents if -r
...
is specified, so that the boot blocks aren't clobbered when writing labels.
1999-06-03 01:58:51 +00:00
cgd
a54ad4c40d
kill some bogus comments about -r: it _does not_ cause the boot area to
...
be clobbered. since 4.4-Lite(?) disklabel.c has gone to extra effort
to avoid clobbering the boot area when using -r, but the 4.4-Lite manual
pages were apparently not updated to note that!
1999-06-03 01:49:58 +00:00
christos
563aff8153
Add a 'chain' command in interactive mode that allows you to vary the
...
size of the partitions, while the starting point gets adjusted automagically.
This chaining works for partitions that are not 'unused'.
1999-05-03 09:45:01 +00:00
abs
e8dacca7c3
STRICT_ALIGNMENT only applies to the start of partitions, not length.
1999-04-30 04:46:50 +00:00
wrstuden
e312a3c208
Fix disklabel -t to work with disks that don't end on a cylinder. Before it
...
wasn't adding a "su" entry, so when the disktab was read, the sectors per
unit was initialized to "nc"*"sc" which was wrong.
Fixes PR/7446 reported by Matthias Buelow <mkb@altair.mayn.de>.
1999-04-29 19:12:07 +00:00
abs
2969961420
Allow partitions to extend to the end of the disk, even when
...
STRICT_CYLINDER_ALIGNMENT defined. This allows existing valid disklabels
to work (including those generated by sysinst).
1999-04-26 02:05:46 +00:00
kleink
e524714ca8
Update for sparc64.
1999-04-09 16:01:34 +00:00
kleink
de8c37eadc
Update a pasto-ed comment.
1999-04-09 16:00:17 +00:00
bouyer
3cf54e49e9
If checklabel() failed, the label has not been written, so exit(1).
1999-04-09 10:06:18 +00:00
cgd
9164307eaf
instead of coding an alpha boot block checksum routine here, use
...
the macro now provided by disklabel.h
1999-04-05 02:50:52 +00:00
mycroft
f6590b22cd
Clean up SYNOPSIS formatting.
1999-03-07 11:02:05 +00:00
thorpej
fe8e643590
Use <sys/disklabel_mbr.h>
1999-01-27 22:04:51 +00:00
pk
832bb22922
Enable non-cylinder-aligned partition warning on sparc[64] & sun3.
...
See also PR#6853.
1999-01-21 11:58:00 +00:00
abs
593d6c65b9
Add '-f disktab' option to disklabel, via lib/6623 from
...
Greg A. Woods <woods@most.weird.com>. (Very) slightly tweaked disklabel.8
1999-01-19 06:24:08 +00:00
christos
7b57bf6d78
Adjust for DKTYPENAME changes.
1998-11-12 16:19:47 +00:00
perry
bfd526219d
bzero->memset, bcopy->memcpy, bcmp->memcmp
1998-08-10 02:57:23 +00:00
drochner
1767a286ec
-fix some lint warnings
...
-fix overflow conditions (PR bin/5534, Zdenek Salvet <salvet@ics.muni.cz>)
(+ one more: can VAX SMD drives be >4G?)
-fix output of "*" at odd end cylinder number (not odd size)
-break some lines >80 cols
1998-08-04 11:52:52 +00:00
mycroft
5582b71d91
Shift column headers into the right position.
1998-07-27 17:19:58 +00:00
mycroft
48ba78aafd
const poisoning.
1998-07-26 12:00:43 +00:00
mark
e7424be3c9
Fix from Chris Demetriou to modify the way in which arm32 filecore
...
checksums are calculated paying attention to the fact that the way
the checksum works a sectors filled with a single byte value will
always checksum correctly.
1998-06-07 20:33:22 +00:00
fair
3d7afc6d03
fix bad .Xr references
1998-04-29 09:49:10 +00:00
fair
c46ab392dc
Principally, change foo(N) to .Xr foo N
...
Also, do some other mdoc tagging.
1998-04-28 04:07:04 +00:00
fair
01a274e0ea
Clarify the documentation of the "-B" option, inspired by PR#5262.
...
Contrary to the PR, the "-B" option does work, but not on all platforms.
1998-04-27 21:03:08 +00:00
cgd
4cc8220755
when reading the MBR, seek to DOSBBSECTOR * DEV_BSIZE rather than just
...
DOSBBSECTOR. DOSBBSECTOR is 0 so it doesn't really matter, but the former
is what was really intended.
1998-03-26 01:37:49 +00:00
cgd
55060d037f
in makebootarea() (if NUMBOOT is nonzero), before reading the contents
...
of the old boot area so that 'disklabel -r -w' won't clobber anything,
be sure to seek to the offset of the boot area (like readlabel() does).
Otherwise, if the machine has code which looks up machine-dependent label
bits, the offset read from will be incorrect, and disklabel will end up
secretly replacing the boot area with other data (which probably doesn't
look like a boot block). The only port this currently affects is
NetBSD/arm32, because it's the only one of the three ports that use
NUMBOOT > 0 that has MD label grovelling code.
1998-03-26 01:35:17 +00:00
cgd
d9199d66b6
factor out some more common bits into 'confirm', and make it a bit more
...
bullet-proof. also, make the arm32 #ifdefs a bit more consistent with
the i386 #ifdefs (without actually changing the behaviour of the code).
1998-03-25 00:03:19 +00:00
cgd
9b9f17c131
use warnx when warning about an old BSD partition ID (i386 MBR code),
...
since err/warn seem to be used consistently throughout the code, rather
than fprintf.
1998-03-24 23:47:28 +00:00
cgd
eae9f47f62
KNF arm32-specific label-grovelling code. Also, clean up error messages
...
(errx instead of err, kill bogus newlines, make error messages look more
"normal").
1998-03-24 23:45:31 +00:00
drochner
699af7acdd
Handle new MBR partition ID on i386. Put all code which decides about
...
usability of an entry to one place, use same algorithm as kernel (ie,
check signature).
1998-03-02 16:26:47 +00:00
perry
3fe138c146
RCS Id Police.
1998-01-09 08:03:16 +00:00
enami
db1f766937
Add missing -C flag in SYNOPSIS
1998-01-01 04:51:54 +00:00
enami
2db041522a
Fix typo; the flag for interactive disklabel creation is not -e but -i.
...
Also, make the description of -C flag into separate paragraph.
1998-01-01 04:47:05 +00:00
enami
94f6d2b411
Fix usage; -i and -C flags are alway effective regardless of NUMBOOT.
1998-01-01 04:38:43 +00:00
pk
b8e8eb0e1f
On the sparc, do not write to the raw disk at all if `-r' is on.
1997-10-19 20:45:42 +00:00
fair
b58a4f15c4
additional sun3/sparc warning about the "-r" option.
1997-10-18 23:46:44 +00:00
mark
1d23b0901e
Define NUMBOOT=1 for the arm32 port.
1997-10-18 07:28:47 +00:00
mark
db54fc7a59
Added support for filecore partitions on arm32 platforms.
1997-10-17 21:29:36 +00:00
fair
d5adc82d1e
add a warning about sun3 and sparc systems requiring partitions in integer cylinders or the boot ROMs get upset, per PR#3267. Is that it?
1997-10-14 06:30:13 +00:00
bouyer
dd53470e10
The number of fs types is FSMAXTYPES not DKMAXTYPES.
...
Correct read of formatted file (used with -e or -R) so that fstype with
spaces will work. Also enlarge the fstype field by 2 chars so that
"Linux Ext2" will not be truncated.
1997-10-13 09:53:26 +00:00
enami
fc8191fee4
- Use .Nm "" instead of .Nm disklabel in SYNOPSIS.
...
- Do a trick to remove whitespace before close paren from generated output.
- Delete space at the end of line.
1997-10-11 02:28:17 +00:00
christos
e230a48b57
CFLAGS->CPPFLAGS
1997-10-10 19:47:50 +00:00
lukem
76e13a0128
all but the first .Nm in SYNOPSIS need to be spelt out. [bin/4256]
1997-10-10 16:12:45 +00:00
phil
fb5b34e71c
Backout prototype of opendisk.
1997-09-30 17:30:29 +00:00
phil
6bebb4822d
Add a prototype for opendisk().
1997-09-30 16:54:31 +00:00
lukem
216ef04613
switch to using opendisk(3) from libutil
1997-09-25 05:08:28 +00:00
enami
8daf159019
Don't pass return value of writelabel() to strerror(), since
...
the value is not a errno but just 0 or 1.
1997-09-18 22:20:36 +00:00
lukem
8a293e132a
fix sccsid conflict
1997-09-16 02:43:59 +00:00
lukem
2ddc10a0ab
define WARNS?=1 for all of sbin/*
1997-09-15 12:45:47 +00:00
lukem
95b3ccaa29
- cleanup use of .Nm
...
- xref installboot(8)
- deprecate register
1997-09-14 08:50:16 +00:00
veego
84320a218d
Define boot1 if NUMBOOT > 1.
...
Noticed in pr#3850, but fixed differently.
1997-07-10 08:30:47 +00:00
mikel
46ab71e02f
s/except/accept/, from John F. Woods in PR bin/3802
1997-07-02 03:19:09 +00:00
christos
5ec7cc78a5
Fix warnings.
1997-06-30 22:51:27 +00:00
perry
bdb6d3716b
i386 now uses "installboot" for installing boot blocks. Comment out
...
the CFLAGS+= -DNUMBOOT=2 for now.
1997-06-07 00:47:27 +00:00
cgd
c917dfb5b2
Fix broken uses of Dd. Both the mdoc and mdoc.samples pages agree:
...
.Dd is supposed to be invoked like:
.Dd month day, year
e.g. ".Dd January 25, 1989", rather than:
.Dd "month day, year"
which is what these pages did.
1997-05-29 01:48:05 +00:00
christos
f3703d3a82
Remove -g
1997-03-18 21:27:16 +00:00
christos
5a6005a07e
Off by one.
1997-03-18 21:26:43 +00:00
lukem
cb77572e20
use mkstemp() instead of mktemp()
1997-03-16 05:25:38 +00:00
perry
e27abe4739
Nuke obsolete special case .if for amigas.
1997-03-14 22:49:51 +00:00
christos
3d71dbfd9b
fix reversed test for maxpartitions.
1997-03-09 00:35:44 +00:00
christos
649ae0edb1
Jason says: Use getmaxpartitions(3) to determine the number of partitions
...
allowed in this architecture.
1997-03-09 00:14:17 +00:00
christos
72fbacb380
Add -i (interactive mode to create/edit labels) inspired by the SunOS/Solaris
...
format/partition command.
1997-03-08 23:46:08 +00:00
mouse
80c0d60f84
alternate -> alternative, per PR 2643
1997-03-08 13:47:08 +00:00
thorpej
cdc9144332
Add missing '}', from David Carrel <carrel@ipsec.com>, PR #2873 .
1996-10-20 21:59:36 +00:00
christos
a1ba72f394
PR/1551: clarify usage in manual page
...
PR/2452: add -t option to print label in disktab(5) format.
Misc cleanups...
1996-10-02 13:49:44 +00:00
explorer
a26a090a50
Fix disklabel to deal with some syntax errors a little better.
...
Mostly, when someone specifies a partition entry like:
c: 1295850 0
or
g: 1295850 0 4.2BSD
disklabel would dump core. Now it generates a warning like it should
in the first case and complains about too few fields in the second.
Perhaps I should just default to unused in the first case, but this prevents
core dumps. (pr bin/2659)
1996-08-10 18:54:48 +00:00
explorer
ddcb18b00b
Don't display cylinder comments if the number of cylinders is zero. This
...
closes pr bin/2683.
1996-08-10 17:59:01 +00:00
pk
6fcba07ce4
Update.
1996-07-03 22:38:37 +00:00
pk
b449415724
On the sparc on an extra DIOCWDINFO after writing to the raw device.
1996-06-29 18:44:11 +00:00
pk
458252ce61
Allow display and editing of partition size & offset fields in
...
<cyl/track/sector> format. This format is always excepted on input
(`-e' and `-R'); to display it use `-C'.
1996-06-29 15:50:18 +00:00
pk
c047ffa9e6
Allow display and editing of partition size & offset fields in
...
<cyl/track/sector> format. This format is always accepted on input
(`-e' and `-R'); to display it use `-C'.
1996-06-29 15:50:16 +00:00
ghudson
6f4ec6284f
Include the total number of sectors in the text representation of
...
the label; calculating based on the disk geometry is not always
accurate (notably, for SCSI disks). Also be a bit more careful
about printing out fixed-width types.
1996-03-14 19:49:24 +00:00
hpeyerl
94caee8dd7
PR487. From John Kohl. (more examples and some corrections)
1996-01-16 06:41:20 +00:00
cgd
2bccd7cac4
don't define NUMBOOT on the alpha, any more. boot block installation
...
is now done by /usr/mdec/installboot.
1995-10-17 16:34:04 +00:00
jtc
45bcb4b8c3
sys/errno.h -> errno.h
...
sys/signal.h -> signal.h
1995-06-26 23:17:26 +00:00
mycroft
f6f6145e7f
Make sure to reset signal mask on errors.
1995-04-29 22:42:07 +00:00
ragge
c39f186d60
Changed to use only one bootblock file on VAX.
1995-04-23 19:27:59 +00:00
ragge
f66d5868d5
Added vax for 2-file boot blocks.
1995-04-18 22:37:46 +00:00
cgd
b1c02cd571
make sure that the alpha boot block is checksummed in a way more
...
acceptable to charles; #ifdef it, and do it explicitly here, rather
than doing a WDINFO ioctl for the -r case.
1995-03-22 23:48:49 +00:00
mycroft
cdc420327d
Don't do a DIOCWDINFO after already writing the label.
1995-03-22 09:14:34 +00:00
mycroft
be82a25869
Use POSIX signals.
1995-03-21 18:48:41 +00:00
cgd
10df2990d8
re-order the DIOCWLABEL in the rflag case, so it actually works right.
1995-03-19 23:37:56 +00:00
cgd
0114e805ce
convert to new RCS Id conventions; reduce my headache
1995-03-18 14:54:19 +00:00
cgd
532a938c1d
NUMBOOT == 2 on the alpha, too.
1995-02-11 02:42:21 +00:00
cgd
cbdbe9a97a
do the DIOCWDINFO in writelabel() even if -r is specified.
...
On most machines it's redundant, but it gives others the chance to
take special actions, e.g. updating a checksum.
1995-02-10 23:24:19 +00:00
cgd
d2682eafca
docs follow code.
1995-02-05 14:11:53 +00:00
mycroft
bebd64c62c
Fix typos, and minor cosmetic changes.
1995-01-30 20:14:10 +00:00
mycroft
27761b7c7f
Change the magic question to an absolute, flat lie that should hopefully make
...
people think twice before toying with it. B-P
1995-01-12 12:23:19 +00:00
cgd
1e71c95ea1
kill unnecessary .include.
1994-12-22 11:14:51 +00:00
mycroft
26d9497d49
Clean up deleted files.
1994-12-22 10:44:01 +00:00
cgd
ae9172d6cd
specify man pages the new way.
1994-12-22 09:57:51 +00:00
cgd
8e0e3522e1
pull in bsd.own.mk by hand, early, so NOMAN= can be defined there.
1994-12-20 15:12:31 +00:00
cgd
5eeab43e28
more cleanups from Jim Jegers, passed over by me.
1994-12-05 20:15:31 +00:00
mycroft
2968cf25a4
Clean up this festering pile of rotten code a bit. To wit:
...
* Add prototypes.
* Remove a strange and apparently pointless bit of code propagated
from 386BSD.
* Collapse NOWRITE and WRITEABLE into one.
* Use the same algorithm as the kernel for finding the label.
* Redo some of the parsing more sanely.
1994-09-30 02:33:15 +00:00