Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jun 2012 17:21:02 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r237231 - stable/8/usr.sbin/acpi/acpidump
Message-ID:  <201206181721.q5IHL2VU091143@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Mon Jun 18 17:21:02 2012
New Revision: 237231
URL: http://svn.freebsd.org/changeset/base/237231

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

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

Modified: stable/8/usr.sbin/acpi/acpidump/acpi.c
==============================================================================
--- stable/8/usr.sbin/acpi/acpidump/acpi.c	Mon Jun 18 17:11:24 2012	(r237230)
+++ stable/8/usr.sbin/acpi/acpidump/acpi.c	Mon Jun 18 17:21:02 2012	(r237231)
@@ -994,13 +994,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206181721.q5IHL2VU091143>