summaryrefslogtreecommitdiffstats
path: root/super0.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-05-23 05:16:32 +0000
committerNeil Brown <neilb@suse.de>2006-05-23 05:16:32 +0000
commit0237e0cafd5ff70304f0b09ed452adbe0e0e6384 (patch)
tree40e3c1614b29ece3e48c095e468ed88f7db9833f /super0.c
parentc4f12c134069e191b08074b4ed7ba689d0827d11 (diff)
downloadmdadm-0237e0cafd5ff70304f0b09ed452adbe0e0e6384.tar.gz
mdadm-0237e0cafd5ff70304f0b09ed452adbe0e0e6384.tar.xz
mdadm-0237e0cafd5ff70304f0b09ed452adbe0e0e6384.zip
Support --update=homehost to allow updating of homehost information.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/super0.c b/super0.c
index d21032f..85e54fc 100644
--- a/super0.c
+++ b/super0.c
@@ -442,6 +442,13 @@ static int update_super0(struct mdinfo *info, void *sbv, char *update,
sb->state &= ~(1<<MD_SB_CLEAN);
sb->recovery_cp = 0;
}
+ if (strcmp(update, "homehost") == 0 &&
+ homehost) {
+ uuid_set = 0;
+ update = "uuid";
+ info->uuid[0] = sb->set_uuid0;
+ info->uuid[1] = sb->set_uuid1;
+ }
if (strcmp(update, "uuid") == 0) {
if (!uuid_set && homehost) {
unsigned char *hash = SHA1((unsigned char*)homehost,