summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorSami Kerola2017-06-24 21:19:26 +0200
committerSami Kerola2017-08-30 21:32:48 +0200
commitc0d78c90be3628a23d44da9f6cf8e29a6884fe02 (patch)
treed8c941facbad7f5132c44306bd679d0c70965514 /sys-utils
parentrfkill: move files to appropriate locations (diff)
downloadkernel-qcow2-util-linux-c0d78c90be3628a23d44da9f6cf8e29a6884fe02.tar.gz
kernel-qcow2-util-linux-c0d78c90be3628a23d44da9f6cf8e29a6884fe02.tar.xz
kernel-qcow2-util-linux-c0d78c90be3628a23d44da9f6cf8e29a6884fe02.zip
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>
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/Makemodule.am6
-rw-r--r--sys-utils/rfkill.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am
index 66b540874..2148fd91e 100644
--- a/sys-utils/Makemodule.am
+++ b/sys-utils/Makemodule.am
@@ -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
diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c
index 60f8cdc27..ad2af36ea 100644
--- a/sys-utils/rfkill.c
+++ b/sys-utils/rfkill.c
@@ -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)