All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v2 5/6] client: fix station autocomplete with multiple phys
Date: Thu, 11 Aug 2022 10:58:59 -0700	[thread overview]
Message-ID: <20220811175900.443310-5-prestwoj@gmail.com> (raw)
In-Reply-To: <20220811175900.443310-1-prestwoj@gmail.com>

The limitations of readline required that the autocompletion choose
a 'default' device. With multiple phys this doesn't work. Now the
readline limitation has been worked around and station can look up
the device for the command completion.
---
 client/station.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/client/station.c b/client/station.c
index 90291c88..b070807b 100644
--- a/client/station.c
+++ b/client/station.c
@@ -280,7 +280,8 @@ static enum cmd_status cmd_list(const char *device_name, char **argv, int argc)
 static char *connect_cmd_arg_completion(const char *text, int state,
 					const char *device_name)
 {
-	const struct proxy_interface *device = device_get_default();
+	const struct proxy_interface *device = device_proxy_find(device_name,
+							IWD_STATION_INTERFACE);
 
 	if (!device)
 		return NULL;
-- 
2.34.3


  parent reply	other threads:[~2022-08-11 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 17:58 [PATCH v2 1/6] doc: add documentation for StationDebug James Prestwood
2022-08-11 17:58 ` [PATCH v2 2/6] station: add debug method GetNetworks James Prestwood
2022-08-11 17:58 ` [PATCH v2 3/6] client: allow entity name to be passed to completion James Prestwood
2022-08-11 17:58 ` [PATCH v2 4/6] client: add station-debug command interface James Prestwood
2022-08-11 17:58 ` James Prestwood [this message]
2022-08-11 17:59 ` [PATCH v2 6/6] device: command: remove default device concept James Prestwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220811175900.443310-5-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.