summaryrefslogtreecommitdiffstats
path: root/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitmap.c b/bitmap.c
index 088e37d..beef2dc 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -227,9 +227,13 @@ bitmap_info_t *bitmap_file_read(char *filename, int brief, struct supertype **st
if (!st) {
/* just look at device... */
lseek(fd, 0, 0);
- } else {
+ } else if (!st->ss->locate_bitmap) {
+ fprintf(stderr, Name ": No bitmap possible with %s metadata\n",
+ st->ss->name);
+ return NULL;
+ } else
st->ss->locate_bitmap(st, fd);
- }
+
ioctl(fd, BLKFLSBUF, 0); /* make sure we read current data */
*stp = st;
} else {