]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Detail.c
Just updaqte copyright dates and email address
[thirdparty/mdadm.git] / Detail.c
index 25b31c48aa0cd22da644abd96993b58ddf854fe0..c377f295da7fe8c0e68daa26a6fbf71b2cbf50c4 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -1,7 +1,7 @@
 /*
  * mdadm - manage Linux "md" devices aka RAID arrays.
  *
- * Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
+ * Copyright (C) 2001-2006 Neil Brown <neilb@suse.de>
  *
  *
  *    This program is free software; you can redistribute it and/or modify
@@ -53,7 +53,7 @@ int Detail(char *dev, int brief, int test)
        int is_rebuilding = 0;
        int failed = 0;
        struct supertype *st = NULL;
-       int max_disks = MD_SB_DISKS;
+       int max_disks = MD_SB_DISKS; /* just a default */
        struct mdinfo info;
 
        void *super = NULL;
@@ -190,11 +190,12 @@ int Detail(char *dev, int brief, int test)
                        printf("  Intent Bitmap : Internal\n\n");
                atime = array.utime;
                printf("    Update Time : %.24s\n", ctime(&atime));
-               printf("          State : %s%s%s\n",
+               printf("          State : %s%s%s%s\n",
                       (array.state&(1<<MD_SB_CLEAN))?"clean":"active",
                       array.active_disks < array.raid_disks? ", degraded":"",
                       (!e || e->percent < 0) ? "" :
-                       (e->resync) ? ", resyncing": ", recovering");
+                       (e->resync) ? ", resyncing": ", recovering",
+                      larray_size ? "": ", Not Started");
                printf(" Active Devices : %d\n", array.active_disks);
                printf("Working Devices : %d\n", array.working_disks);
                printf(" Failed Devices : %d\n", array.failed_disks);
@@ -205,8 +206,9 @@ int Detail(char *dev, int brief, int test)
                        printf("         Layout : %s\n", c?c:"-unknown-");
                }
                if (array.level == 10) {
-                       printf("         Layout : near=%d, far=%d\n", 
-                              array.layout&255, (array.layout>>8)&255);
+                       printf("         Layout : near=%d, %s=%d\n",
+                              array.layout&255, (array.layout&0x10000)?"offset":"far",
+                              (array.layout>>8)&255);
                }
                switch (array.level) {
                case 0:
@@ -254,8 +256,9 @@ This is pretty boring
                                               c?c:"-unknown-");
                                }
                                if (info.new_level == 10) {
-                                       printf("     New Layout : near=%d, far=%d\n",
+                                       printf("     New Layout : near=%d, %s=%d\n",
                                               info.new_layout&255,
+                                              (info.new_layout&0x10000)?"offset":"far",
                                               (info.new_layout>>8)&255);
                                }
                        }