diff options
author | Johannes Berg | 2009-05-28 11:39:20 +0200 |
---|---|---|
committer | Johannes Berg | 2009-05-28 11:39:20 +0200 |
commit | d5fad6ebc22e9ecf76d97b18292424ef1df90907 (patch) | |
tree | ed161cb6194760c23cc3efbe7552f4eaf11a1d32 /rfkill.c | |
download | kernel-qcow2-util-linux-d5fad6ebc22e9ecf76d97b18292424ef1df90907.tar.gz kernel-qcow2-util-linux-d5fad6ebc22e9ecf76d97b18292424ef1df90907.tar.xz kernel-qcow2-util-linux-d5fad6ebc22e9ecf76d97b18292424ef1df90907.zip |
init rfkill basic code
Diffstat (limited to 'rfkill.c')
-rw-r--r-- | rfkill.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/rfkill.c b/rfkill.c new file mode 100644 index 000000000..221074ff3 --- /dev/null +++ b/rfkill.c @@ -0,0 +1,33 @@ +/* + * rfkill userspace tool + * + * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> + */ + +#include <errno.h> +#include <stdio.h> +#include <string.h> +#include <net/if.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +#include <stdbool.h> + +#include "rfkill.h" +#include "core.h" + +static void version(void) +{ + printf("rfkill %s\n", rfkill_version); +} + +int main(int argc, char **argv) +{ + if (argc > 0 && strcmp(*argv, "--version") == 0) { + version(); + return 0; + } + + return 0; +} |