diff options
author | Neil Brown <neilb@suse.de> | 2006-05-19 07:13:03 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-05-19 07:13:03 +0000 |
commit | b6750aa8da57bfc0eb3a3bdc47c289638b1022c8 (patch) | |
tree | fadb26de92f6cd4c8ca07064133250b9fb47a32d /super0.c | |
parent | 05697ec1e26eadc2f814d9f84f8c783fff5b98b5 (diff) | |
download | mdadm-b6750aa8da57bfc0eb3a3bdc47c289638b1022c8.tar.gz mdadm-b6750aa8da57bfc0eb3a3bdc47c289638b1022c8.tar.xz mdadm-b6750aa8da57bfc0eb3a3bdc47c289638b1022c8.zip |
Include homehost information in --detail where appropriate.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r-- | super0.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -231,7 +231,7 @@ static void brief_examine_super0(void *sbv) printf("\n"); } -static void detail_super0(void *sbv) +static void detail_super0(void *sbv, char *homehost) { mdp_super_t *sb = sbv; printf(" UUID : "); @@ -240,6 +240,13 @@ static void detail_super0(void *sbv) sb->set_uuid2, sb->set_uuid3); else printf("%08x", sb->set_uuid0); + if (homehost) { + unsigned char *hash = SHA1((unsigned char *)homehost, + strlen(homehost), + NULL); + 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); } |