diff options
author | jkim <jkim@FreeBSD.org> | 2012-05-25 00:18:19 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2012-05-25 00:18:19 +0000 |
commit | fdda585ecb45d2a13f7e03381455b3027cf27fb7 (patch) | |
tree | e90702f474f687998a0c6b6177735e4068d1d62d /usr.sbin | |
parent | 9254329b0504fd0f9286bf4452af8e35baafcce7 (diff) | |
download | FreeBSD-src-fdda585ecb45d2a13f7e03381455b3027cf27fb7.zip FreeBSD-src-fdda585ecb45d2a13f7e03381455b3027cf27fb7.tar.gz |
Catch up with realpath(3) changes (r235266) and unbreak acpidump(8).
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/acpi/acpidump/acpi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index c273e26..f8ac2a3 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -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); |