Catch up with realpath(3) changes (r235266) and unbreak acpidump(8).
This commit is contained in:
parent
08c5f3303d
commit
d6a6e5902f
@ -1196,13 +1196,13 @@ aml_disassemble(ACPI_TABLE_HEADER *rsdt, ACPI_TABLE_HEADER *dsdp)
|
||||
if (tmpdir == NULL)
|
||||
tmpdir = _PATH_TMP;
|
||||
strncpy(tmpstr, tmpdir, sizeof(tmpstr));
|
||||
strncat(tmpstr, "/acpidump.", sizeof(tmpstr) - strlen(tmpdir));
|
||||
if (realpath(tmpstr, buf) == NULL) {
|
||||
perror("realpath tmp file");
|
||||
perror("realpath tmp dir");
|
||||
return;
|
||||
}
|
||||
strncpy(tmpstr, buf, sizeof(tmpstr));
|
||||
len = strlen(buf);
|
||||
strncat(tmpstr, "/acpidump.", sizeof(tmpstr) - strlen(buf));
|
||||
len = strlen(tmpstr);
|
||||
tmpext = tmpstr + len;
|
||||
strncpy(tmpext, "XXXXXX", sizeof(tmpstr) - len);
|
||||
fd = mkstemp(tmpstr);
|
||||
|
Loading…
Reference in New Issue
Block a user