From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 4 13:20:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB6791065674; Tue, 4 Nov 2008 13:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 97DF88FC18; Tue, 4 Nov 2008 13:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mA4DK130024562; Tue, 4 Nov 2008 13:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mA4DK1SP024561; Tue, 4 Nov 2008 13:20:01 GMT (envelope-from gnats) Resent-Date: Tue, 4 Nov 2008 13:20:01 GMT Resent-Message-Id: <200811041320.mA4DK1SP024561@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Cc: sam@freebsd.org Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AFDD1065674 for ; Tue, 4 Nov 2008 13:16:26 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id EB8D58FC12 for ; Tue, 4 Nov 2008 13:16:25 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from amnesiac.at.no.dns (dns.ccsem.infn.it [192.135.15.3]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1KxLlg-000D6f-JW for FreeBSD-gnats-submit@freebsd.org; Tue, 04 Nov 2008 16:16:24 +0300 Received: by shadow.localdomain (Postfix, from userid 1001) id EC8E717112; Tue, 4 Nov 2008 16:16:23 +0300 (MSK) Message-Id: <20081104131623.EC8E717112@amnesiac.at.no.dns> Date: Tue, 4 Nov 2008 16:16:23 +0300 (MSK) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: sam@freebsd.org Cc: Subject: bin/128582: [patch] activate readline(3) support in wpa_cli X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2008 13:20:01 -0000 >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@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 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 --- 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 -- 1.6.0.3 --- patch-wpa_cli-readline-support ends here --- >Release-Note: >Audit-Trail: >Unformatted: