rfkill: make command to build in util-linux project

After this commit the command merely builds, but does not confirm style used
in util-linux project.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pull/501/merge
Sami Kerola 6 years ago
parent e69263c03b
commit c0d78c90be
No known key found for this signature in database
GPG Key ID: A9553245FDE9B739
  1. 1
      .gitignore
  2. 3
      configure.ac
  3. 6
      sys-utils/Makemodule.am
  4. 11
      sys-utils/rfkill.c

1
.gitignore vendored

@ -140,6 +140,7 @@ ylwrap
/renice
/resizepart
/rev
/rfkill
/rtcwake
/runuser
/sample-*

@ -1617,6 +1617,9 @@ AM_CONDITIONAL([BUILD_LSNS], [test "x$build_lsns" = xyes])
UL_BUILD_INIT([renice], [yes])
AM_CONDITIONAL([BUILD_RENICE], [test "x$build_renice" = xyes])
UL_BUILD_INIT([rfkill], [yes])
AM_CONDITIONAL([BUILD_RFKILL], [test "x$build_rfkill" = xyes])
UL_BUILD_INIT([setsid], [yes])
AM_CONDITIONAL([BUILD_SETSID], [test "x$build_setsid" = xyes])

@ -59,6 +59,12 @@ dist_man_MANS += sys-utils/renice.1
renice_SOURCES = sys-utils/renice.c
endif
if BUILD_RFKILL
usrbin_exec_PROGRAMS += rfkill
dist_man_MANS += sys-utils/rfkill.8
rfkill_SOURCES = sys-utils/rfkill.c
endif
if BUILD_SETSID
usrbin_exec_PROGRAMS += setsid
dist_man_MANS += sys-utils/setsid.1

@ -30,8 +30,11 @@
#include <sys/poll.h>
#include <sys/time.h>
#include "rfkill.h"
#include "core.h"
#include <linux/rfkill.h>
#include "c.h"
#include "closestream.h"
#include "nls.h"
static void rfkill_event(void)
{
@ -313,7 +316,7 @@ static void usage(void)
fprintf(stderr, "Usage:\t%s [options] command\n", argv0);
fprintf(stderr, "Options:\n");
fprintf(stderr, "\t--version\tshow version (%s)\n", rfkill_version);
fprintf(stderr, "\t--version\tshow version (%s)\n", PACKAGE_VERSION);
fprintf(stderr, "Commands:\n");
fprintf(stderr, "\thelp\n");
fprintf(stderr, "\tevent\n");
@ -329,7 +332,7 @@ static void usage(void)
static void version(void)
{
printf("rfkill %s\n", rfkill_version);
printf("rfkill %s\n", PACKAGE_VERSION);
}
int main(int argc, char **argv)

Loading…
Cancel
Save