Commit Graph

23 Commits

Author SHA1 Message Date
joerg
88ab7cdf3c ru's mdoc(7) style police was here.
Submitted by:	ru
2004-06-02 20:21:28 +00:00
joerg
83af382bb5 Major overhaul of sunlabel(8).
. Implement option -c, all partition sizes will be calculated
  in cylinders as opposed to sectors.  Since the Sun label is
  inherently cylinder-based, this makes the job a little easier.

. Implement option -h, print the label in `human readable'
  size/offset format.

. Implement SVR4-compatible VTOC-style elements.  They are
  fully optional, defaulting to the current behaviour where no
  VTOC-style table will be written to disk.  However, if
  desired, the full functionality of the partitioning menu of
  Solaris' format(1m) is now offered (and even more).

. When editing the label, do not loop around edit_label() where
  a new template file is generated for each turn, this used to
  be annoying in that any possible syntax error caused a
  complaint, but then the template was created anew, so the
  user had to perform all their editing again.  Rather loop
  inside edit_label(), similar to bsdlabel(8), so in case of
  errors, the user will be presented their previous template
  file again.

. If VTOC-style elements are present, the overlap checks are
  made less stringent.  Overlaps will still be warned about,
  but overlaps of `unmountable' partitions against other ones
  are no longer fatal.  That way, e. g. VxVM encapsulated
  disk labels can be fully edited in FreeBSD (but not in
  Solaris ;-).

. In print_label(), generate the editing hints only if the -e
  flag is in effect.  Additionally, print a hint about the
  total number of sectors in the (hardware) medium.

. When editing a label, allow for changing the geometry
  emulation (and textual name) by modifying the "text:" line
  on top.  That way, a more effective emulation can be
  chosen.

. When editing/reading a label, additionally allow for the
  suffixes `s' (512-byte sectors), and `c' (cylinders) in the
  partition size field.

. Finally, turn the stub man page into something that really
  explains the entire thing.
2004-06-01 20:32:36 +00:00
ru
c5d46462ea Correct existing usage lines, add two more. 2004-05-17 21:11:35 +00:00
joerg
118bb3810a When editing a Sun label, make the search for a valid partition line
violate POLA a little less by not requiring exactly two spaces in front
of the entry (and silently discarding any non-matching entry).  We now
recognize anything starting with a letter followed by a colon as the
first non-space chars as a partition entry.
2004-05-04 09:50:41 +00:00
ceri
940ebef14f Spell "disklabel" correctly.
Approved by:	ru
2004-02-01 13:09:26 +00:00
obrien
3b76fe3dcb Install a 'disklable' alias.
Technical Reviewed by:	ru
2004-01-31 07:39:45 +00:00
obrien
cf89ac0b45 Sync with bsdlabel/Makefile. 2004-01-29 18:15:19 +00:00
obrien
20249c3167 Add a very basic manpage. 2004-01-29 18:12:27 +00:00
harti
b0eec1c6c2 Use (char *)NULL to terminate the argument list for execlp().
Without this cast the compiler cannot know that it has to convert the
null pointer constant NULL to a null pointer.
2003-10-30 15:04:37 +00:00
phk
11a350a92d 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
ru
6abd62b418 Moved libgeom.so dependencies to where they belong.
Reviewed by:	phk
Approved by:	re (scottl)
2003-05-17 19:05:17 +00:00
ru
e87dde260a Fix the misspelling of DPADD, then fix "make checkdpadd". 2003-05-03 19:49:05 +00:00
jake
3d50a7c7d8 Fix for dynamic linking.
Submitted by:	Alex Deiter <tiamat@komi.mts.ru>
2003-04-27 21:24:05 +00:00
phk
8389eb0162 Add testcases to ensure that overwriting bootcode does not trash label. 2003-04-23 08:25:44 +00:00
phk
305a35650e If we cannot open the parent device for writing, use GEOM::CONFIG_GEOM
requests to write label and bootcode.

The -r argument is ignored (with a warning).

With a lot of help from:	jake
2003-04-23 08:25:20 +00:00
phk
2f88fe8934 Do not link sunlabel to disklabel. 2003-04-23 06:37:57 +00:00
phk
1497892676 Add "-r" when we initialize the label first time.
Add two more tests.
2003-04-22 21:04:48 +00:00
phk
b424c24a4a Use explicit encoding/decoding funtions for sunlabel data structures.
Use #defines for various magic numbers.

Attach test-case to makefile.

Reviewed by:    jake
2003-04-21 20:38:15 +00:00
phk
4131d4b806 Add minimal regression test for hotspot handling of the sunlabel. 2003-04-21 20:16:07 +00:00
phk
a34e2cfbbf Solve printf/cast issues to make this compile in i386 as well. 2003-04-18 20:27:16 +00:00
jake
830f76fef9 Hardlink sunlabel to disklabel so make release is happy. (This only affects
sparc64, where bsd^H^H^Hdisklabel isn't built.)
2003-04-15 23:49:31 +00:00
jake
7b8869ff72 - Use read(2) to get the existing sunlabel on a disk, instead of parsing
kern.geom.conftxt, which md disks don't show up in.  If the magic and
  the checksum are right assume its a valid sunlabel, otherwise use the
  DIOC ioctls to get the disk parameters and whip up a label out of thin
  air.
- Don't just silently create or correct invalid c partitions, warn about
  invalid ones in label proto files.
- Split checksumming into a function since we do it a couple times.  Also
  don't include the sl_cksum field in the checksum, which avoids needing
  to clear it first.

This is makes sunlabel a suitable replacement for disklabel in make release.
2003-04-15 23:46:19 +00:00
jake
5d56dc210b Add sunlabel, a more or less drop in replacement for bsd^H^H^Hdisklabel(8)
which works on sun labels.  Due to the lack of an interface other than
write(2) to update labels, it cannot modify an open partition.
2003-01-31 07:03:25 +00:00