From 1e0d770c0f2e78bb334cd75d3d71c8c7d3b8f621 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 6 Feb 2006 04:18:12 +0000 Subject: Release some compile fixes. Signed-off-by: Neil Brown --- super0.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'super0.c') diff --git a/super0.c b/super0.c index 84930d8..52be23d 100644 --- a/super0.c +++ b/super0.c @@ -28,7 +28,6 @@ */ #include "mdadm.h" -#include /* * All handling for the 0.90.0 version superblock is in @@ -124,7 +123,7 @@ static void examine_super0(void *sbv) printf("Preferred Minor : %d\n", sb->md_minor); printf("\n"); if (sb->minor_version > 90 && (sb->reshape_position+1) != 0) { - printf(" Reshape pos'n : %llu%s\n", sb->reshape_position/2, human_size((long long)sb->reshape_position<<9)); + printf(" Reshape pos'n : %llu%s\n", (unsigned long long)sb->reshape_position/2, human_size((long long)sb->reshape_position<<9)); if (sb->delta_disks) { printf(" Delta Devices : %d", sb->delta_disks); if (sb->delta_disks) @@ -807,7 +806,9 @@ int write_bitmap0(struct supertype *st, int fd, void *sbv) return 3; - write(fd, ((char*)sb)+MD_SB_BYTES, sizeof(bitmap_super_t)); + if (write(fd, ((char*)sb)+MD_SB_BYTES, sizeof(bitmap_super_t)) != + sizeof(bitmap_super_t)) + return -2; towrite = 64*1024 - MD_SB_BYTES - sizeof(bitmap_super_t); memset(buf, 0xff, sizeof(buf)); while (towrite > 0) { -- cgit