Date: Fri, 25 May 2012 00:18:19 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r235948 - head/usr.sbin/acpi/acpidump Message-ID: <201205250018.q4P0IJeJ068911@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205250018.q4P0IJeJ068911>