svn commit: r237232 - stable/9/usr.sbin/acpi/acpidump

Jung-uk Kim jkim at FreeBSD.org
Mon Jun 18 17:23:24 UTC 2012


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);


More information about the svn-src-stable-9 mailing list