From 26777aa1c659b229f07205291241e45e64712a72 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 22 Nov 2010 23:49:10 +0100 Subject: fixes for bugs discovered by randomconfig builds and tests Signed-off-by: Denys Vlasenko --- util-linux/acpid.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'util-linux/acpid.c') diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 0b227a8ae..ce4c98ebe 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c @@ -16,9 +16,9 @@ enum { OPT_e = (1 << 2), OPT_f = (1 << 3), OPT_l = (1 << 4), - OPT_p = (1 << 5) * ENABLE_FEATURE_PIDFILE, - OPT_a = (1 << 6), - OPT_M = (1 << 7), + OPT_a = (1 << 5), + OPT_M = (1 << 6), + OPT_p = (1 << 7) * ENABLE_FEATURE_PIDFILE, }; struct acpi_event { @@ -199,8 +199,9 @@ int acpid_main(int argc UNUSED_PARAM, char **argv) INIT_G(); opt_complementary = "df:e--e"; - opts = getopt32(argv, "c:de:fl:p:a:M:" IF_FEATURE_ACPID_COMPAT("g:m:s:S:v"), - &opt_dir, &opt_input, &opt_logfile, &opt_pidfile, &opt_action, &opt_map + opts = getopt32(argv, "c:de:fl:a:M:" IF_FEATURE_PIDFILE("p:") IF_FEATURE_ACPID_COMPAT("g:m:s:S:v"), + &opt_dir, &opt_input, &opt_logfile, &opt_action, &opt_map + IF_FEATURE_PIDFILE(, &opt_pidfile) IF_FEATURE_ACPID_COMPAT(, NULL, NULL, NULL, NULL) ); -- cgit v1.2.3