zdev: add common header for chzdev generated tempfile too

All files created by chzdev feature a common header; however, this
header is absent in temporary files. It is necessary to incorporate
the consistent "Generated by chzdev" header into temporary files
generated by chzdev as well, so as to properly identify these files
via option --is-owner.

Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Vineeth Vijayan
2024-03-13 15:18:47 +01:00
committed by Jan Höppner
parent f1f80a8a20
commit a95dc09c6e

View File

@@ -226,6 +226,11 @@ static void write_zdev_site_id(int site_id)
if (!fd)
goto err;
if (fprintf(fd, CHZDEV_HEADER "\n") < 0) {
fclose(fd);
goto err;
}
if (site_id == SITE_FALLBACK)
rc = fprintf(fd, "ZDEV_SITE_ID=\"\"\n");
else