OSDN Git Service

parted: make a warning message more informative
authorPetr Uzel <petr.uzel@suse.cz>
Mon, 10 Oct 2011 13:53:09 +0000 (15:53 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 12 Oct 2011 18:29:42 +0000 (20:29 +0200)
commit959d4c2875216d26b2d113cc7119dd8623493e34
tree9fe78c2fc64d87a33780c85aef164ac9cec2d95c
parente8f22511a636a65d7c2ac973d383b22c0ffd3cf1
parted: make a warning message more informative

The following parted message is not very useful:

  Error: You requested a partition from 2.00MiB to 3.00MiB.
  The closest location we can manage is 2.00MiB to 3.00MiB.

Improve the message by including exact geometry (in sectors):

  ...requested a partition from 2.00MiB to 3.00MiB (sectors 2048..3072).
  ... location we can manage is 2.00MiB to 3.00MiB (sectors 2049..3072).

* parted/parted.c (do_mkpart): Include exact partition geometry in
the warning message.
* tests/t-lib-helpers.sh (normalize_part_diag_): Adapt to
handle the new form of the diagnostic.
* tests/t7000-scripting.sh: Adapt and change the name
of a temporary file.
parted/parted.c
tests/t-lib-helpers.sh
tests/t7000-scripting.sh