From: Neil Brown Date: Tue, 28 Mar 2006 06:39:29 +0000 (+0000) Subject: Don't try to get bitmap info on old kernels. X-Git-Tag: mdadm-2.4~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4027ddcaa4b613a2ac2e6aa4eb0b157d7708f156;p=thirdparty%2Fmdadm.git Don't try to get bitmap info on old kernels. .. this causes silly warnings. Unfortuantely there are 2.6 kernels which will still produce warnings. We cannot reliable detect those. Signed-off-by: Neil Brown --- diff --git a/Detail.c b/Detail.c index d322732c..89ad02f3 100644 --- a/Detail.c +++ b/Detail.c @@ -180,8 +180,10 @@ int Detail(char *dev, int brief, int test) printf(" Persistence : Superblock is %spersistent\n", array.not_persistent?"not ":""); printf("\n"); - if (ioctl(fd, GET_BITMAP_FILE, &bmf) == 0 && - bmf.pathname[0]) { + /* Only try GET_BITMAP_FILE for 0.90.01 and later */ + if (vers >= 9001 && + ioctl(fd, GET_BITMAP_FILE, &bmf) == 0 && + bmf.pathname[0]) { printf(" Intent Bitmap : %s\n", bmf.pathname); printf("\n"); } else if (array.state & (1<