diff options
author | Neil Brown <neilb@suse.de> | 2006-05-23 05:16:32 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-05-23 05:16:32 +0000 |
commit | 0237e0cafd5ff70304f0b09ed452adbe0e0e6384 (patch) | |
tree | 40e3c1614b29ece3e48c095e468ed88f7db9833f /super1.c | |
parent | c4f12c134069e191b08074b4ed7ba689d0827d11 (diff) | |
download | mdadm-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 'super1.c')
-rw-r--r-- | super1.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -496,6 +496,17 @@ static int update_super1(struct mdinfo *info, void *sbv, char *update, memcpy(bm->uuid, info->uuid, 16); } } + if (strcmp(update, "homehost") == 0 && + homehost) { + char *c; + update = "name"; + c = strchr(sb->set_name, ':'); + if (c) + strncpy(info->name, c+1, 31 - (c-sb->set_name)); + else + strncpy(info->name, sb->set_name, 32); + info->name[33] = 0; + } if (strcmp(update, "name") == 0) { if (info->name[0] == 0) sprintf(info->name, "%d", info->array.md_minor); |