]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super-ddf.c
ddf: store homehost information to allow smooth assembly.
[thirdparty/mdadm.git] / super-ddf.c
index 98a5485adbd58719ceb674358c4e5572e71c37ac..3e78ffca10a914960214d09f028833a8e7a288a0 100644 (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__);