summaryrefslogtreecommitdiff
path: root/iwinfo_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'iwinfo_cli.c')
-rw-r--r--iwinfo_cli.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index 8691f31..456c67a 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -875,6 +875,16 @@ static void lookup_phy(const struct iwinfo_ops *iw, const char *section)
}
+static void lookup_path(const struct iwinfo_ops *iw, const char *phy)
+{
+ const char *path;
+
+ if (!iw->phy_path || iw->phy_path(phy, &path) || !path)
+ return;
+
+ printf("%s\n", path);
+}
+
int main(int argc, char **argv)
{
int i, rv = 0;
@@ -934,6 +944,10 @@ int main(int argc, char **argv)
}
else
{
+ if (!strcmp(argv[2], "path")) {
+ lookup_path(iw, argv[3]);
+ return 0;
+ }
switch (argv[2][0])
{
case 'p':