summaryrefslogtreecommitdiff
path: root/Query.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-10-25 16:32:00 +1100
committerNeilBrown <neilb@suse.de>2012-10-25 16:32:00 +1100
commit61a30986e7ce905360db5cfe4e513739d48479d5 (patch)
tree7708690d9438b55e278d50aa9d89eecfdf517b11 /Query.c
parentf1661bd71bec6a8ae1919dc32a227c6fb37843f2 (diff)
Query: don't be confused by partition tables.
Now that we recognise partition tables as a sort of metadata we need to be careful in --query not to say that a device with a partition table looks like a device in an array. Testing ->compare_super for NULL is an easy way to do that. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Query.c')
-rw-r--r--Query.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Query.c b/Query.c
index 329e5839..a63a4427 100644
--- a/Query.c
+++ b/Query.c
@@ -82,7 +82,7 @@ int Query(char *dev)
array.spare_disks, array.spare_disks==1?"":"s");
}
st = guess_super(fd);
- if (st)
+ if (st && st->ss->compare_super != NULL)
superror = st->ss->load_super(st, fd, dev);
else
superror = -1;