�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!PK‰0]iJs‚>F>FCOPYINGnu„[µü¤ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. PK‰0]мüùcùc Changelognu„[µü¤* 2.0.30 2018-07-18 Ted Felix - 2.0.30 release (configure.ac) (Ted Felix) - configure: Don't use AC_FUNC_MALLOC, AC_FUNC_REALLOC. (configure.ac) (Robin Gloster ) - samples: powerbtn: extend the list of known PMS (powerbtn.sh) (Andrey Utkin ) - samples: powerbtn: fix kde4 power management detection (powerbtn.sh) (Andrey Utkin ) * 2.0.29 2018-04-16 Ted Felix - 2.0.29 release (configure.ac) (Ted Felix) - Decouple -d and -f options. Bug #15. (acpid.8 acpid.c acpid.h log.c log.h TESTPLAN) (Casper Ti. Vector) - Rename acpid_debug -> debug_level. (acpid.c event.c log.c log.h) (Ted Felix) - Standards: man page command references. (acpid.8 kacpimon/kacpimon.8) (Ted Felix) - Log missing input layer as a warning. (inotify_handler.c) (Ted Felix) * 2.0.28 2016-09-15 Ted Felix - 2.0.28 release (configure.ac) (Ted Felix) - Fix intermittent "Address already in use". Bug #12. (acpid.c) (Andreas Chmielewski) - inotify: process all inotify messages in buffer. Bug #13. (inotify_handler.c) (Dennis Wassenberg) - Use proper lengths for inotify buffers. (inotify_handler.c) (Ted Felix) * 2.0.27 2016-03-15 Ted Felix - 2.0.27 release (configure.ac) (Ted Felix) - Fix out of tree build (sock.c ud_socket.c) (Maxin B. John ) - kacpimon: fix out of tree build (kacpimon/Makefile.am) (Maxin B. John ) - input_layer: Allow repeated reporting of VOLUME keys (input_layer.c) (Torsten Hilbrich ) * 2.0.26 2016-01-15 Ted Felix - 2.0.26 release (configure.ac) (Ted Felix) - Fix build warning with new kernel headers. Debian #808015. (libnetlink.c kacpimon/libnetlink.c) (Ted Felix) - Fix build with musl libc. Define isfdtype() if libc doesn't have it. (configure.ac sock.c) (Khem Raj) - Fix out of tree build. (Makefile.am) (Khem Raj) * 2.0.25 2015-08-16 Ted Felix - 2.0.25 release (configure.ac) (Ted Felix) - Remove release process from README. (README) (Ted Felix) - Fix missing libc_compat.h in release tarball. (Makefile.am kacpimon/Makefile.am kacpimon/libc_compat.h) (Ted Felix) * 2.0.24 2015-08-15 Ted Felix - 2.0.24 release (configure.ac) (Ted Felix) - Avoid using SW_VIDEOOUT_INSERT if it isn't available. (input_layer.c) (Bostjan Skufca ) - Add support for Copy and Restart keys. (input_layer.c) (Andrey Kuznetsov) - Add support for non-glibc libc's. (acpi_listen.c acpid.c event.c input_layer.c kacpimon/libnetlink.h libc_compat.h libnetlink.c netlink.c proc.c ud_socket.c) (Brendan Heading ) - Fix compiler warnings. (acpi_listen.c event.c sock.c) (Brendan Heading ) - Add systemd info to documentation. (README TESTPLAN) (Ted Felix) * 2.0.23 2014-08-23 Ted Felix - 2.0.23 release (configure.ac) (Ted Felix) - Avoid using KEY_MICMUTE if it doesn't exist. (input_layer.c) (Lonnie Abelbeck) - Add troubleshooting section to man page. (acpid.8) (Ted Felix) * 2.0.22 2014-03-15 Ted Felix - 2.0.22 release (configure.ac) (Ted Felix) - Add support for F20. Debian Bug #738611. (input_layer.c) (Ted Felix) - Fix for repeated mute keys on some ThinkPad models. (acpid.c acpid.h input_layer.c) (Torsten Hilbrich ) - Add "-t" short option for "--tpmutefix". (acpid.c) (Ted Felix) - Update man page for --tpmutefix. (acpid.8) (Ted Felix) * 2.0.21 2014-01-15 Ted Felix - 2.0.21 release (configure.ac) (Ted Felix) - Add new action. Debian #732277. (acpid.c event.h event.c acpid.8) (Pigeon , Ted Felix) * 2.0.20 2013-09-15 Ted Felix - 2.0.20 release (configure.ac) (Ted Felix) - Improve build and release documentation. (README) (Ted Felix) - Fix for Debian bug #719659. Improved handling of systems with large numbers of input layer connections. Better error handling. (connection_list.h connection_list.c inotify_handler.c input_layer.c netlink.c proc.c sock.c acpid.c) (Ted Felix, Ben Winslow) - Update .gitignore for Eclipse. (.gitignore) (Ted Felix) * 2.0.19 2013-05-28 Ted Felix - 2.0.19 release (configure.ac) (Ted Felix) - README improvements (README) (Ted Felix) - man page additions (acpid.8) (Ted Felix) - Sync kacpimon's libnetlink.c with acpid's. (kacpimon/libnetlink.c) (Ted Felix) - Add support for mic mute (KEY_MICMUTE). (input_layer.c) (Ted Felix) * 2.0.18 2013-02-15 Ted Felix - 2.0.18 release (configure.ac) (Ted Felix) - README improvements (README) (Ted Felix) - Fix format of video/tabletmode event string. CRITICAL. (input_layer.c) (Ted Felix) - Add how to kill acpid to kacpimon man page. (kacpimon.8) (Ted Felix) - Add info on logind.conf's HandlePowerKey to man page. (acpid.8) (Ted Felix) * 2.0.17 2012-09-15 Ted Felix - 2.0.17 release (configure.ac) (Ted Felix) - Check for chmod. (configure.ac) (Ted Felix) - Add support for tablet mode switch. (input_layer.c) (Fabian Henze) - Incorrect sizeof() usage for memset. (libnetlink.c) (Auke Kok) - Close some unclosed fd's. (acpid.c event.c ud_socket.c) (Auke Kok) - Do not create pid file when running in foreground. (acpid.c) (Cristian Rodriguez) - Free regular expression. (event.c) (Cristian Rodriguez) * 2.0.16 2012-03-29 Ted Felix - 2.0.16 release (configure.ac) (Ted Felix) - Add tests for required functions to configure.ac. (configure.ac) (Ted Felix) - Move fchmod() before bind() on socket. Debian bug #664705. (sock.c ud_socket.c ud_socket.h) (Ted Felix) - Switch back to chown() as fchown() doesn't appear to work with sockets. (sock.c) (Ted Felix) - Add support for headphone (and other) jack switch events. (input_layer.c) (AlexanderR) - Add notes on making the tarball. (README) (Ted Felix) * 2.0.15 2012-03-15 Ted Felix - 2.0.15 release (configure.ac) (Ted Felix) - Improve man page (Debian bug #656676). (acpid.8 acpi_listen.8) (Ted Felix) X Change makefile to get rid of double slashes on install paths. Note: This change was lost due to introduction of autoconf which wiped out the old Makefile. (Makefile) (Gilles Espinasse) - Switch from Makefile to autoconf build system. Fix some related warnings. (Makefile Makefile.am README TODO acpi_ids.c acpi_ids.h acpid.h configure.ac connection_list.h event.c kacpimon/Makefile.am kacpimon/makefile proc.h sock.h) (Cristian Rodriguez) - Fix build warnings uncovered by new gcc settings from autoconf. (inotify_handler.c input_layer.c kacpimon/acpi_ids.c kacpimon/acpi_ids.h kacpimon/connection_list.c kacpimon/connection_list.h kacpimon/input_layer.c kacpimon/kacpimon.c kacpimon/netlink.c netlink.c proc.c sock.c) (Ted Felix) - Remove fcntl() calls to set FD_CLOEXEC and replace with CLOEXEC flags within the various open(), recvmsg() and other calls. Requires kernel version 2.6.23 and above. (acpi_listen.c inotify_handler.c input_layer.c libnetlink.c netlink.c proc.c ud_socket.c) (Cristian Rodriguez) - Add SOCK_NONBLOCK to ud_create_socket(). (ud_socket.c) (Cristian Rodriguez) - Use isfdtype() instead of getsockopt() in is_socket(). Use fchmod(), fstat(), and fchown() instead of the non-"f" versions in open_sock(). (sock.c) (Cristian Rodriguez) - Use __attribute__ for argument checking in acpid_log(). (input_layer.c log.h netlink.c ud_socket.c) (Cristian Rodriguez) - Close only the open fds in close_fds(). (acpid.c) (Cristian Rodriguez) - Use accept4() with SOCK_CLOEXEC and SOCK_NONBLOCK in ud_accept(). Remove unnecessary calls to fcntl() in process_sock(). (sock.c ud_socket.c) (Cristian Rodriguez) - Use asprintf() instead of snprintf() in process_sock(). (sock.c) (Cristian Rodriguez) - Use TEMP_FAILURE_RETRY macro instead of bogus checks for EINTR. (acpi_listen.c acpid.c event.c input_layer.c libnetlink.c netlink.c proc.c ud_socket.c) (Cristian Rodriguez) - Use safer, faster, and more modern functions asprintf(), fstatat(), openat(), and fdopen() in the configuration file processing. (event.c) (Cristian Rodriguez) * 2.0.14 2011-12-15 Ted Felix - Fixed brace style. (inotify_handler.c acpid.c) (Ted Felix) - Added support for a "K" suffix on event strings to indicate that they may have originated from a keyboard input layer device. This can be used to differentiate between a power switch on the keyboard, and a power switch on the computer's case. (connection_list.h inotify_handler.c input_layer.c netlink.c proc.c sock.c) (Ted Felix) - Added a pathname to connection along with a find_connection_name(). Modifications to process_inotify() to log IN_DELETE events. Additional debugging output. These changes were experimentation related to dealing with a ThinkPad suspend problem. They should have no effect on acpid's behavior. They are mainly noticeable as a change in the logging. The Problem: When resuming from suspend, the lid switch and power button's /dev/input event files do not trigger an IN_CREATE, so acpid doesn't reconnect to them. Restarting acpid fixes this. Tried using IN_DELETE instead of ENODEV to detect the drivers going away. Worked fine for disconnecting/reconnecting a USB keyboard, but not for the ThinkPad suspend problem. I've given up on fixing this as it appears to be a kernel or driver issue. (connection_list.c connection_list.h inotify_handler.c input_layer.c netlink.c proc.c sock.c) (Ted Felix) * 2.0.13 2011-11-15 Ted Felix - Fix for socket name buffer overflow. (ud_socket.c) (Ted Felix) - Moved acpid_log() out of acpid.h/.c and into log.h/.c to make it easier for all parts of acpid to use. (Makefile acpid.h acpid.c connection_list.c event.c inotify_handler.c input_layer.c log.h log.c netlink.c proc.c sock.c ud_socket.c) (Ted Felix) - Cleaned up #includes and comment style. (libnetlink.c libnetlink.h) (Ted Felix) * 2.0.12 2011-08-15 Ted Felix - Changed exit() to _exit() if execl() fails. (event.c) (Ted Felix) * 2.0.11 2011-07-30 Ted Felix - Set umask to 0077 for scripts run by acpid. (event.c) (Ted Felix) * 2.0.10 2011-05-17 Ted Felix - Fixed compiler warnings in kacpimon. (kacpimon/libnetlink.c) (Michael Meskes) - systemd support. The socket acpid creates to connect with clients can now be passed as stdin (fd 0) at startup. (acpid.c sock.h sock.c acpid.8) (Reiner Klussmeier) - man page improvements (acpid.8) (Ted Felix) * 2.0.9 2011-04-15 Ted Felix - Removed newlines from acpid_log() calls and modified acpid_log() to no longer need newlines. This change to acpid prevents blank lines in the log for versions of syslogd that preserve newlines. (acpid.c connection_list.c event.c inotify_handler.c input_layer.c netlink.c proc.c sock.c) (Michael Meskes, Ted Felix) - Added fcntl() for O_NONBLOCK on the client sockets. This prevents acpid from hanging if a client behaves badly. (sock.c) (Vasiliy Kulikov) From: http://www.openwall.com/lists/oss-security/2011/01/19/4 - Improvements to error handling. (sock.c) (Ted Felix) * 2.0.8 2011-02-15 Ted Felix - Fixed "comparison between signed and unsigned integer expressions" error with gcc 4.6. (libnetlink.c) (Eugeni Dodonov) - Fixed unused variable "type" with gcc 4.6. (libnetlink.c) (Jiri Skala) * 2.0.7 2010-11-15 Ted Felix - Reduced the startup logging and skipped processing of "." and ".." in the config files directory. Debian #598198. (event.c proc.c) (Ted Felix) - Added CD-related buttons. Debian #600564. (input_layer.c) (Stanislav Maslovski) - Removed the "getppid() == 1" hack from daemonize(). Red Hat #629740. "While forking is ugly in theory, this has the advantage that it is clear that the acpid unix socket is properly installed before systemd continues starting other units that want to be started after acpid." - Lennart Poettering For upstart, specify "expect fork" in your upstart .conf file for acpid. For systemd, specify "Type=forking" in your systemd service file for acpid. (acpid.c) (Lennart Poettering) - Added FD_CLOEXEC to the input layer fd's. Red Hat #648221. (input_layer.c) (Daniel Walsh) * 2.0.6 2010-06-15 Ted Felix - Added getXconsole() to samples/powerbtn/powerbtn.sh to eliminate dependency on other parts of Debian. (samples/powerbtn/powerbtn.sh) (Debian and Timo Gurr) * 2.0.5 2010-05-15 Ted Felix - Moved powerbtn.sh to powerbtn.sh.old and brought in the latest powerbtn.sh from Debian which handles KDE4. (samples/powerbtn/powerbtn.sh samples/powerbtn/powerbtn.sh.old) (Ted Felix) * 2.0.4 2010-04-15 Ted Felix - Replaced all the mandb code in the makefile with a comment. (Makefile) (Ted Felix) - Revamped logging. (acpid.c event.c inotify_handler.c input_layer.c netlink.c proc.c sock.c) (Ted Felix) - Removed CR's (\r) from files. (Changelog connection_list.c sock.c) (Ted Felix) - Cleaned up the samples directory a bit. Also added powerbtn samples taken from Debian. (samples/*) (Ted Felix) - Removed the %changelog token from the top of the Changelog. This appears to be a Red Hat-ism. (Changelog) (Ted Felix) * 2.0.3 2010-03-15 Ted Felix - Fixed problem in makefile with mandb line when DESTDIR is not empty. (Makefile) (Jiri Skala) - Added missing headers needed by Red Hat/Fedora. (acpid.c sock.c) (Jiri Skala) - Updated daemonize() to be in keeping with Doug Potter's "How to Daemonize in Linux". (acpid.c) (Ted Felix) - Removed the test for bad kernels. (acpid.c) (Ted Felix) * 2.0.2 2010-02-15 Ted Felix - Increased MAX_CONNECTIONS to 20. (connection_list.c) - Recalculate highestfd in delete_connection(). (connection_list.c) (Willi Mann) - Removed old naming convention code for configuration files. (event.c) - Fixed unescaped dashes in manpage. (acpid.8) (Michael Meskes) - Added fix for mandb issue. (Makefile) (Robby Workman) - Moved README-NETLINK into README. (README-NETLINK README) * 2.0.1 2010-01-15 Ted Felix - Makefile improvements for packagers. (Makefile) (Robby Workman) * Use DESTDIR instead of INSTPREFIX * Allow custom compiler optimizations * Allow alternative prefix * Allow custom manpage directory * Add DOCDIR and install docs * Remove reference to "mandb -q" - this doesn't exist everywhere After this patch, packagers can do e.g.: make install \ OPT="-O3" \ PREFIX=/opt \ MANDIR=/opt/man \ DOCDIR=/opt/doc/apcid \ DESTDIR=/tmp/package - run-parts(8) naming convention for configuration files. (event.c acpid.8) (Debian) * 2.0.0 2009-12-15 Ted Felix - Fixed gcc 4.4 warnings for strict aliasing. (kacpimon/acpi_ids.c) (Debian) - Fixed a printf() warning. (kacpimon/input_layer.c) (Debian) - Fixed kacpimon makefile for a release build. (kacpimon/makefile) (Ted Felix) - Added dist and install targets to kacpimon makefile. Added a set of CFLAGS for Debian-style (-g -O2) builds. Fixed error messages in clean target with a "-f" to rm. (kacpimon/makefile) (Ted Felix) - Increased MAX_CONNECTIONS to 20 for kacpimon. (kacpimon/connection_list.c) (Ted Felix) - Improved "dist" target with DISTNAME in makefile. (Makefile) (Ted Felix) - Added mandb to the install target so that the man database will get updated after the man pages are installed. (Makefile) (Ted Felix) - Updated the "event=" line in sample.conf to be more modern. (samples/sample.conf) (Ted Felix) - Improved the Example in the man page. (acpid.8) (Ted Felix) * 1.0.10-netlink6 2009-11-13 Ted Felix - Implemented discovery of new input layer devices using inotify(7). (inotify_handler.h inotify_handler.c acpid.c input_layer.h input_layer.c) (Ted Felix) - Updated input layer event table to incorporate more events and to support a format compatible with older event configuration files. (input_layer.c) (Harald Braumann and Ted Felix) - Cleanup and move of input layer constants. (acpid.h input_layer.c inotify_handler.c) (Ted Felix) - kacpimon now opens all event sources and reports where each event comes from. This makes it more useful for discovering events. (kacpimon/kacpimon.c kacpimon/input_layer.c kacpimon/netlink.c) (Ted Felix) - Turned off strict aliasing optimizations as the netlink code is filled with strict aliasing problems. (Makefile) (Ted Felix) * 1.0.10-netlink5 2009-11-06 Ted Felix - Fixed exit on device removal. (input_layer.c connection_list.h connection_list.c) (Mikhail Krivtsov) * 1.0.10-netlink4 2009-07-19 Ted Felix - Added events to input_layer.c to cover more buttons on the Thinkpad X40 (input_layer.c) (Peter Stuge) - Fixed Makefile "dist" target to work properly. (Makefile) (Ted Felix) - Added kacpimon to the codebase as a debugging tool. (kacpimon directory, Makefile) (Ted Felix) - Removed erroneous comment in sock.c about the 256 connection limit. (sock.c) (Ted Felix) - Removed unnecessary #include from connection_list.c. (connection_list.c) (Ted Felix) * 1.0.10-netlink3 2009-05-04 Ted Felix - Fixed strict aliasing issue with gcc 4.4. (acpi_ids.c) (Michael Meskes and Peter Alfredsen) * 1.0.10-netlink2 2009-05-02 Ted Felix - Merge of the following three 1.0.10 changes into 1.0.10-netlink2 (Michael Meskes and Ted Felix) * Wed Apr 22 2009 Tim Hockin - Bump version to 1.0.10 for release. * Wed Apr 22 2009 Tim Hockin - Add a -C (--clientmax) command line flag to set max number of non-root socket connections. (acpi.c acpid.h acpid.8 event.c) - Set the maximum number of socket clients to 256 by default. (acpid.h) - Close clients that have disconnected. (acpid.c event.c) (Aaron Plattner ) - Give up and exit() if 5 accept() calls fail in a row. (acpid.c) * Mon Feb 09 2009 Tim Hockin - Open /dev/null O_RDWR, rather than O_RDONLY. (acpid.c) * Thu Dec 11 2008 Ted Felix - Version 1.0.8ted1 - Netlink and Input Layer support. Many files have been changed and several have been added. (Ted Felix ) * Tue Oct 28 2008 Tim Hockin - Bump version to 1.0.8 for release. * Sun Oct 26 2008 Tim Hockin - Define _GNU_SOURCE. (Makefile) (Ted Felix ) - Rename a variable to avoid shadowing a global. (event.c) (Ted Felix ) - Fix typos in man pages. (acpid.8, acpi_listen.8) (Ted Felix ) - GCC 4.3.2 gives chdir() the _wur attribute (warn unused result). Check for errors. (acpid.c) (Ted Felix ) - Check for ferror() in parse_file(). (event.c) (Ted Felix ) - Only read regular files in acpid_read_conf(). (event.c) (Ted Felix ) - Stop processing ACPI events when a lockfile exists (from Debian). (acpid.8, acpid.c, acpid.h) (Ted Felix ) * Sat Nov 24 2007 Tim Hockin - Build with -O2 flag (Makefile). - Add -l (--logevents) option to enable logging of all events. Due to a number of reports of log flooding (bad ACPI BIOS?) The new default is to NOT log events. (acpid.c acpid.h event.h acpid.8) - Add pidfile support and a -p (--pidfile) option to change the pidfile. Default is /var/run/acpid.pid. (acpid.c acpid.8) (Javier Pello ) - Rename ACPI_* constants to ACPID_*. (acpid.c acpi_listen.c) - Remove a bad cast of malloc()'s return value. (event.c) - Add proper make dependencies. (Makefile) - Close client file descriptors on exec(). (acpid.c) (Zdenek Prikryl ) * Mon Sep 24 2007 Tim Hockin - Don't use a mode argument on open("/dev/null") (acpid.c) (Steve Grubb ) - Use GCC "__attribute__((format(printf)))" for acpid_log (acpid.c) (Steve Grubb ) - Fix a shadowed variable name (event.c) (Steve Grubb ) - Fix a leaked fd on error (event.c) (Steve Grubb ) - Fix a signed/unsigned comparison (event.c) (Steve Grubb ) - Compile with more warnings (Makefile) (Steve Grubb ) * Sat June 30 2007 Tim Hockin - Bump version to 1.0.6 for release. * Thu May 24 2007 Tim Hockin - Print event handler output to stdout only in debug mode (acpid.c, event.c). - Update man page for new logging. * Wed May 23 2007 Tim Hockin - Correctly check for malloc() failures (event.c) - Skip editor backup files when scanning for conf files (event.c) (Stefan Seyfried ) - Use syslog() for logging (acpid.c, event.c, acpid.h) (Stefan Seyfried ) * Fri Dec 30 2005 Tim Hockin - Add a do_detach argument to acpid_cleanup_rules() to avoid closing clients on a HUP (acpid.c, event.c) (Frederic Lepied ) * Sat Sep 24 2005 Tim Hockin - Document -f option in the acpid man page (acpid.8) * Fri Sep 23 2005 Tim Hockin - Fix rule and fd leak when clients disconnect on socket (event.c) (Timo Hoenig ) * Fri Oct 19 2005 Tim Hockin - Use socklen_t for sockets calls (ud_socket.c) * Sun Oct 24 2004 Tim Hockin - Update my own email to not say @sun.com anymore * Sun Oct 17 2004 Tim Hockin - mkdir BINDIR in Makefile * Sun Oct 17 2004 Tim Hockin - set acpi_listen stdout to be line-buffered (Gilles Chanteperdrix ) - detect a closed socket and exit (acpi_listen.c) - detect a closed events file and exit (acpid.c) - print read_line() errors (acpi_listen.c, acpid.c) - added sample battery config and handler (Frank Dietrich ) - added sample AC adapter config/handler and hotkey config/handler for Panasonic notebooks (David Bronaugh ) - prep for 1.0.4 release * Fri Feb 13 2004 Tim Hockin - dump debian/ and redhat/ dirs -- too much hassle - change 'make rpm' to 'make dist' - minor Makefile cleanup - README cleanup - prep for 1.0.3 release * Thu Dec 18 2003 Tim Hockin - unblock signals before exec()ing a handler - remove odd 'been_here' from signals_handled() (debug artifact?) * Mon Nov 24 2003 Tim Hockin - add -c, --count option to acpi_listen (Luca Capello ) - add -t, --time option to acpi_listen (Luca Capello ) - return a meaningful value if we break out of the main loop (acpi_listen.c) - break out usage() from handle_cmdline() (acpi_listen.c) * Mon Nov 17 2003 Tim Hockin - Decouple logging to stdout from foregrounding - Add acpi_listen (source and man) - Add ud_connect() - Remove (euid == 0) check - ifdef the bad-kernel checking - it consumes a byte of data! * Fri Nov 14 2003 Tim Hockin - Add -f option (run in foreground) * Tue May 13 2003 Tim Hockin - Fixed a dumb bug with %e expansion for commands - Add COPYING file - Add TODO file * Fri Mar 15 2002 Tim Hockin - Updated RPM spec with patch from sun for chkconfig on/off - Add Changelog, make 'make rpm' use it. - 1.0.1 * Wed Mar 13 2002 Tim Hockin - Fixed logging bug - not appending to log (O_APPEND needed) - Fix 'make install' to not need root access - Fix RPM spec to not need root * Thu Sep 6 2001 Tim Hockin - 1.0.0 * Thu Aug 16 2001 Tim Hockin - Added commandline options to actions * Wed Aug 15 2001 Tim Hockin - Added UNIX domain socket support - Changed /etc/acpid.d to /etc/acpid/events * Mon Aug 13 2001 Tim Hockin - added changelog - 0.99.1-1 PK‰0]ODf,,TESTPLANnu„[µü¤acpid Test Plan Suggestions - Run all these tests with valgrind to detect memory leaks. - It's best to test without a window manager running (such as GNOME or KDE) as they tend to handle acpi events on their own and override acpid. To bring down X on a system that is configured with a graphical login, there's usually an "init" script you can run. As an example, with Debian/GNOME, log off of your X/GNOME session, switch to another tty (e.g. Alt-Ctrl-F1), login, and do this: sudo /etc/init.d/gdm stop It's different if you are using upstart: sudo initctl stop gdm And systemd requires a different incantation: sudo systemctl stop gdm LightDM in Ubuntu 11.10 (and others) doesn't seem to care about the power button. So no need to stop it. Just log out. Now X is out of the way and you can test from the console. - You can kill acpid with "sudo killall acpid". Or if you are using upstart: sudo initctl stop acpid For systemd: sudo systemctl stop acpid acpid.socket - To make testing more convenient, you can run acpid from a shell as "acpid -fld" to get maximum logging. Use Ctrl-C to stop acpid. Normal Paths * proc fs, all events Start acpid against /proc/acpi/event (if it exists). Test each of the following events: 1. Power Button 2. Laptop Lid Switch 3. Sleep Button 4. Laptop AC Adapter 5. Laptop Battery * input layer/netlink, all events Start acpid against the input layer and netlink. Test each of the following events: 1. Power Button (tests ACPI -> input layer) 2. Laptop Lid Switch (tests ACPI -> input layer) 3. Sleep Button (tests ACPI -> input layer) 4. Laptop AC Adapter (tests ACPI -> netlink) 5. Laptop Battery (tests ACPI -> netlink) 6. Special Keyboard Key(s) * input layer/netlink fallback Start acpid with a bogus events file specified via the options. acpid -e /proc/acpi/bogus Make sure a connection is made via the input layer and netlink. * lockfile procfs Start acpid against the proc fs Try some events and make sure they are coming through. Create the lockfile. Try some events and make sure they do not come through. Remove the lockfile. Try some events and make sure they are coming through. * lockfile netlink Start acpid against input layer and netlink. Try some events and make sure they are coming through. Create the lockfile. Try some events and make sure they do not come through. Remove the lockfile. Try some events and make sure they are coming through. * USB disconnect Start acpid (input layer and netlink) with a second USB keyboard attached. Try some events and make sure they are coming through. Disconnect the second USB keyboard. Make sure acpid is still running. Try some events and make sure they are coming through. * USB connect Start acpid against input layer and netlink. Try some events and make sure they are coming through. Connect a second USB keyboard. Check logging to see if acpid has found the new keyboard. Try some events from the second USB keyboard and make sure they are coming through. Debugging Paths * event logging Run acpid without the -l option and make sure no events are logged to syslog. Run acpid with the -l option and make sure events are logged to syslog. * debug mode Run acpid with the -fd option and note that it runs in the foreground and provides debugging info to the console. acpid also supports up to 4 debug levels in the event handler. Might want to try "-fdddd" and see what happens. * foreground mode Run acpid with the -f option and note that it runs in the foreground. Run acpid without the -f option and note that it runs in the background. PK‰0]’ÄÕРРREADMEnu„[µü¤acpid for netlink ================= This branch of the acpid project includes support for netlink and the input layer. The latest version can be found here: http://sourceforge.net/projects/acpid2/ Previous (1.x) versions of acpid relied on /proc/acpi/event which is a deprecated kernel interface for ACPI events. Newer kernels use netlink and the input layer to send ACPI-related events. This branch of acpid uses these new interfaces. BUILD NOTES Before installing, the chances are pretty good that you are already running acpid. You'll want to kill it before installing the new version. While "sudo killall acpid" might work, it is likely that you'll need to work with init (e.g. upstart, systemd, ...) on your particular setup to stop acpid completely. For example, with systemd, the proper incantation is usually: $ sudo systemctl stop acpid acpid.socket acpid version 2.0.15 introduced autoconf. To build versions >= 2.0.15: $ ./configure --prefix=/usr $ make $ sudo make install If you want to start from scratch, use autoreconf to regenerate the configure script from configure.ac and Makefile.am. This is not normally needed, so be sure you understand autoreconf before using it. $ autoreconf --install --force Older versions (<= 2.0.14) of acpid simply required "make" to build: $ make $ sudo make install CONTACT Any comments or patches for this branch should be sent to Ted Felix: http://www.tedfelix.com ( ted -at- tedfelix -dot- com ) You can also fork the git repo on sourceforge and submit changes that way: http://sourceforge.net/u/tedfelix/acpid2/ -------------------------------------------------------------------- OLD README *********************************************************** * README for acpid * * * * Daemon for Advanced Configuration and Power Interface * * Tim Hockin * * * * * *********************************************************** Feb 13, 2004 Overview -------- ACPID used to try to handle events internally. Rather than try to climb an ever-growing mountain, ACPID now lets YOU define what events to handle. Any event that publishes itself to /proc/acpi/event can be handled. ACPID reads a set of configuration files which define event->action pairs. This is how you make it do stuff. See the man page for details. Implementation status --------------------- This version should have complete support for generic handling of events. Requirements ------------ For 2.6 and newer 2.4 kernels, ACPI seems to be fully integrated. That should be all you need. The ACPI kernel driver should be working on your system before trying ACPID. Verify ACPI is loaded by verifying the existence of /proc/acpi/event. Compiling ACPID --------------- type "make" PK‰0]8{f„  TODOnu„[µü¤Future Enhancements ------------------- * systemd support - Support receiving unix sockets from systemd. - Make daemonize() do what's right for systemd. - Can we auto-detect systemd? Maybe the presence of the environment vars for the unix sockets? - Maintain compatibility with upstart, etc... * Look into using libnl for netlink - Can this be done? Is it a good idea? OLD IDEAS * DBUS support - Do we really need DBUS support? Probably not. - Tim says this would be easy to implement. He mentioned "mced" which is similar to acpid and handles DBUS. http://code.google.com/p/mcedaemon/ - Everyone seems to agree that the whole point of acpid is to avoid the big desktop stuff, and therefore, this is probably not a good idea. - However, there are still pieces of those big desktop environments that connect to acpid via sockets. DBUS should be a nicer interface. - Implement with a build-time option to turn it on/off? This way users can reduce the dependencies if they want. Or can we detect the presence of DBUS at runtime? * Allow socket-connected clients to filter incoming events - This might be useful on older laptops that used to generate a slew of events. I think that on modern hardware, this is not needed. PK‰0]iJs‚>F>FCOPYINGnu„[µü¤PK‰0]мüùcùc uFChangelognu„[µü¤PK‰0]ODf,,§ªTESTPLANnu„[µü¤PK‰0]’ÄÕРР ¹READMEnu„[µü¤PK‰0]8{f„  ÅTODOnu„[µü¤PKbNÊ