summaryrefslogtreecommitdiffstats
path: root/rfkill.c
diff options
context:
space:
mode:
authorDarren Salt2010-01-25 23:33:30 +0100
committerJohannes Berg2010-01-26 07:40:00 +0100
commit47eaa8708a95298a6ed8b2ce147a2fd2eeb1eaac (patch)
treef90a74404ecdfe6727480fec6fab7bca3e8b03c9 /rfkill.c
parentTweak version handling to allow vendor-specific suffixes without patching. (diff)
downloadkernel-qcow2-util-linux-47eaa8708a95298a6ed8b2ce147a2fd2eeb1eaac.tar.gz
kernel-qcow2-util-linux-47eaa8708a95298a6ed8b2ce147a2fd2eeb1eaac.tar.xz
kernel-qcow2-util-linux-47eaa8708a95298a6ed8b2ce147a2fd2eeb1eaac.zip
Help text: output rfkill type names from an array instead of a static string.
Diffstat (limited to 'rfkill.c')
-rw-r--r--rfkill.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/rfkill.c b/rfkill.c
index 8fa4c6a0e..bda649a97 100644
--- a/rfkill.c
+++ b/rfkill.c
@@ -291,6 +291,8 @@ static const char *argv0;
static void usage(void)
{
+ const struct rfkill_type_str *p;
+
fprintf(stderr, "Usage:\t%s [options] command\n", argv0);
fprintf(stderr, "Options:\n");
fprintf(stderr, "\t--version\tshow version (%s)\n", rfkill_version);
@@ -301,7 +303,10 @@ static void usage(void)
fprintf(stderr, "\tblock IDENTIFIER\n");
fprintf(stderr, "\tunblock IDENTIFIER\n");
fprintf(stderr, "where IDENTIFIER is the index no. of an rfkill switch or one of:\n");
- fprintf(stderr, "\t<idx> all wifi wlan bluetooth uwb ultrawideband wimax wwan gps\n");
+ fprintf(stderr, "\t<idx>");
+ for (p = rfkill_type_strings; p->name != NULL; p++)
+ fprintf(stderr, " %s", p->name);
+ fprintf(stderr, "\n");
}
static void version(void)