From owner-svn-src-vendor@FreeBSD.ORG Wed Oct 16 22:28:09 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 73D314DE; Wed, 16 Oct 2013 22:28:09 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 607212F01; Wed, 16 Oct 2013 22:28:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9GMS9d1019356; Wed, 16 Oct 2013 22:28:09 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9GMS8o2019351; Wed, 16 Oct 2013 22:28:08 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201310162228.r9GMS8o2019351@svn.freebsd.org> From: Brooks Davis Date: Wed, 16 Oct 2013 22:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r256652 - vendor/NetBSD/mtree/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2013 22:28:09 -0000 Author: brooks Date: Wed Oct 16 22:28:08 2013 New Revision: 256652 URL: http://svnweb.freebsd.org/changeset/base/256652 Log: Vendor import of NetBSD's mtree at 2013-10-16 Modified: vendor/NetBSD/mtree/dist/compare.c vendor/NetBSD/mtree/dist/create.c vendor/NetBSD/mtree/dist/getid.c vendor/NetBSD/mtree/dist/spec.c Modified: vendor/NetBSD/mtree/dist/compare.c ============================================================================== --- vendor/NetBSD/mtree/dist/compare.c Wed Oct 16 21:52:54 2013 (r256651) +++ vendor/NetBSD/mtree/dist/compare.c Wed Oct 16 22:28:08 2013 (r256652) @@ -1,4 +1,4 @@ -/* $NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $ */ +/* $NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $"); +__RCSID("$NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $"); #endif #endif /* not lint */ @@ -192,9 +192,9 @@ typeerr: LABEL; (s->type == F_BLOCK || s->type == F_CHAR) && s->st_rdev != p->fts_statp->st_rdev) { LABEL; - printf("%sdevice (%#llx, %#llx", - tab, (long long)s->st_rdev, - (long long)p->fts_statp->st_rdev); + printf("%sdevice (%#jx, %#jx", + tab, (uintmax_t)s->st_rdev, + (uintmax_t)p->fts_statp->st_rdev); if (uflag) { if ((unlink(p->fts_accpath) == -1) || (mknod(p->fts_accpath, @@ -283,9 +283,9 @@ typeerr: LABEL; } if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size) { LABEL; - printf("%ssize (%lld, %lld)\n", - tab, (long long)s->st_size, - (long long)p->fts_statp->st_size); + printf("%ssize (%ju, %ju)\n", + tab, (uintmax_t)s->st_size, + (uintmax_t)p->fts_statp->st_size); tab = "\t"; } /* Modified: vendor/NetBSD/mtree/dist/create.c ============================================================================== --- vendor/NetBSD/mtree/dist/create.c Wed Oct 16 21:52:54 2013 (r256651) +++ vendor/NetBSD/mtree/dist/create.c Wed Oct 16 22:28:08 2013 (r256652) @@ -1,4 +1,4 @@ -/* $NetBSD: create.c,v 1.69 2013/02/03 19:15:17 christos Exp $ */ +/* $NetBSD: create.c,v 1.71 2013/10/16 17:24:20 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: create.c,v 1.69 2013/02/03 19:15:17 christos Exp $"); +__RCSID("$NetBSD: create.c,v 1.71 2013/10/16 17:24:20 christos Exp $"); #endif #endif /* not lint */ @@ -216,22 +216,22 @@ statf(int indent, FTSENT *p) p->fts_statp->st_mode & MBITS); if (keys & F_DEV && (S_ISBLK(p->fts_statp->st_mode) || S_ISCHR(p->fts_statp->st_mode))) - output(indent, &offset, "device=%#llx", - (long long)p->fts_statp->st_rdev); + output(indent, &offset, "device=%#jx", + (uintmax_t)p->fts_statp->st_rdev); if (keys & F_NLINK && p->fts_statp->st_nlink != 1) output(indent, &offset, "nlink=%u", p->fts_statp->st_nlink); if (keys & F_SIZE && - (flavor != F_NETBSD6 || S_ISREG(p->fts_statp->st_mode))) - output(indent, &offset, "size=%lld", - (long long)p->fts_statp->st_size); + (flavor == F_FREEBSD9 || S_ISREG(p->fts_statp->st_mode))) + output(indent, &offset, "size=%ju", + (uintmax_t)p->fts_statp->st_size); if (keys & F_TIME) #if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H) - output(indent, &offset, "time=%ld.%09ld", - (long)p->fts_statp->st_mtimespec.tv_sec, + output(indent, &offset, "time=%jd.%09ld", + (intmax_t)p->fts_statp->st_mtimespec.tv_sec, p->fts_statp->st_mtimespec.tv_nsec); #else - output(indent, &offset, "time=%ld.%09ld", - (long)p->fts_statp->st_mtime, (long)0); + output(indent, &offset, "time=%jd.%09ld", + (intmax_t)p->fts_statp->st_mtime, (long)0); #endif if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 || Modified: vendor/NetBSD/mtree/dist/getid.c ============================================================================== --- vendor/NetBSD/mtree/dist/getid.c Wed Oct 16 21:52:54 2013 (r256651) +++ vendor/NetBSD/mtree/dist/getid.c Wed Oct 16 22:28:08 2013 (r256652) @@ -1,4 +1,4 @@ -/* $NetBSD: getid.c,v 1.7 2008/04/28 20:24:17 martin Exp $ */ +/* $NetBSD: getid.c,v 1.8 2013/10/16 17:27:42 christos Exp $ */ /* from: NetBSD: getpwent.c,v 1.48 2000/10/03 03:22:26 enami Exp */ /* from: NetBSD: getgrent.c,v 1.41 2002/01/12 23:51:30 lukem Exp */ @@ -65,7 +65,7 @@ #endif #include -__RCSID("$NetBSD: getid.c,v 1.7 2008/04/28 20:24:17 martin Exp $"); +__RCSID("$NetBSD: getid.c,v 1.8 2013/10/16 17:27:42 christos Exp $"); #include @@ -230,6 +230,9 @@ grscan(int search, gid_t gid, const char ; continue; } + /* skip comments */ + if (pwline[0] == '#') + continue; if (grmatchline(search, gid, name)) return 1; } @@ -371,6 +374,9 @@ pwscan(int search, uid_t uid, const char ; continue; } + /* skip comments */ + if (pwline[0] == '#') + continue; if (pwmatchline(search, uid, name)) return 1; } Modified: vendor/NetBSD/mtree/dist/spec.c ============================================================================== --- vendor/NetBSD/mtree/dist/spec.c Wed Oct 16 21:52:54 2013 (r256651) +++ vendor/NetBSD/mtree/dist/spec.c Wed Oct 16 22:28:08 2013 (r256652) @@ -1,4 +1,4 @@ -/* $NetBSD: spec.c,v 1.85 2012/12/20 16:43:16 christos Exp $ */ +/* $NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -67,7 +67,7 @@ #if 0 static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: spec.c,v 1.85 2012/12/20 16:43:16 christos Exp $"); +__RCSID("$NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $"); #endif #endif /* not lint */ @@ -217,6 +217,12 @@ noparent: mtree_err("no parent node"); /* * empty tree */ + /* + * Allow a bare "." root node by forcing it to + * type=dir for compatibility with FreeBSD. + */ + if (strcmp(centry->name, ".") == 0 && centry->type == 0) + centry->type = F_DIR; if (strcmp(centry->name, ".") != 0 || centry->type != F_DIR) mtree_err( @@ -350,16 +356,18 @@ dump_nodes(const char *dir, NODE *root, appendfield(pathlast, "mode=%#o", cur->st_mode); if (MATCHFLAG(F_DEV) && (cur->type == F_BLOCK || cur->type == F_CHAR)) - appendfield(pathlast, "device=%#llx", (long long)cur->st_rdev); + appendfield(pathlast, "device=%#jx", + (uintmax_t)cur->st_rdev); if (MATCHFLAG(F_NLINK)) appendfield(pathlast, "nlink=%d", cur->st_nlink); if (MATCHFLAG(F_SLINK)) appendfield(pathlast, "link=%s", vispath(cur->slink)); if (MATCHFLAG(F_SIZE)) - appendfield(pathlast, "size=%lld", (long long)cur->st_size); + appendfield(pathlast, "size=%ju", + (uintmax_t)cur->st_size); if (MATCHFLAG(F_TIME)) - appendfield(pathlast, "time=%lld.%09ld", - (long long)cur->st_mtimespec.tv_sec, + appendfield(pathlast, "time=%jd.%09ld", + (intmax_t)cur->st_mtimespec.tv_sec, cur->st_mtimespec.tv_nsec); if (MATCHFLAG(F_CKSUM)) appendfield(pathlast, "cksum=%lu", cur->cksum); From owner-svn-src-vendor@FreeBSD.ORG Wed Oct 16 22:30:29 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C0AAE687; Wed, 16 Oct 2013 22:30:29 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 944F42F20; Wed, 16 Oct 2013 22:30:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9GMUT1m021752; Wed, 16 Oct 2013 22:30:29 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9GMUTbL021751; Wed, 16 Oct 2013 22:30:29 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201310162230.r9GMUTbL021751@svn.freebsd.org> From: Brooks Davis Date: Wed, 16 Oct 2013 22:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r256653 - vendor/NetBSD/mtree/20131016 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2013 22:30:29 -0000 Author: brooks Date: Wed Oct 16 22:30:29 2013 New Revision: 256653 URL: http://svnweb.freebsd.org/changeset/base/256653 Log: Tag 2013-10-16 import of NetBSD's mtree Added: vendor/NetBSD/mtree/20131016/ - copied from r256652, vendor/NetBSD/mtree/dist/ From owner-svn-src-vendor@FreeBSD.ORG Thu Oct 17 00:06:45 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 10DFCA45; Thu, 17 Oct 2013 00:06:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF2022410; Thu, 17 Oct 2013 00:06:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9H06iWM073494; Thu, 17 Oct 2013 00:06:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9H06gjU073459; Thu, 17 Oct 2013 00:06:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201310170006.r9H06gjU073459@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 17 Oct 2013 00:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r256655 - in vendor-sys/acpica/dist: . generate/unix generate/unix/acpiexec generate/unix/iasl source/common source/compiler source/components/debugger source/components/events source/c... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2013 00:06:45 -0000 Author: jkim Date: Thu Oct 17 00:06:42 2013 New Revision: 256655 URL: http://svnweb.freebsd.org/changeset/base/256655 Log: Import ACPICA 20130927. Added: vendor-sys/acpica/dist/source/common/acgetline.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/Makefile.config vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbhistry.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/events/evxfregn.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/hardware/hwtimer.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbprint.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/utilities/utalloc.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utexcep.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/utstring.c vendor-sys/acpica/dist/source/components/utilities/uttrack.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/platform/acgcc.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.h vendor-sys/acpica/dist/source/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/source/tools/acpisrc/ascase.c vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/changes.txt Thu Oct 17 00:06:42 2013 (r256655) @@ -1,4 +1,103 @@ ---------------------------------------- +27 September 2013. Summary of changes for version 20130927: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Fixed a problem with store operations to reference objects. This change +fixes a problem where a Store operation to an ArgX object that contained a +reference to a field object did not complete the automatic dereference and +then write to the actual field object. Instead, the object type of the +field object was inadvertently changed to match the type of the source +operand. The new behavior will actually write to the field object (buffer +field or field unit), thus matching the correct ACPI-defined behavior. + +Implemented support to allow the host to redefine individual OSL +prototypes. This change enables the host to redefine OSL prototypes found +in the acpiosxf.h file. This allows the host to implement OSL interfaces +with a macro or inlined function. Further, it allows the host to add any +additional required modifiers such as __iomem, __init, __exit, etc., as +necessary on a per-interface basis. Enables maximum flexibility for the +OSL interfaces. Lv Zheng. + +Hardcoded the access width for the FADT-defined reset register. The ACPI +specification requires the reset register width to be 8 bits. ACPICA now +hardcodes the width to 8 and ignores the FADT width value. This provides +compatibility with other ACPI implementations that have allowed BIOS code +with bad register width values to go unnoticed. Matthew Garett, Bob Moore, +Lv Zheng. + +Changed the position/use of the ACPI_PRINTF_LIKE macro. This macro is used +in the OSL header (acpiosxf). The change modifies the position of this +macro in each instance where it is used (AcpiDebugPrint, etc.) to avoid +build issues if the OSL defines the implementation of the interface to be +an inline stub function. Lv Zheng. + +Deployed a new macro ACPI_EXPORT_SYMBOL_INIT for the main ACPICA +initialization interfaces. This change adds a new macro for the main init +and terminate external interfaces in order to support hosts that require +additional or different processing for these functions. Changed from +ACPI_EXPORT_SYMBOL to ACPI_EXPORT_SYMBOL_INIT for these functions. Lv +Zheng, Bob Moore. + +Cleaned up the memory allocation macros for configurability. In the common +case, the ACPI_ALLOCATE and related macros now resolve directly to their +respective AcpiOs* OSL interfaces. Two options: +1) The ACPI_ALLOCATE_ZEROED macro uses a simple local implementation by +default, unless overridden by the USE_NATIVE_ALLOCATE_ZEROED define. +2) For AcpiExec (and for debugging), the macros can optionally be resolved +to the local ACPICA interfaces that track each allocation (local tracking +is used to immediately detect memory leaks). +Lv Zheng. + +Simplified the configuration for ACPI_REDUCED_HARDWARE. Allows the kernel +to predefine this macro to either TRUE or FALSE during the system build. + +Replaced __FUNCTION_ with __func__ in the gcc-specific header. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 95.8K Code, 27.0K Data, 122.8K Total + Debug Version: 185.2K Code, 77.2K Data, 262.4K Total + Previous Release: + Non-Debug Version: 96.7K Code, 27.1K Data, 123.9K Total + Debug Version: 184.4K Code, 76.8K Data, 261.2K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented wildcard support for the -e option. This simplifies use +when there are many SSDTs that must be included to resolve external method +declarations. ACPICA BZ 1041. Example: + iasl -e ssdt*.dat -d dsdt.dat + +AcpiExec: Add history/line-editing for Unix/Linux systems. This change +adds a portable module that implements full history and limited line +editing for Unix and Linux systems. It does not use readline() due to +portability issues. Instead it uses the POSIX termio interface to put the +terminal in raw input mode so that the various special keys can be trapped +(such as up/down-arrow for history support and left/right-arrow for line +editing). Uses the existing debugger history mechanism. ACPICA BZ 1036. + +AcpiXtract: Add support to handle (ignore) "empty" lines containing only +one or more spaces. This provides compatible with early or different +versions of the AcpiDump utility. ACPICA BZ 1044. + +AcpiDump: Do not ignore tables that contain only an ACPI table header. +Apparently, some BIOSs create SSDTs that contain an ACPI table header but +no other data. This change adds support to dump these tables. Any tables +shorter than the length of an ACPI table header remain in error (an error +message is emitted). Reported by Yi Li. + +Debugger: Echo actual command along with the "unknown command" message. + +---------------------------------------- 23 August 2013. Summary of changes for version 20130823: 1) ACPICA kernel-resident subsystem: Modified: vendor-sys/acpica/dist/generate/unix/Makefile.config ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.config Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/generate/unix/Makefile.config Thu Oct 17 00:06:42 2013 (r256655) @@ -193,20 +193,22 @@ endif # # Bison/Flex configuration # -# -v: verbose, produces a .output file -# -d: produces the defines header file # -y: act like yacc # # -i: generate case insensitive scanner # -s: suppress default rule, abort on unknown input # +# Optional for Bison/yacc: +# -v: verbose, produces a .output file +# -d: produces the defines header file +# # Berkeley yacc configuration # #YACC= byacc -#YFLAGS += -v -d +#YFLAGS += # YACC= bison -YFLAGS += -v -d -y +YFLAGS += -y LEX= flex LFLAGS += -i -s Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Thu Oct 17 00:06:42 2013 (r256655) @@ -39,6 +39,7 @@ HEADERS = \ $(wildcard $(ACPIEXEC)/*.h) OBJECTS = \ + $(OBJDIR)/acgetline.o\ $(OBJDIR)/aeexec.o\ $(OBJDIR)/aehandlers.o\ $(OBJDIR)/aemain.o\ Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Thu Oct 17 00:06:42 2013 (r256655) @@ -210,15 +210,9 @@ INTERMEDIATES = \ $(OBJDIR)/prparserparse.c MISC = \ - $(OBJDIR)/aslcompilerparse.h\ $(OBJDIR)/aslcompiler.y.h\ - $(OBJDIR)/aslcompilerparse.output\ - $(OBJDIR)/dtparserparse.h\ $(OBJDIR)/dtparser.y.h\ - $(OBJDIR)/dtparserparse.output\ - $(OBJDIR)/prparserparse.h\ - $(OBJDIR)/prparser.y.h\ - $(OBJDIR)/prparserparse.output + $(OBJDIR)/prparser.y.h # # Flags specific to iASL compiler @@ -237,39 +231,32 @@ include ../Makefile.rules # # Parser and Lexer - intermediate C files # -$(OBJDIR)/aslcompilerlex.c : $(ASL_COMPILER)/aslcompiler.l $(ASL_COMPILER)/aslsupport.l +$(OBJDIR)/aslcompilerlex.c : $(ASL_COMPILER)/aslcompiler.l $(ASL_COMPILER)/aslsupport.l $(OBJDIR)/aslcompiler.y.h $(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l -$(OBJDIR)/aslcompilerparse.c $(OBJDIR)/aslcompilerparse.h : $(ASL_COMPILER)/aslcompiler.y - $(YACC) $(YFLAGS) -pAslCompiler -o$@ $? +$(OBJDIR)/aslcompiler.y.h : $(ASL_COMPILER)/aslcompiler.y + $(YACC) $(YFLAGS) -pAslCompiler -o/dev/null --defines=$@ $< -$(OBJDIR)/dtparserlex.c : $(ASL_COMPILER)/dtparser.l - $(LEX) $(LFLAGS) -PDtParser -o$@ $? +$(OBJDIR)/aslcompilerparse.c : $(ASL_COMPILER)/aslcompiler.y + $(YACC) $(YFLAGS) -pAslCompiler -o$@ --defines=/dev/null $< -$(OBJDIR)/dtparserparse.c $(OBJDIR)/dtparserparse.h : $(ASL_COMPILER)/dtparser.y - $(YACC) $(YFLAGS) -pDtParser -o$@ $? +$(OBJDIR)/dtparserlex.c : $(ASL_COMPILER)/dtparser.l $(OBJDIR)/dtparser.y.h + $(LEX) $(LFLAGS) -PDtParser -o$@ $< -$(OBJDIR)/prparserlex.c : $(ASL_COMPILER)/prparser.l - $(LEX) $(LFLAGS) -PPrParser -o$@ $? +$(OBJDIR)/dtparser.y.h : $(ASL_COMPILER)/dtparser.y + $(YACC) $(YFLAGS) -pDtParser -o/dev/null --defines=$@ $< -$(OBJDIR)/prparserparse.c $(OBJDIR)/prparserparse.h : $(ASL_COMPILER)/prparser.y - $(YACC) $(YFLAGS) -pPrParser -o$@ $? +$(OBJDIR)/dtparserparse.c : $(ASL_COMPILER)/dtparser.y + $(YACC) $(YFLAGS) -pDtParser -o$@ --defines=/dev/null $< +$(OBJDIR)/prparserlex.c : $(ASL_COMPILER)/prparser.l $(OBJDIR)/prparser.y.h + $(LEX) $(LFLAGS) -PPrParser -o$@ $< -# -# Rename the headers produced by bison/yacc -# -$(OBJDIR)/aslcompiler.y.h : $(OBJDIR)/aslcompilerparse.h - @echo Copy intermediate file: - @cp -f -v $(OBJDIR)/aslcompilerparse.h $(OBJDIR)/aslcompiler.y.h - -$(OBJDIR)/dtparser.y.h: $(OBJDIR)/dtparserparse.h - @echo Copy intermediate file: - @cp -f -v $(OBJDIR)/dtparserparse.h $(OBJDIR)/dtparser.y.h +$(OBJDIR)/prparser.y.h : $(ASL_COMPILER)/prparser.y + $(YACC) $(YFLAGS) -pPrParser -o/dev/null --defines=$@ $< -$(OBJDIR)/prparser.y.h: $(OBJDIR)/prparserparse.h - @echo Copy intermediate file: - @cp -f -v $(OBJDIR)/prparserparse.h $(OBJDIR)/prparser.y.h +$(OBJDIR)/prparserparse.c : $(ASL_COMPILER)/prparser.y + $(YACC) $(YFLAGS) -pPrParser -o$@ --defines=/dev/null $< # @@ -279,19 +266,19 @@ $(OBJDIR)/prparser.y.h: $(OBJDIR)/prpars # by the utilities above and they are not necessarily ANSI C, etc. # $(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< $(OBJDIR)/prparserparse.o : $(OBJDIR)/prparserparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< Added: vendor-sys/acpica/dist/source/common/acgetline.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/common/acgetline.c Thu Oct 17 00:06:42 2013 (r256655) @@ -0,0 +1,440 @@ +/****************************************************************************** + * + * Module Name: acgetline - local line editing + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2013, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#include "acpi.h" +#include "accommon.h" +#include "amlcode.h" +#include "acparser.h" +#include "acdebug.h" + +#include + +/* + * This is an os-independent implementation of line-editing services needed + * by the AcpiExec utility. It uses getchar() and putchar() and the existing + * history support provided by the AML debugger. It assumes that the terminal + * is in the correct line-editing mode such as raw and noecho. The OSL + * interface AcpiOsInitialize should do this. AcpiOsTerminate should put the + * terminal back into the original mode. + */ +#define _COMPONENT ACPI_OS_SERVICES + ACPI_MODULE_NAME ("acgetline") + + +/* Local prototypes */ + +static void +AcpiAcClearLine ( + UINT32 EndOfLine, + UINT32 CursorPosition); + +/* Various ASCII constants */ + +#define _ASCII_NUL 0 +#define _ASCII_BACKSPACE 0x08 +#define _ASCII_TAB 0x09 +#define _ASCII_ESCAPE 0x1B +#define _ASCII_SPACE 0x20 +#define _ASCII_LEFT_BRACKET 0x5B +#define _ASCII_DEL 0x7F +#define _ASCII_UP_ARROW 'A' +#define _ASCII_DOWN_ARROW 'B' +#define _ASCII_RIGHT_ARROW 'C' +#define _ASCII_LEFT_ARROW 'D' +#define _ASCII_NEWLINE '\n' + +extern UINT32 AcpiGbl_NextCmdNum; + +/* Erase a single character on the input command line */ + +#define ACPI_CLEAR_CHAR() \ + putchar (_ASCII_BACKSPACE); \ + putchar (_ASCII_SPACE); \ + putchar (_ASCII_BACKSPACE); + +/* Backup cursor by Count positions */ + +#define ACPI_BACKUP_CURSOR(i, Count) \ + for (i = 0; i < (Count); i++) \ + {putchar (_ASCII_BACKSPACE);} + + +/****************************************************************************** + * + * FUNCTION: AcpiAcClearLine + * + * PARAMETERS: EndOfLine - Current end-of-line index + * CursorPosition - Current cursor position within line + * + * RETURN: None + * + * DESCRIPTION: Clear the entire command line the hard way, but probably the + * most portable. + * + *****************************************************************************/ + +static void +AcpiAcClearLine ( + UINT32 EndOfLine, + UINT32 CursorPosition) +{ + UINT32 i; + + + if (CursorPosition < EndOfLine) + { + /* Clear line from current position to end of line */ + + for (i = 0; i < (EndOfLine - CursorPosition); i++) + { + putchar (' '); + } + } + + /* Clear the entire line */ + + for (; EndOfLine > 0; EndOfLine--) + { + ACPI_CLEAR_CHAR (); + } +} + + +/****************************************************************************** + * + * FUNCTION: AcpiOsGetLine + * + * PARAMETERS: Buffer - Where to return the command line + * BufferLength - Maximum length of Buffer + * BytesRead - Where the actual byte count is returned + * + * RETURN: Status and actual bytes read + * + * DESCRIPTION: Get the next input line from the terminal. NOTE: terminal + * is expected to be in a mode that supports line-editing (raw, + * noecho). This function is intended to be very portable. Also, + * it uses the history support implemented in the AML debugger. + * + *****************************************************************************/ + +ACPI_STATUS +AcpiOsGetLine ( + char *Buffer, + UINT32 BufferLength, + UINT32 *BytesRead) +{ + char *NextCommand; + UINT32 MaxCommandIndex = AcpiGbl_NextCmdNum - 1; + UINT32 CurrentCommandIndex = MaxCommandIndex; + UINT32 PreviousCommandIndex = MaxCommandIndex; + int InputChar; + UINT32 CursorPosition = 0; + UINT32 EndOfLine = 0; + UINT32 i; + + + /* Always clear the line buffer before we read a new line */ + + memset (Buffer, 0, BufferLength); + + /* + * This loop gets one character at a time (except for esc sequences) + * until a newline or error is detected. + * + * Note: Don't attempt to write terminal control ESC sequences, even + * though it makes certain things more difficult. + */ + while (1) + { + if (EndOfLine >= (BufferLength - 1)) + { + return (AE_BUFFER_OVERFLOW); + } + + InputChar = getchar (); + switch (InputChar) + { + default: /* This is the normal character case */ + + /* Echo the character (at EOL) and copy it to the line buffer */ + + if (EndOfLine == CursorPosition) + { + putchar (InputChar); + Buffer[EndOfLine] = (char) InputChar; + + EndOfLine++; + CursorPosition++; + Buffer[EndOfLine] = 0; + continue; + } + + /* Insert character into the middle of the buffer */ + + memmove (&Buffer[CursorPosition + 1], &Buffer[CursorPosition], + (EndOfLine - CursorPosition + 1)); + + Buffer [CursorPosition] = (char) InputChar; + Buffer [EndOfLine + 1] = 0; + + /* Display the new part of line starting at the new character */ + + fprintf (stdout, "%s", &Buffer[CursorPosition]); + + /* Restore cursor */ + + ACPI_BACKUP_CURSOR (i, EndOfLine - CursorPosition); + CursorPosition++; + EndOfLine++; + continue; + + case _ASCII_DEL: /* Backspace key */ + + if (!EndOfLine) /* Any characters on the command line? */ + { + continue; + } + + if (EndOfLine == CursorPosition) /* Erase the final character */ + { + ACPI_CLEAR_CHAR (); + EndOfLine--; + CursorPosition--; + continue; + } + + if (!CursorPosition) /* Do not backup beyond start of line */ + { + continue; + } + + /* Remove the character from the line */ + + memmove (&Buffer[CursorPosition - 1], &Buffer[CursorPosition], + (EndOfLine - CursorPosition + 1)); + + /* Display the new part of line starting at the new character */ + + putchar (_ASCII_BACKSPACE); + fprintf (stdout, "%s ", &Buffer[CursorPosition - 1]); + + /* Restore cursor */ + + ACPI_BACKUP_CURSOR (i, EndOfLine - CursorPosition + 1); + EndOfLine--; + if (CursorPosition > 0) + { + CursorPosition--; + } + continue; + + case _ASCII_NEWLINE: /* Normal exit case at end of command line */ + case _ASCII_NUL: + + /* Return the number of bytes in the command line string */ + + if (BytesRead) + { + *BytesRead = EndOfLine; + } + + /* Echo, terminate string buffer, and exit */ + + putchar (InputChar); + Buffer[EndOfLine] = 0; + return (AE_OK); + + case _ASCII_TAB: + + /* Ignore */ + + continue; + + case EOF: + + return (AE_ERROR); + + case _ASCII_ESCAPE: + + /* Check for escape sequences of the form "ESC[x" */ + + InputChar = getchar (); + if (InputChar != _ASCII_LEFT_BRACKET) + { + continue; /* Ignore this ESC, does not have the '[' */ + } + + /* Get the code following the ESC [ */ + + InputChar = getchar (); /* Backup one character */ + switch (InputChar) + { + case _ASCII_LEFT_ARROW: + + if (CursorPosition > 0) + { + putchar (_ASCII_BACKSPACE); + CursorPosition--; + } + continue; + + case _ASCII_RIGHT_ARROW: + /* + * Move one character forward. Do this without sending + * ESC sequence to the terminal for max portability. + */ + if (CursorPosition < EndOfLine) + { + /* Backup to start of line and print the entire line */ + + ACPI_BACKUP_CURSOR (i, CursorPosition); + fprintf (stdout, "%s", Buffer); + + /* Backup to where the cursor should be */ + + CursorPosition++; + ACPI_BACKUP_CURSOR (i, EndOfLine - CursorPosition); + } + continue; + + case _ASCII_UP_ARROW: + + /* If no commands available or at start of history list, ignore */ + + if (!CurrentCommandIndex) + { + continue; + } + + /* Manage our up/down progress */ + + if (CurrentCommandIndex > PreviousCommandIndex) + { + CurrentCommandIndex = PreviousCommandIndex; + } + + /* Get the historical command from the debugger */ + + NextCommand = AcpiDbGetHistoryByIndex (CurrentCommandIndex); + if (!NextCommand) + { + return (AE_ERROR); + } + + /* Make this the active command and echo it */ + + AcpiAcClearLine (EndOfLine, CursorPosition); + strcpy (Buffer, NextCommand); + fprintf (stdout, "%s", Buffer); + EndOfLine = CursorPosition = strlen (Buffer); + + PreviousCommandIndex = CurrentCommandIndex; + CurrentCommandIndex--; + continue; + + case _ASCII_DOWN_ARROW: + + if (!MaxCommandIndex) /* Any commands available? */ + { + continue; + } + + /* Manage our up/down progress */ + + if (CurrentCommandIndex < PreviousCommandIndex) + { + CurrentCommandIndex = PreviousCommandIndex; + } + + /* If we are the end of the history list, output a clear new line */ + + if ((CurrentCommandIndex + 1) > MaxCommandIndex) + { + AcpiAcClearLine (EndOfLine, CursorPosition); + EndOfLine = CursorPosition = 0; + PreviousCommandIndex = CurrentCommandIndex; + continue; + } + + PreviousCommandIndex = CurrentCommandIndex; + CurrentCommandIndex++; + + /* Get the historical command from the debugger */ + + NextCommand = AcpiDbGetHistoryByIndex (CurrentCommandIndex); + if (!NextCommand) + { + return (AE_ERROR); + } + + /* Make this the active command and echo it */ + + AcpiAcClearLine (EndOfLine, CursorPosition); + strcpy (Buffer, NextCommand); + fprintf (stdout, "%s", Buffer); + EndOfLine = CursorPosition = strlen (Buffer); + continue; + + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + /* + * Ignore the various keys like insert/delete/home/end, etc. + * But we must eat the final character of the ESC sequence. + */ + InputChar = getchar (); + continue; + + default: + + /* Ignore random escape sequences that we don't care about */ + + continue; + } + continue; + } + } +} Modified: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/source/common/adfile.c Thu Oct 17 00:06:42 2013 (r256655) @@ -288,7 +288,6 @@ FlSplitInputPathname ( *OutDirectoryPath = NULL; - *OutFilename = NULL; if (!InputPath) { @@ -334,6 +333,10 @@ FlSplitInputPathname ( } *OutDirectoryPath = DirectoryPath; - *OutFilename = Filename; + + if (OutFilename) + { + *OutFilename = Filename; + } return (AE_OK); } Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/source/common/dmextern.c Thu Oct 17 00:06:42 2013 (r256655) @@ -279,48 +279,41 @@ Cleanup: ACPI_STATUS AcpiDmAddToExternalFileList ( - char *PathList) + char *Pathname) { ACPI_EXTERNAL_FILE *ExternalFile; - char *Path; - char *TmpPath; + char *LocalPathname; - if (!PathList) + if (!Pathname) { return (AE_OK); } - Path = strtok (PathList, ","); - - while (Path) + LocalPathname = ACPI_ALLOCATE (strlen (Pathname) + 1); + if (!LocalPathname) { - TmpPath = ACPI_ALLOCATE_ZEROED (ACPI_STRLEN (Path) + 1); - if (!TmpPath) - { - return (AE_NO_MEMORY); - } - - ACPI_STRCPY (TmpPath, Path); + return (AE_NO_MEMORY); + } - ExternalFile = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EXTERNAL_FILE)); - if (!ExternalFile) - { - ACPI_FREE (TmpPath); - return (AE_NO_MEMORY); - } + ExternalFile = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EXTERNAL_FILE)); + if (!ExternalFile) + { + ACPI_FREE (LocalPathname); + return (AE_NO_MEMORY); + } - ExternalFile->Path = TmpPath; + /* Take a copy of the file pathname */ - if (AcpiGbl_ExternalFileList) - { - ExternalFile->Next = AcpiGbl_ExternalFileList; - } + strcpy (LocalPathname, Pathname); + ExternalFile->Path = LocalPathname; - AcpiGbl_ExternalFileList = ExternalFile; - Path = strtok (NULL, ","); + if (AcpiGbl_ExternalFileList) + { + ExternalFile->Next = AcpiGbl_ExternalFileList; } + AcpiGbl_ExternalFileList = ExternalFile; return (AE_OK); } Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Oct 17 00:06:42 2013 (r256655) @@ -123,11 +123,6 @@ ACPI_STATUS (*ASL_PATHNAME_CALLBACK) ( char *); ACPI_STATUS -AslDoOnePathname ( - char *Pathname, - ASL_PATHNAME_CALLBACK Callback); - -ACPI_STATUS AslDoOneFile ( char *Filename); Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Oct 17 00:06:42 2013 (r256655) @@ -611,7 +611,6 @@ AslCommonError ( char *Filename, char *ExtraMessage) { - UINT32 MessageSize; char *MessageBuffer = NULL; ASL_ERROR_MSG *Enode; @@ -622,8 +621,7 @@ AslCommonError ( { /* Allocate a buffer for the message and a new error node */ - MessageSize = strlen (ExtraMessage) + 1; - MessageBuffer = UtLocalCalloc (MessageSize); + MessageBuffer = UtLocalCalloc (strlen (ExtraMessage) + 1); /* Keep a copy of the extra message */ Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Thu Oct 17 00:06:42 2013 (r256655) @@ -51,6 +51,17 @@ #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslmain") +/* + * Main routine for the iASL compiler. + * + * Portability note: The compiler depends upon the host for command-line + * wildcard support - it is not implemented locally. For example: + * + * Linux/Unix systems: Shell expands wildcards automatically. + * + * Windows: The setargv.obj module must be linked in to automatically + * expand wildcards. + */ /* Local prototypes */ @@ -131,13 +142,13 @@ Usage ( ACPI_OPTION ("-vt", "Create verbose template files (full disassembly)"); printf ("\nAML Disassembler:\n"); - ACPI_OPTION ("-d ", "Disassemble or decode binary ACPI tables to file (*.dsl)"); + ACPI_OPTION ("-d ", "Disassemble or decode binary ACPI tables to file (*.dsl)"); ACPI_OPTION ("", " (Optional, file type is automatically detected)"); - ACPI_OPTION ("-da ", "Disassemble multiple tables from single namespace"); + ACPI_OPTION ("-da ", "Disassemble multiple tables from single namespace"); ACPI_OPTION ("-db", "Do not translate Buffers to Resource Templates"); - ACPI_OPTION ("-dc ", "Disassemble AML and immediately compile it"); + ACPI_OPTION ("-dc ", "Disassemble AML and immediately compile it"); ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)"); - ACPI_OPTION ("-e ", "Include ACPI table(s) for external symbol resolution"); + ACPI_OPTION ("-e ", "Include ACPI table(s) for external symbol resolution"); ACPI_OPTION ("-fe ", "Specify external symbol declaration file"); ACPI_OPTION ("-g", "Get ACPI tables and write to files (*.dat)"); ACPI_OPTION ("-in", "Ignore NoOp opcodes"); @@ -321,7 +332,7 @@ main ( { while (argv[Index1]) { - Status = AslDoOnePathname (argv[Index1], AcpiDmAddToExternalFileList); + Status = AcpiDmAddToExternalFileList (argv[Index1]); if (ACPI_FAILURE (Status)) { return (-1); @@ -335,7 +346,16 @@ main ( while (argv[Index2]) { - Status = AslDoOnePathname (argv[Index2], AslDoOneFile); + /* + * If -p not specified, we will use the input filename as the + * output filename prefix + */ + if (Gbl_UseDefaultAmlFilename) + { + Gbl_OutputFilenamePrefix = argv[Index2]; + } + + Status = AslDoOneFile (argv[Index2]); if (ACPI_FAILURE (Status)) { return (-1); Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Thu Oct 17 00:06:42 2013 (r256655) @@ -267,11 +267,21 @@ AslDoOptions ( case 'e': /* External files for disassembler */ - Status = AcpiDmAddToExternalFileList (AcpiGbl_Optarg); - if (ACPI_FAILURE (Status)) + /* Get entire list of external files */ + + AcpiGbl_Optind--; + + while (argv[AcpiGbl_Optind] && + (argv[AcpiGbl_Optind][0] != '-')) { - printf ("Could not add %s to external list\n", AcpiGbl_Optarg); - return (-1); + Status = AcpiDmAddToExternalFileList (argv[AcpiGbl_Optind]); + if (ACPI_FAILURE (Status)) + { + printf ("Could not add %s to external list\n", argv[AcpiGbl_Optind]); + return (-1); + } + + AcpiGbl_Optind++; } break; Modified: vendor-sys/acpica/dist/source/compiler/aslstartup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslstartup.c Wed Oct 16 22:53:00 2013 (r256654) +++ vendor-sys/acpica/dist/source/compiler/aslstartup.c Thu Oct 17 00:06:42 2013 (r256655) @@ -51,18 +51,8 @@ ACPI_MODULE_NAME ("aslstartup") -#define ASL_MAX_FILES 256 -static char *FileList[ASL_MAX_FILES]; -static BOOLEAN AslToFile = TRUE; - - /* Local prototypes */ -static char ** -AsDoWildcard ( - char *DirectoryPathname, - char *FileSpecifier); - static UINT8 AslDetectSourceFileType ( ASL_FILE_INFO *Info); @@ -72,6 +62,11 @@ AslDoDisassembly ( void); +/* Globals */ + +static BOOLEAN AslToFile = TRUE; + + /******************************************************************************* * * FUNCTION: AslInitializeGlobals @@ -131,82 +126,6 @@ AslInitializeGlobals ( } -/****************************************************************************** - * - * FUNCTION: AsDoWildcard - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Process files via wildcards. This function is for the Windows - * case only. - * - ******************************************************************************/ - -static char ** -AsDoWildcard ( - char *DirectoryPathname, - char *FileSpecifier) -{ -#ifdef WIN32 - void *DirInfo; - char *Filename; - int FileCount; - - - FileCount = 0; - - /* Open parent directory */ - - DirInfo = AcpiOsOpenDirectory (DirectoryPathname, FileSpecifier, REQUEST_FILE_ONLY); - if (!DirInfo) - { - /* Either the directory of file does not exist */ - - Gbl_Files[ASL_FILE_INPUT].Filename = FileSpecifier; - FlFileError (ASL_FILE_INPUT, ASL_MSG_OPEN); - AslAbort (); - } - - /* Process each file that matches the wildcard specification */ - - while ((Filename = AcpiOsGetNextFilename (DirInfo))) - { - /* Add the filename to the file list */ - - FileList[FileCount] = AcpiOsAllocate (strlen (Filename) + 1); - strcpy (FileList[FileCount], Filename); - FileCount++; - - if (FileCount >= ASL_MAX_FILES) - { - printf ("Max files reached\n"); - FileList[0] = NULL; - return (FileList); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Thu Oct 17 00:07:22 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5E08CB93; Thu, 17 Oct 2013 00:07:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 33B932420; Thu, 17 Oct 2013 00:07:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9H07MTQ073889; Thu, 17 Oct 2013 00:07:22 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9H07Miv073888; Thu, 17 Oct 2013 00:07:22 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201310170007.r9H07Miv073888@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 17 Oct 2013 00:07:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r256656 - vendor-sys/acpica/20130927 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2013 00:07:22 -0000 Author: jkim Date: Thu Oct 17 00:07:21 2013 New Revision: 256656 URL: http://svnweb.freebsd.org/changeset/base/256656 Log: Tag ACPICA 20130927. Added: vendor-sys/acpica/20130927/ - copied from r256655, vendor-sys/acpica/dist/