linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Changbin Du <changbin.du@gmail.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	"Sasha Levin (Microsoft)" <sashal@kernel.org>
Subject: [PATCH 5.0 096/101] kconfig/[mn]conf: handle backspace (^H) key
Date: Thu,  2 May 2019 17:21:38 +0200	[thread overview]
Message-ID: <20190502143346.293306876@linuxfoundation.org> (raw)
In-Reply-To: <20190502143339.434882399@linuxfoundation.org>

[ Upstream commit 9c38f1f044080392603c497ecca4d7d09876ff99 ]

Backspace is not working on some terminal emulators which do not send the
key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127).
But currently only '^?' is handled. Let's also handle '^H' for those
terminals.

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
---
 scripts/kconfig/lxdialog/inputbox.c | 3 ++-
 scripts/kconfig/nconf.c             | 2 +-
 scripts/kconfig/nconf.gui.c         | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
index 611945611bf8..1dcfb288ee63 100644
--- a/scripts/kconfig/lxdialog/inputbox.c
+++ b/scripts/kconfig/lxdialog/inputbox.c
@@ -113,7 +113,8 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width
 			case KEY_DOWN:
 				break;
 			case KEY_BACKSPACE:
-			case 127:
+			case 8:   /* ^H */
+			case 127: /* ^? */
 				if (pos) {
 					wattrset(dialog, dlg.inputbox.atr);
 					if (input_x == 0) {
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index a4670f4e825a..ac92c0ded6c5 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -1048,7 +1048,7 @@ static int do_match(int key, struct match_state *state, int *ans)
 		state->match_direction = FIND_NEXT_MATCH_UP;
 		*ans = get_mext_match(state->pattern,
 				state->match_direction);
-	} else if (key == KEY_BACKSPACE || key == 127) {
+	} else if (key == KEY_BACKSPACE || key == 8 || key == 127) {
 		state->pattern[strlen(state->pattern)-1] = '\0';
 		adj_match_dir(&state->match_direction);
 	} else
diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
index 7be620a1fcdb..77f525a8617c 100644
--- a/scripts/kconfig/nconf.gui.c
+++ b/scripts/kconfig/nconf.gui.c
@@ -439,7 +439,8 @@ int dialog_inputbox(WINDOW *main_window,
 		case KEY_F(F_EXIT):
 		case KEY_F(F_BACK):
 			break;
-		case 127:
+		case 8:   /* ^H */
+		case 127: /* ^? */
 		case KEY_BACKSPACE:
 			if (cursor_position > 0) {
 				memmove(&result[cursor_position-1],
-- 
2.19.1




  parent reply	other threads:[~2019-05-02 15:32 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 15:20 [PATCH 5.0 000/101] 5.0.12-stable review Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 001/101] selinux: use kernel linux/socket.h for genheaders and mdp Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 002/101] Revert "ACPICA: Clear status of GPEs before enabling them" Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 003/101] drm/i915: Do not enable FEC without DSC Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 004/101] mm: make page ref count overflow check tighter and more explicit Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 005/101] mm: add try_get_page() helper function Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 006/101] mm: prevent get_user_pages() from overflowing page refcount Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 007/101] fs: prevent page refcount overflow in pipe_buf_get Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 008/101] arm64: dts: renesas: r8a77990: Fix SCIF5 DMA channels Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 009/101] ARM: dts: bcm283x: Fix hdmi hpd gpio pull Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 010/101] s390: limit brk randomization to 32MB Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 011/101] mt76x02: fix hdr pointer in write txwi for USB Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 012/101] mt76: mt76x2: fix external LNA gain settings Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 013/101] mt76: mt76x2: fix 2.4 GHz channel " Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 014/101] net: ieee802154: fix a potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 015/101] ieee802154: hwsim: propagate genlmsg_reply return code Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 016/101] Btrfs: fix file corruption after snapshotting due to mix of buffered/DIO writes Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 017/101] net: stmmac: dont set own bit too early for jumbo frames Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 018/101] net: stmmac: fix jumbo frame sending with non-linear skbs Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 019/101] qlcnic: Avoid potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 020/101] xsk: fix umem memory leak on cleanup Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 021/101] staging: axis-fifo: add CONFIG_OF dependency Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 022/101] staging, mt7621-pci: fix build without pci support Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 023/101] netfilter: nft_set_rbtree: check for inactive element after flag mismatch Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 024/101] netfilter: bridge: set skb transport_header before entering NF_INET_PRE_ROUTING Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 025/101] netfilter: fix NETFILTER_XT_TARGET_TEE dependencies Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 026/101] netfilter: ip6t_srh: fix NULL pointer dereferences Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 027/101] s390/qeth: fix race when initializing the IP address table Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 028/101] ARM: imx51: fix a leaked reference by adding missing of_node_put Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 029/101] sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init() Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 030/101] serial: ar933x_uart: Fix build failure with disabled console Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 031/101] KVM: arm64: Reset the PMU in preemptible context Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 032/101] arm64: KVM: Always set ICH_HCR_EL2.EN if GICv4 is enabled Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 033/101] KVM: arm/arm64: vgic-its: Take the srcu lock when writing to guest memory Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 034/101] KVM: arm/arm64: vgic-its: Take the srcu lock when parsing the memslots Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 035/101] usb: dwc3: pci: add support for Comet Lake PCH ID Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 036/101] usb: gadget: net2280: Fix overrun of OUT messages Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 037/101] usb: gadget: net2280: Fix net2280_dequeue() Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 038/101] usb: gadget: net2272: Fix net2272_dequeue() Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 039/101] ARM: dts: pfla02: increase phy reset duration Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 040/101] i2c: i801: Add support for Intel Comet Lake Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 041/101] KVM: arm/arm64: Fix handling of stage2 huge mappings Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 042/101] net: ks8851: Dequeue RX packets explicitly Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 043/101] net: ks8851: Reassert reset pin if chip ID check fails Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 044/101] net: ks8851: Delay requesting IRQ until opened Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 045/101] net: ks8851: Set initial carrier state to down Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 046/101] staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 047/101] staging: rtlwifi: rtl8822b: fix to avoid potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 048/101] staging: rtl8712: uninitialized memory in read_bbreg_hdl() Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 049/101] staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 050/101] net: phy: Add DP83825I to the DP83822 driver Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 051/101] net: macb: Add null check for PCLK and HCLK Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 052/101] net/sched: dont dereference a->goto_chain to read the chain index Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 053/101] ARM: dts: imx6qdl: Fix typo in imx6qdl-icore-rqs.dtsi Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 054/101] drm/tegra: hub: Fix dereference before check Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 055/101] NFS: Fix a typo in nfs_init_timeout_values() Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 056/101] net: xilinx: fix possible object reference leak Greg Kroah-Hartman
2019-05-02 15:20 ` [PATCH 5.0 057/101] net: ibm: " Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 058/101] net: ethernet: ti: " Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 059/101] drm: Fix drm_release() and device unplug Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 060/101] gpio: aspeed: fix a potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 061/101] drm/meson: Fix invalid pointer in meson_drv_unbind() Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 062/101] drm/meson: Uninstall IRQ handler Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 063/101] ARM: davinci: fix build failure with allnoconfig Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 064/101] sbitmap: order READ/WRITE freed instance and setting clear bit Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 065/101] staging: vc04_services: Fix an error code in vchiq_probe() Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 066/101] scsi: mpt3sas: Fix kernel panic during expander reset Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 067/101] scsi: aacraid: Insure we dont access PCIe space during AER/EEH Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 068/101] scsi: qla4xxx: fix a potential NULL pointer dereference Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 069/101] usb: usb251xb: fix to avoid " Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 070/101] leds: trigger: netdev: fix refcnt leak on interface rename Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 071/101] SUNRPC: fix uninitialized variable warning Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 072/101] x86/realmode: Dont leak the trampoline kernel address Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 073/101] usb: u132-hcd: fix resource leak Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 074/101] ceph: fix use-after-free on symlink traversal Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 075/101] scsi: zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 076/101] x86/mm: Dont exceed the valid physical address space Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 077/101] libata: fix using DMA buffers on stack Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 078/101] kbuild: skip parsing pre sub-make code for recursion Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 079/101] afs: Fix StoreData op marshalling Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 080/101] gpio: of: Check propname before applying "cs-gpios" quirks Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 081/101] gpio: of: Check for "spi-cs-high" in child instead of parent node Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 082/101] KVM: nVMX: Do not inherit quadrant and invalid for the root shadow EPT Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 083/101] KVM: SVM: Workaround errata#1096 (insn_len maybe zero on SMAP violation) Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 084/101] kvm/x86: Move MSR_IA32_ARCH_CAPABILITIES to array emulated_msrs Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 085/101] x86/kvm/hyper-v: avoid spurious pending stimer on vCPU init Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 086/101] KVM: selftests: assert on exit reason in CR4/cpuid sync test Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 087/101] KVM: selftests: explicitly disable PIE for tests Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 088/101] KVM: selftests: disable stack protector for all KVM tests Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 089/101] KVM: selftests: complete IO before migrating guest state Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 090/101] gpio: of: Fix of_gpiochip_add() error path Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 091/101] nvme-multipath: relax ANA state check Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 092/101] nvmet: fix building bvec from sg list Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 093/101] nvmet: fix error flow during ns enable Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 094/101] perf cs-etm: Add missing case value Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 095/101] perf machine: Update kernel map address and re-order properly Greg Kroah-Hartman
2019-05-02 15:21 ` Greg Kroah-Hartman [this message]
2019-05-02 15:21 ` [PATCH 5.0 097/101] iommu/amd: Reserve exclusion range in iova-domain Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 098/101] kasan: fix variable tag set but not used warning Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 099/101] ptrace: take into account saved_sigmask in PTRACE{GET,SET}SIGMASK Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 100/101] leds: pca9532: fix a potential NULL pointer dereference Greg Kroah-Hartman
2019-05-06  8:21   ` Geert Uytterhoeven
2019-05-06  8:34     ` Greg Kroah-Hartman
2019-05-02 15:21 ` [PATCH 5.0 101/101] leds: trigger: netdev: use memcpy in device_name_store Greg Kroah-Hartman
2019-05-02 19:46 ` [PATCH 5.0 000/101] 5.0.12-stable review kernelci.org bot
2019-05-03  6:49 ` Naresh Kamboju
2019-05-03  7:32   ` Greg Kroah-Hartman
2019-05-03  9:27 ` Jon Hunter
2019-05-04  6:47   ` Greg Kroah-Hartman
2019-05-03 17:16 ` Guenter Roeck
2019-05-04  6:47   ` Greg Kroah-Hartman
2019-05-03 21:19 ` shuah
2019-05-04  6:46   ` Greg Kroah-Hartman
2019-05-04  1:28 ` Kelsey Skunberg
2019-05-04  6:47   ` Greg Kroah-Hartman

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=20190502143346.293306876@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=changbin.du@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).