From owner-svn-src-stable@FreeBSD.ORG Mon Jun 18 17:21:03 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CC841065673; Mon, 18 Jun 2012 17:21:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1745E8FC14; Mon, 18 Jun 2012 17:21:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5IHL2LN091145; Mon, 18 Jun 2012 17:21:02 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5IHL2VU091143; Mon, 18 Jun 2012 17:21:02 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206181721.q5IHL2VU091143@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 18 Jun 2012 17:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237231 - stable/8/usr.sbin/acpi/acpidump X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 17:21:03 -0000 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);