rtr
d64b3c2b83
Fix bug causing segmentation fault when no fs type specified
2002-11-18 05:48:00 +00:00
rtr
1031fab56c
Removed "disklabel -I [-r] [-C] disk" from SYNOPSIS.
...
The code does not permit usage of the -I flag without either -e or -i.
2002-10-21 15:54:51 +00:00
wiz
74347b5249
partition, not parition (by Adrian Mrva). file system instead of filesystem.
2002-10-02 11:05:56 +00:00
dbj
a323eac318
add FS_APPLEUFS
...
part of PR #17345
2002-09-28 00:47:24 +00:00
dbj
209f5f57af
tweak indentation on FS_JFS2 comment
2002-09-28 00:40:08 +00:00
dbj
7d4caebaf6
add DTYPE_JFS2 and FS_JFS2 for IBM Journaled File System
...
this is to match FreeBSD's disklabel.h revision 1.73
FreeBSD change was requested by Hiten Pandya <hiten@uk.FreeBSD.org>
2002-09-28 00:30:24 +00:00
wiz
bd9e498edd
mdoc nits. New sentence, new line. Remove a comment about tahoe.
2002-09-28 00:24:13 +00:00
dbj
b64db12921
fix DTYPE_LD comment
2002-09-28 00:10:56 +00:00
dbj
ba3c70eb8b
add DTYPE_LD to match disklabel.h
2002-09-28 00:09:58 +00:00
enami
43fe370014
Fix an argument to -width option of .Bl macro.
2002-08-19 01:54:58 +00:00
manu
3966af389b
Enable USE_MBR for all arm ports.
2002-07-28 15:17:38 +00:00
grant
97a9e02381
disallow creation of partitions which start beyond (or extend beyond)
...
the end of the disk.
2002-06-29 15:24:03 +00:00
itojun
a532d33818
USE_MBR on macppc too
2002-06-18 00:21:53 +00:00
itojun
cd668e919e
need disklabel_mbr.h for USE_MBR build
2002-06-18 00:19:27 +00:00
drochner
ec943f317b
display / read the p_cdsession field in the FS_ISO9660 case
2002-05-27 17:33:08 +00:00
thorpej
3740cbf193
Alpha boot block stuff has moved to <sys/bootblock.h>
2002-05-14 21:27:05 +00:00
mycroft
9e695e896c
Make this build again after the alpha/disklabel.h and dev/dec/dec_boot.h
...
changes.
2002-04-09 21:08:58 +00:00
bjh21
f8840ef0ab
Rename arm26 -> acorn26.
2002-03-24 22:25:27 +00:00
kleink
52de2c81da
When accessing the MBR magic as a 16-bit value, consider its on-disk
...
layout would be little-endian, too.
2002-02-14 00:07:43 +00:00
ross
dc5571b22e
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
2002-02-08 01:21:55 +00:00
fredette
46d320c7db
The sun2 also requires partitions in integer cylinders.
2001-12-14 23:36:25 +00:00
reinoud
994f1fb3f6
Remove `const' attribute from writelabel prototype and function to make it
...
compile again on Alpha.
2001-12-13 13:52:13 +00:00
bjh21
822cc4efe2
Rather than making FileCore boot block support conditional on __arm32__, make
...
it conditional on USE_ACORN, and define that if MACHINE is arm26 or acorn32.
This is less than optimal, and maybe we should define it for all ARM systems,
but then disklabel handling across architectures is generally a mess at the
moment.
2001-11-29 23:08:53 +00:00
perry
96aece1560
Note in far more places that -B is only supported on some platforms.
2001-11-24 18:30:59 +00:00
minoura
d7835b08b0
Preserve the boot area on x68k.
2001-11-19 13:55:06 +00:00
wiz
9608821813
Simplify markup in one place, and sort sections and SEE ALSO.
2001-11-16 11:30:09 +00:00
wiz
5ee6bd0ade
Use .Pp for new paragraphs.
2001-11-16 11:29:09 +00:00
lukem
8064490359
minor WARNS=2 stuff
2001-10-19 01:16:37 +00:00
nonaka
978de91e79
Fix big-endian vs. MBR parameters.
2001-06-15 18:49:37 +00:00
wiz
73f545bb5b
Drop arguments of .Os.
2001-06-05 11:22:41 +00:00
christos
7956951247
- KNF printlabel.c
...
- add a function to print only one partition's info.
- print the partition information if it was modified in interactive mode.
- improve on the chaining code. [still assumes that partition offsets increase
monotonically]. We could check for overlap too.
2001-05-26 19:48:32 +00:00
drochner
98e00988ad
Don't error out if the mbr cannot be read.
...
This makes "disklabel cd0" working also on platforms with MBR support.
2001-03-29 12:18:32 +00:00
cgd
8a986b2e96
convert to use getprogname()
2001-02-19 22:48:57 +00:00
fvdl
275b941468
When -I is specified, we mean to initialize the label if it's not there
...
already. So, don't fail if there appears to be a corrupt label or
no 'fake' label; get the 'default' label (which is generated
from DIOCGDEFLABEL) instead.
2001-01-08 02:19:58 +00:00
cgd
169563b7c1
#warn is _not_ the GCC CPP directive that gives a warning, #warning is.
...
(this code has, apparently, always been wrong, but current GCC is kind
enough to warn about unknown CPP directives.)
2001-01-06 00:35:54 +00:00
enami
0cd4f6f4aa
Test read(2) failure by read(..., sizeof(n)) != sizeof(n) instead of
...
< sizeof(n) to avoid unwanted type promotion.
2001-01-03 06:57:57 +00:00
enami
a48aa06c73
Kill whitespace at the end of line.
2001-01-03 06:55:30 +00:00
lukem
1c5cb88e30
move showinfo() and showpartition() into separate file, for use by
...
other programs. slightly change argument signature so that globals
aren't depended upon.
2000-12-24 07:08:02 +00:00
lukem
35ccd2239b
- convert to KNF ANSI style guide
...
- reorder arguments of runcmd(), getnum(), defnum() to be consistent
with other functions (pass struct disklabel * first)
2000-12-24 05:59:11 +00:00
perseant
ea919b5343
Change "cpg" to "cpg/sgs" in the printed partition table header, in an
...
attempt to avoid confusion. (PR #9230 )
2000-11-27 23:13:12 +00:00
abs
fc52578672
xref (disklabel.8, fdisk.8, mbrlabel.8) as appropriate
2000-11-14 11:06:19 +00:00
is
9979da6cbb
Format string cleanups by Bill Sommerfeld.
2000-10-10 20:24:49 +00:00
christos
c4c61b5a08
allow -I -i to install a new label interactively.
2000-10-08 23:32:50 +00:00
lukem
6c94f4bee8
in cmd_name(), put the default prompt into a temporary buffer rather
...
than overwrite the existing d_packname. noted by enami@.
2000-09-04 02:09:26 +00:00
lukem
4c8c86856e
* use strcasecmp() instead of strcmp() so that filesystem type and disk type
...
searchs (amongst others) are case insensitive.
* in interactive mode (-i), when editing entries display supported disk types
and filesystem types when given `?' (when ``[?]'' appears in the prompt
this feature is supported for the question).
* support `m' as a suffix equivalent to `M'
* in interactive mode, be a bit more sensible about handling errors and EOF
* implement dumpnames(), which takes a char ** and size, and displays
as per ls -F (sorted, listed vertically) but indented by one tab
* don't assume d_typename and d_packname are NUL terminated
* fix up some comments and some warning messages (bad cut & pastos :)
* deprecate deffstypename() and getfstypename()
* be consistent when using sizeof()
2000-08-14 22:37:08 +00:00
jhawk
df711325aa
"boostrap" => "bootstrap"
2000-08-12 18:52:42 +00:00
msaitoh
c832841f5e
s/ ar / are /
2000-07-13 10:33:52 +00:00
hubertf
6f0558d9f6
'disklabel -i' on a disk without a label recommends to use -I. Document
...
that in the usage.
2000-07-13 01:47:22 +00:00
itojun
ddf8cb2acb
warnx?/errx? audit. don't pass variable/function return value alone.
...
use with "%s". from openbsd.
2000-07-07 12:29:09 +00:00
fvdl
bb159432ef
Add a -I flag which, combined with -e, gives the user the opportunity
...
to edit and create a new label on a virgin disk.
2000-05-31 14:13:48 +00:00
jdolecek
2d6c6df05e
add system(3) for spawning the editor - this is handy when EDITOR is set to
...
something like 'editor arg1 arg2 ...'
2000-05-27 19:01:13 +00:00
thorpej
ead7f2a346
Provide some information when confirming "Write outside MBR partition".
2000-05-25 21:23:37 +00:00
soren
abf17c0cc1
MBR on cobalt too.
2000-05-02 19:00:41 +00:00
nonaka
e4f0173fa3
also use mbr partition table on prep.
2000-05-02 18:21:41 +00:00
enami
07702f68a6
Introduce new filesystem type FS_CCD so that an operator can mark the
...
ccd component partition. Note that the ccd driver still allows partitions
of any types as components since an on-disk BSD disklabel isn't available
on some port.
2000-04-05 04:03:20 +00:00
enami
8fa8b77325
Sync disklabel.5 with disklabel.h and dkio.h more closely.
2000-03-16 05:16:19 +00:00
hubertf
48058cc69e
s/comprised/composed/, per PR 9586 by Seebs <seebs@ged.plethora.net>
2000-03-09 12:50:36 +00:00
oster
565f0151c5
Note the "RAID" partition type.
2000-02-11 02:05:28 +00:00
soda
6079ffd98c
mention that hpcmips and arc use `d' as RAW_PART.
2000-01-31 16:02:43 +00:00
soda
3c7d51f177
- use MBR partition table also on arc.
...
- use defined(USE_MBR) instead of defined(__i386__), like hpcmips and arc.
2000-01-31 16:01:06 +00:00
perseant
f1dfdc6927
disklabel now understands the p_sgs partition field (shift to compute
...
segment size from block size).
newfs_lfs now reads the disklabel to find segment, block, and fragment
sizes. Because reading this info from the wrong fs type could result in
very poor fs layout (e.g. ffs has "16" where the segshift would go,
resulting in 512-*megabyte* segments for 8K blocks), newfs_lfs refuses
to create a filesystem on a partition not labeled "4.4LFS".
Man pages for newfs_lfs updated to reflect this change.
2000-01-18 00:02:28 +00:00
shin
8ceded3101
Add '-DSAVEBOOTAREA' to keep MBR partition information
...
when NetBSD partition starts at sector 0.
Closes PR:port-hpcmips/9146.
2000-01-09 02:45:43 +00:00
fair
35b8613acb
change "millisecond" to "microsecond" for headswitch and track seek
...
comments, to resolve PR 8189. This makes the documentation for these
fields consistent. Not that it matters - a grep of syssrc shows that
these fields aren't actually used for anything and should probably be
GC'd.
1999-12-20 18:19:18 +00:00
abs
dfa0f92f2e
Use '$' instead of '-' to select remainder of disk interactively
1999-12-17 13:06:49 +00:00
abs
669feec4e3
When setting size of partitions interactively allow '-' for remainder of disk
1999-12-17 12:30:02 +00:00
mrg
5f534fca77
allow changing partition info from inside the interactive handler.
1999-11-26 06:03:09 +00:00
shin
7a8dbc6aa3
Fix typo. ('_i386__' -> '__i386__')
...
Pointed by D'Arcy J.M. Cain, thanks.
1999-10-12 00:36:17 +00:00
shin
39a8a0436e
add hpcmips support (MBR)
1999-10-11 05:28:04 +00:00
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