Author: jkim
Date: Mon Jun 18 17:23:24 2012
New Revision: 237232
URL: http://svn.freebsd.org/changeset/base/237232

Log:
  MFC:  r235948
  
  Catch up with realpath(3) changes (r236400) and unbreak acpidump(8).

Modified:
  stable/9/usr.sbin/acpi/acpidump/acpi.c
Directory Properties:
  stable/9/usr.sbin/acpi/acpidump/   (props changed)

Modified: stable/9/usr.sbin/acpi/acpidump/acpi.c
==============================================================================
--- stable/9/usr.sbin/acpi/acpidump/acpi.c      Mon Jun 18 17:21:02 2012        
(r237231)
+++ stable/9/usr.sbin/acpi/acpidump/acpi.c      Mon Jun 18 17:23:24 2012        
(r237232)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to