Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 222207 Details for
Bug 238934
sys-power/acpid-? - ACPID events filling my log files
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch adds ability to turn off logging completely
acpid-1.0.10-netlink3.no_logging.patch (text/plain), 1.46 KB, created by
Alexander Kozyrev
on 2010-03-05 20:19:20 UTC
(
hide
)
Description:
patch adds ability to turn off logging completely
Filename:
MIME Type:
Creator:
Alexander Kozyrev
Created:
2010-03-05 20:19:20 UTC
Size:
1.46 KB
patch
obsolete
>--- acpid-1.0.10-netlink3/acpid.c 2009-05-02 05:22:00.000000000 +0300 >+++ acpid-1.0.10-netlink3-patched/acpid.c 2010-03-05 22:20:00.000000000 +0200 >@@ -60,6 +60,8 @@ > static const char *pidfile = ACPID_PIDFILE; > static int netlink; > >+static int no_log; >+ > int > main(int argc, char **argv) > { >@@ -235,6 +237,7 @@ > {"netlink", 0, 0, 'n'}, > {"version", 0, 0, 'v'}, > {"help", 0, 0, 'h'}, >+ {"no-logging", 0, 0, 'N'}, > {NULL, 0, 0, 0}, > }; > const char *opts_help[] = { >@@ -253,6 +256,7 @@ > "Force netlink/input layer mode. (overrides -e)", /* netlink */ > "Print version information.", /* version */ > "Print this message.", /* help */ >+ "Do not do any logging at all.", /* no-logging */ > }; > struct option *opt; > const char **hlp; >@@ -261,11 +265,14 @@ > for (;;) { > int i; > i = getopt_long(*argc, *argv, >- "c:C:de:flg:m:s:Sp:L:nvh", opts, NULL); >+ "Nc:C:de:flg:m:s:Sp:L:nvh", opts, NULL); > if (i == -1) { > break; > } > switch (i) { >+ case 'N': >+ no_log = 1; >+ break; > case 'c': > confdir = optarg; > break; >@@ -396,7 +403,9 @@ > if (acpid_debug) { > log_opts |= LOG_PERROR; > } >- openlog(PACKAGE, log_opts, LOG_DAEMON); >+ if (!no_log) { >+ openlog(PACKAGE, log_opts, LOG_DAEMON); >+ } > > /* set up stdin, stdout, stderr to /dev/null */ > if (dup2(nullfd, STDIN_FILENO) != STDIN_FILENO) { >@@ -476,6 +485,9 @@ > #endif > acpid_log(int level, const char *fmt, ...) > { >+ if (no_log) { >+ return 0; >+ } > va_list args; > > va_start(args, fmt);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238934
: 222207