Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 211470 | Differences between
and this patch

Collapse All | Expand All

(-)acpid-1.0.6/acpid.8 (+3 lines)
Lines 91-96 Link Here
91
.TP
91
.TP
92
.BI \-h "\fR, \fP" \--help
92
.BI \-h "\fR, \fP" \--help
93
Show help and exit.
93
Show help and exit.
94
.TP
95
.BI \-q "\fR, \fP" \--quiet
96
Only log errors.
94
.SH EXAMPLE
97
.SH EXAMPLE
95
This example - placed in /etc/acpi/events/power - will shut down your system
98
This example - placed in /etc/acpi/events/power - will shut down your system
96
if you press the power button.
99
if you press the power button.
(-)acpid-1.0.6/acpid.c (-1 / +11 lines)
Lines 48-53 Link Here
48
48
49
/* global debug level */
49
/* global debug level */
50
int acpid_debug;
50
int acpid_debug;
51
int acpid_quiet = 0;
51
52
52
static const char *progname;
53
static const char *progname;
53
static const char *confdir = ACPI_CONFDIR;
54
static const char *confdir = ACPI_CONFDIR;
Lines 274-279 Link Here
274
		{"nosocket", 1, 0, 'S'},
275
		{"nosocket", 1, 0, 'S'},
275
		{"version", 0, 0, 'v'},
276
		{"version", 0, 0, 'v'},
276
		{"help", 0, 0, 'h'},
277
		{"help", 0, 0, 'h'},
278
		{"quiet", 0, 0, 'q'},
277
		{NULL, 0, 0, 0},
279
		{NULL, 0, 0, 0},
278
	};
280
	};
279
	const char *opts_help[] = {
281
	const char *opts_help[] = {
Lines 287-292 Link Here
287
		"Do not listen on a UNIX socket (overrides -s).",/* nosocket */
289
		"Do not listen on a UNIX socket (overrides -s).",/* nosocket */
288
		"Print version information.",		/* version */
290
		"Print version information.",		/* version */
289
		"Print this message.",			/* help */
291
		"Print this message.",			/* help */
292
		"Only log errors.",			/* quiet */
290
	};
293
	};
291
	struct option *opt;
294
	struct option *opt;
292
	const char **hlp;
295
	const char **hlp;
Lines 294-300 Link Here
294
297
295
	for (;;) {
298
	for (;;) {
296
		int i;
299
		int i;
297
		i = getopt_long(*argc, *argv, "c:de:fg:m:s:Svh", opts, NULL);
300
		i = getopt_long(*argc, *argv, "c:de:fg:m:s:Svhq", opts, NULL);
298
		if (i == -1) {
301
		if (i == -1) {
299
			break;
302
			break;
300
		}
303
		}
Lines 327-332 Link Here
327
		case 'v':
330
		case 'v':
328
			printf(PACKAGE "-" VERSION "\n");
331
			printf(PACKAGE "-" VERSION "\n");
329
			exit(EXIT_SUCCESS);
332
			exit(EXIT_SUCCESS);
333
		case 'q':
334
			acpid_quiet = 1;
335
			break;
330
		case 'h':
336
		case 'h':
331
		default:
337
		default:
332
			fprintf(stderr, "Usage: %s [OPTIONS]\n", progname);
338
			fprintf(stderr, "Usage: %s [OPTIONS]\n", progname);
Lines 452-457 Link Here
452
{
458
{
453
	va_list args;
459
	va_list args;
454
460
461
	/* Don't log info messages in quiet mode */
462
	if( acpid_quiet && level == LOG_INFO )
463
	    return;
464
455
	va_start(args, fmt);
465
	va_start(args, fmt);
456
	vsyslog(level, fmt, args);
466
	vsyslog(level, fmt, args);
457
	va_end(args);
467
	va_end(args);

Return to bug 211470