]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super0.c
util: Introduce md_get_disk_info()
[thirdparty/mdadm.git] / super0.c
index f5b4507b996c0b670a5f6b7a807cf6c872cbf5a2..10d9c40db1f32af5a05cd8d7eeb5523eec78d4cd 100644 (file)
--- a/super0.c
+++ b/super0.c
@@ -353,7 +353,7 @@ err:
 static void detail_super0(struct supertype *st, char *homehost)
 {
        mdp_super_t *sb = st->sb;
-       printf("           UUID : ");
+       printf("              UUID : ");
        if (sb->minor_version >= 90)
                printf("%08x:%08x:%08x:%08x", sb->set_uuid0, sb->set_uuid1,
                       sb->set_uuid2, sb->set_uuid3);
@@ -367,7 +367,7 @@ static void detail_super0(struct supertype *st, char *homehost)
                if (memcmp(&sb->set_uuid2, hash, 8)==0)
                        printf(" (local to host %s)", homehost);
        }
-       printf("\n         Events : %d.%d\n\n", sb->events_hi, sb->events_lo);
+       printf("\n            Events : %d.%d\n\n", sb->events_hi, sb->events_lo);
 }
 
 static void brief_detail_super0(struct supertype *st)
@@ -725,7 +725,7 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
  * We use the first 8 bytes (64bits) of the sha1 of the host name
  */
 static int init_super0(struct supertype *st, mdu_array_info_t *info,
-                      unsigned long long size, char *ignored_name,
+                      struct shape *s, char *ignored_name,
                       char *homehost, int *uuid,
                       unsigned long long data_offset)
 {
@@ -764,8 +764,8 @@ static int init_super0(struct supertype *st, mdu_array_info_t *info,
        sb->gvalid_words = 0; /* ignored */
        sb->ctime = time(0);
        sb->level = info->level;
-       sb->size = size;
-       if (size != (unsigned long long)sb->size)
+       sb->size = s->size;
+       if (s->size != (unsigned long long)sb->size)
                return 0;
        sb->nr_disks = info->nr_disks;
        sb->raid_disks = info->raid_disks;
@@ -1267,7 +1267,7 @@ static int validate_geometry0(struct supertype *st, int level,
                              int *chunk, unsigned long long size,
                              unsigned long long data_offset,
                              char *subdev, unsigned long long *freesize,
-                             int verbose)
+                             int consistency_policy, int verbose)
 {
        unsigned long long ldsize;
        int fd;