summaryrefslogtreecommitdiff
path: root/bitmap.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-05-15 12:11:18 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2018-05-15 12:11:18 +0100
commitf0819c18672a939ad2a6c00c6fa37f73be7a54f3 (patch)
tree8e82f1fe6b2f2979c2329eb5e2b72cb8f108048a /bitmap.c
parent22464b6f492163fabe1041b09e1d2f753fd0d31a (diff)
New upstream release.
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/bitmap.c b/bitmap.c
index ccedfd34..e38cb965 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -194,12 +194,10 @@ bitmap_file_open(char *filename, struct supertype **stp, int node_num)
}
if (fstat(fd, &stb) < 0) {
- pr_err("failed to determine bitmap file/device type: %s\n",
- strerror(errno));
+ pr_err("fstat failed for %s: %s\n", filename, strerror(errno));
close(fd);
return -1;
}
-
if ((stb.st_mode & S_IFMT) == S_IFBLK) {
/* block device, so we are probably after an internal bitmap */
if (!st)
@@ -219,7 +217,6 @@ bitmap_file_open(char *filename, struct supertype **stp, int node_num)
fd = -1;
}
}
-
*stp = st;
}
@@ -260,7 +257,7 @@ int ExamineBitmap(char *filename, int brief, struct supertype *st)
if (!info)
return rv;
sb = &info->sb;
- if (sb->magic != BITMAP_MAGIC && md_get_version(fd) > 0) {
+ if (sb->magic != BITMAP_MAGIC) {
pr_err("This is an md array. To view a bitmap you need to examine\n");
pr_err("a member device, not the array.\n");
pr_err("Reporting bitmap that would be used if this array were used\n");