Minor fixes

Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
Neil Brown 2006-01-27 04:48:28 +00:00
parent 838acbc272
commit 29e766a5f4
3 changed files with 4 additions and 2 deletions

View File

@ -74,6 +74,8 @@ int Create(struct supertype *st, char *mddev, int mdfd,
mdu_array_info_t array;
int major = BITMAP_MAJOR_HI;
memset(array, 0, sizeof(array));
vers = md_get_version(mdfd);
if (vers < 9000) {
fprintf(stderr, Name ": Create requires md driver version 0.90.0 or later\n");

View File

@ -691,7 +691,7 @@ static int add_internal_bitmap0(struct supertype *st, void *sbv, int chunk, int
sb->state |= (1<<MD_SB_BITMAP_PRESENT);
memset(bms, sizeof(*bms), 0);
memset(bms, 0, sizeof(*bms));
bms->magic = __cpu_to_le32(BITMAP_MAGIC);
bms->version = __cpu_to_le32(major);
uuid_from_super0((int*)bms->uuid, sb);

View File

@ -896,7 +896,7 @@ add_internal_bitmap1(struct supertype *st, void *sbv,
sb->bitmap_offset = __cpu_to_le32(2);
sb->feature_map = __cpu_to_le32(__le32_to_cpu(sb->feature_map) | 1);
memset(bms, sizeof(*bms), 0);
memset(bms, 0, sizeof(*bms));
bms->magic = __cpu_to_le32(BITMAP_MAGIC);
bms->version = __cpu_to_le32(major);
uuid_from_super1((int*)bms->uuid, sb);