summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util.c b/util.c
index dd8b176..1ba236b 100644
--- a/util.c
+++ b/util.c
@@ -730,7 +730,7 @@ struct supertype *super_by_fd(int fd)
int minor;
struct supertype *st = NULL;
struct mdinfo *sra;
- char *verstr = NULL;
+ char *verstr;
char version[20];
int i;
@@ -739,11 +739,13 @@ struct supertype *super_by_fd(int fd)
if (sra) {
vers = sra->array.major_version;
minor = sra->array.minor_version;
+ verstr = sra->text_version;
} else {
if (ioctl(fd, GET_ARRAY_INFO, &array))
array.major_version = array.minor_version = 0;
vers = array.major_version;
minor = array.minor_version;
+ verstr = "";
}
if (vers != -1) {