Author: jkim
Date: Fri May 25 00:18:19 2012
New Revision: 235948
URL: http://svn.freebsd.org/changeset/base/235948

Log:
  Catch up with realpath(3) changes (r235266) and unbreak acpidump(8).

Modified:
  head/usr.sbin/acpi/acpidump/acpi.c

Modified: head/usr.sbin/acpi/acpidump/acpi.c
==============================================================================
--- head/usr.sbin/acpi/acpidump/acpi.c  Thu May 24 23:55:08 2012        
(r235947)
+++ head/usr.sbin/acpi/acpidump/acpi.c  Fri May 25 00:18:19 2012        
(r235948)
@@ -1196,13 +1196,13 @@ aml_disassemble(ACPI_TABLE_HEADER *rsdt,
        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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to