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>
This commit is contained in:
parent
e69263c03b
commit
c0d78c90be
|
@ -140,6 +140,7 @@ ylwrap
|
||||||
/renice
|
/renice
|
||||||
/resizepart
|
/resizepart
|
||||||
/rev
|
/rev
|
||||||
|
/rfkill
|
||||||
/rtcwake
|
/rtcwake
|
||||||
/runuser
|
/runuser
|
||||||
/sample-*
|
/sample-*
|
||||||
|
|
|
@ -1617,6 +1617,9 @@ AM_CONDITIONAL([BUILD_LSNS], [test "x$build_lsns" = xyes])
|
||||||
UL_BUILD_INIT([renice], [yes])
|
UL_BUILD_INIT([renice], [yes])
|
||||||
AM_CONDITIONAL([BUILD_RENICE], [test "x$build_renice" = xyes])
|
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])
|
UL_BUILD_INIT([setsid], [yes])
|
||||||
AM_CONDITIONAL([BUILD_SETSID], [test "x$build_setsid" = xyes])
|
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
|
renice_SOURCES = sys-utils/renice.c
|
||||||
endif
|
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
|
if BUILD_SETSID
|
||||||
usrbin_exec_PROGRAMS += setsid
|
usrbin_exec_PROGRAMS += setsid
|
||||||
dist_man_MANS += sys-utils/setsid.1
|
dist_man_MANS += sys-utils/setsid.1
|
||||||
|
|
|
@ -30,8 +30,11 @@
|
||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include "rfkill.h"
|
#include <linux/rfkill.h>
|
||||||
#include "core.h"
|
|
||||||
|
#include "c.h"
|
||||||
|
#include "closestream.h"
|
||||||
|
#include "nls.h"
|
||||||
|
|
||||||
static void rfkill_event(void)
|
static void rfkill_event(void)
|
||||||
{
|
{
|
||||||
|
@ -313,7 +316,7 @@ static void usage(void)
|
||||||
|
|
||||||
fprintf(stderr, "Usage:\t%s [options] command\n", argv0);
|
fprintf(stderr, "Usage:\t%s [options] command\n", argv0);
|
||||||
fprintf(stderr, "Options:\n");
|
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, "Commands:\n");
|
||||||
fprintf(stderr, "\thelp\n");
|
fprintf(stderr, "\thelp\n");
|
||||||
fprintf(stderr, "\tevent\n");
|
fprintf(stderr, "\tevent\n");
|
||||||
|
@ -329,7 +332,7 @@ static void usage(void)
|
||||||
|
|
||||||
static void version(void)
|
static void version(void)
|
||||||
{
|
{
|
||||||
printf("rfkill %s\n", rfkill_version);
|
printf("rfkill %s\n", PACKAGE_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
|
Loading…
Reference in New Issue