From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.savoirfairelinux.com ([208.88.110.44]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dfIO5-0000pQ-QL for barebox@lists.infradead.org; Wed, 09 Aug 2017 04:14:35 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id C3B669C292B for ; Wed, 9 Aug 2017 00:13:23 -0400 (EDT) From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= Date: Wed, 9 Aug 2017 00:13:19 -0400 Message-Id: <20170809041320.28874-2-gael.portay@savoirfairelinux.com> In-Reply-To: <20170809041320.28874-1-gael.portay@savoirfairelinux.com> References: <20170809041320.28874-1-gael.portay@savoirfairelinux.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 1/2] readline_simple: return -1 if getc fails To: barebox@lists.infradead.org Cc: =?utf-8?q?Ga=C3=ABl=20PORTAY?= VGhlIGdldGMgZnVuY3Rpb24gbWF5IHJldHVybiBhbiBlcnJubyBjb2RlIGlmIGFuIGVycm9yIGhh cHBlbnMuCgpUaGlzIHBhdGNoIHByZXZlbnRzIHJlYWRsaW5lIGZyb20gcHJpbnRpbmcgYSBub24g cHJpbnRhYmxlIGNoYXJhY3RlciBhbmQKZnJvbSBsb29waW5nIHRvIGluZmluaXR5IGFuZCBiZXlv bmcuCgpTaWduZWQtb2ZmLWJ5OiBHYcOrbCBQT1JUQVkgPGdhZWwucG9ydGF5QHNhdm9pcmZhaXJl bGludXguY29tPgotLS0KIGxpYi9yZWFkbGluZV9zaW1wbGUuYyB8IDYgKysrKystCiAxIGZpbGUg Y2hhbmdlZCwgNSBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0pC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