Commit Graph

172 Commits

Author SHA1 Message Date
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