Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0:Ports
mdadm
0070-Detail-Stop-bothering-about-md-drivers-old...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0070-Detail-Stop-bothering-about-md-drivers-older-than-0..patch of Package mdadm
From 901d5ee6da145033ac30fee68f4fec0e8af9eddc Mon Sep 17 00:00:00 2001 From: Jes Sorensen <Jes.Sorensen@gmail.com> Date: Wed, 5 Apr 2017 15:26:53 -0400 Subject: [PATCH] Detail: Stop bothering about md drivers older than 0.90.00 Git-commit: 901d5ee6da145033ac30fee68f4fec0e8af9eddc Patch-mainline: mdadm-4.0+ References: bsc#1069165, bsc#1069167, bsc#1068030 Remove further handling of md driver version older than 0.90.00 Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: Coly Li <colyli@suse.de> --- Detail.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/Detail.c b/Detail.c index fa6d4c7..d4e6204 100644 --- a/Detail.c +++ b/Detail.c @@ -54,7 +54,6 @@ int Detail(char *dev, struct context *c) * Print out details for an md array */ int fd = open(dev, O_RDONLY); - int vers; mdu_array_info_t array; mdu_disk_info_t *disks; int next; @@ -88,22 +87,14 @@ int Detail(char *dev, struct context *c) dev, strerror(errno)); return rv; } - vers = md_get_version(fd); - if (vers < 0) { - pr_err("%s does not appear to be an md device\n", - dev); - close(fd); - return rv; - } - if (vers < 9000) { - pr_err("cannot get detail for md device %s: driver version too old.\n", - dev); + sra = sysfs_read(fd, NULL, GET_VERSION|GET_DEVS); + if (!sra) { + pr_err("%s does not appear to be an md device\n", dev); close(fd); return rv; } - sra = sysfs_read(fd, NULL, GET_VERSION|GET_DEVS); - external = (sra != NULL && sra->array.major_version == -1 - && sra->array.minor_version == -2); + external = (sra != NULL && sra->array.major_version == -1 && + sra->array.minor_version == -2); st = super_by_fd(fd, &subarray); if (md_get_array_info(fd, &array) == 0) { inactive = 0; @@ -378,9 +369,7 @@ int Detail(char *dev, struct context *c) } /* Only try GET_BITMAP_FILE for 0.90.01 and later */ - if (vers >= 9001 && - ioctl(fd, GET_BITMAP_FILE, &bmf) == 0 && - bmf.pathname[0]) { + if (ioctl(fd, GET_BITMAP_FILE, &bmf) == 0 && bmf.pathname[0]) { printf(" bitmap=%s", bmf.pathname); } } else { @@ -449,9 +438,7 @@ int Detail(char *dev, struct context *c) array.not_persistent?"not ":""); printf("\n"); /* Only try GET_BITMAP_FILE for 0.90.01 and later */ - if (vers >= 9001 && - ioctl(fd, GET_BITMAP_FILE, &bmf) == 0 && - bmf.pathname[0]) { + if (ioctl(fd, GET_BITMAP_FILE, &bmf) == 0 && bmf.pathname[0]) { printf(" Intent Bitmap : %s\n", bmf.pathname); printf("\n"); } else if (array.state & (1<<MD_SB_BITMAP_PRESENT)) -- 2.13.6
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor