summaryrefslogtreecommitdiffstats
path: root/super1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-11-17 13:15:34 +1100
committerNeilBrown <neilb@suse.de>2009-11-17 13:15:34 +1100
commitb42f577a0dbe0b232600478f4a5068b2f63a2684 (patch)
treefca53e53e4a4df5ea6999c887eee026b22240b58 /super1.c
parentb8ab2a50aba72c7316d92d0fb414167844673136 (diff)
downloadmdadm-b42f577a0dbe0b232600478f4a5068b2f63a2684.tar.gz
mdadm-b42f577a0dbe0b232600478f4a5068b2f63a2684.tar.xz
mdadm-b42f577a0dbe0b232600478f4a5068b2f63a2684.zip
Improve error messages when metadata handler does not support request.
->validate_geometry is called to validate overall parameters, and to validate each individual device. If it ever fails, it needs to report the reason, as common code cannot possible know. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/super1.c b/super1.c
index 8678e9f..5a2df0e 100644
--- a/super1.c
+++ b/super1.c
@@ -1609,8 +1609,11 @@ static int validate_geometry1(struct supertype *st, int level,
unsigned long long ldsize;
int fd;
- if (level == LEVEL_CONTAINER)
+ if (level == LEVEL_CONTAINER) {
+ if (verbose)
+ fprintf(stderr, Name ": 1.x metadata does not support containers\n");
return 0;
+ }
if (!subdev)
return 1;