bin/128582: [patch] activate readline(3) support in wpa_cli
Eygene Ryabinkin
rea-fbsd at codelabs.ru
Tue Nov 4 05:20:01 PST 2008
>Number: 128582
>Category: bin
>Synopsis: [patch] activate readline(3) support in wpa_cli
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 04 13:20:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Eygene Ryabinkin
>Release: FreeBSD 7.1-PRERELEASE amd64
>Organization:
Code Labs
>Environment:
System: FreeBSD XXX 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #13: Mon Nov 3 13:26:45 MSK 2008 root at XXX:/usr/obj/usr/src/sys/XXX amd64
>Description:
Currently wpa_cli(8) has no compiled-in readline support, although it
has this functionality inside the source code. It is very useful to
have command history, command editing and autocompletion in the
interactive mode.
>How-To-Repeat:
Spawn wpa_cli and try to push the arrow buttons. They will produce the
usual "garbage" instead of making the utility to crawl through the
command history.
>Fix:
The following patch activates readline support.
--- patch-wpa_cli-readline-support begins here ---
>From 360b30819549c7fb422de2995ba4eb3a8a68c81e Mon Sep 17 00:00:00 2001
From: Eygene Ryabinkin <rea-fbsd at codelabs.ru>
Date: Tue, 4 Nov 2008 16:00:51 +0300
The support is present since wpa_cli.c, rev. 1.1, but it was not turned
on. Since it is rather useful to have readline/history support for the
interactive mode, I am enabling this functionality.
Signed-off-by: Eygene Ryabinkin <rea-fbsd at codelabs.ru>
---
usr.sbin/wpa/wpa_cli/Makefile | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/usr.sbin/wpa/wpa_cli/Makefile b/usr.sbin/wpa/wpa_cli/Makefile
index 75c3c02..477ba3c 100644
--- a/usr.sbin/wpa/wpa_cli/Makefile
+++ b/usr.sbin/wpa/wpa_cli/Makefile
@@ -10,5 +10,9 @@ MAN= wpa_cli.8
CFLAGS+= -DCONFIG_CTRL_IFACE
CFLAGS+= -DCONFIG_CTRL_IFACE_UNIX
+CFLAGS+= -DCONFIG_READLINE
+
+DPADD+= ${LIBREADLINE}
+LDADD+= -lreadline
.include <bsd.prog.mk>
--
1.6.0.3
--- patch-wpa_cli-readline-support ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list