From 142cb9e181b876b399c548567dad5e011ff3d0dc Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 14 Dec 2007 20:15:21 +1100 Subject: Use sysfs info for metadata version info in Detail and elsewhere. --- util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'util.c') 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) { -- cgit