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>
This commit is contained in:
NeilBrown 2008-11-04 20:51:12 +11:00
parent f2be09f12f
commit a9e1c11d8b
1 changed files with 2 additions and 0 deletions

View File

@ -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__);