summaryrefslogtreecommitdiffstats
path: root/super-ddf.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-11-04 20:51:12 +1100
committerNeilBrown <neilb@suse.de>2008-11-04 20:51:12 +1100
commita9e1c11d8b1a3637d269a0f7931c4a79c40ae170 (patch)
tree28b6a4e21b222b78006dc735580b94af1e0f4f82 /super-ddf.c
parentf2be09f12fde4a2bb2be47602b6a7f282c136842 (diff)
downloadmdadm-a9e1c11d8b1a3637d269a0f7931c4a79c40ae170.tar.gz
mdadm-a9e1c11d8b1a3637d269a0f7931c4a79c40ae170.tar.xz
mdadm-a9e1c11d8b1a3637d269a0f7931c4a79c40ae170.zip
ddf: store homehost information to allow smooth assembly.
When we create our own ddf array, store the homehost in the vendor information so it can be so to ensure 'LOCAL' name choices. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 98a5485..3e78ffc 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1657,6 +1657,8 @@ static int init_super_ddf(struct supertype *st,
memcpy(ddf->controller.product_id, "What Is My PID??", 16);
memset(ddf->controller.pad, 0xff, 8);
memset(ddf->controller.vendor_data, 0xff, 448);
+ if (homehost && strlen(homehost) < 440)
+ strcpy((char*)ddf->controller.vendor_data, homehost);
if (posix_memalign((void**)&pd, 512, pdsize) != 0) {
fprintf(stderr, Name ": %s could not allocate pd\n", __func__);