From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ns.lynxeye.de ([87.118.118.114] helo=lynxeye.de) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBh6p-0007nv-BS for barebox@lists.infradead.org; Fri, 07 Feb 2014 08:48:28 +0000 Received: from tellur.localdomain (p57B5E0F6.dip0.t-ipconnect.de [87.181.224.246]) by lynxeye.de (Postfix) with ESMTPA id BF8DB18B4261 for ; Fri, 7 Feb 2014 09:47:32 +0100 (CET) From: Lucas Stach Date: Fri, 7 Feb 2014 09:48:44 +0100 Message-Id: <1391762936-2747-3-git-send-email-dev@lynxeye.de> In-Reply-To: <1391762936-2747-1-git-send-email-dev@lynxeye.de> References: <1391762936-2747-1-git-send-email-dev@lynxeye.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 02/14] commands: edit: properly propagate error code To: barebox@lists.infradead.org Signed-off-by: Lucas Stach --- commands/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/edit.c b/commands/edit.c index 295d0a7..6b34101 100644 --- a/commands/edit.c +++ b/commands/edit.c @@ -266,7 +266,7 @@ static int save_file(const char *path) fd = open(path, O_WRONLY | O_TRUNC | O_CREAT); if (fd < 0) { printf("could not open file for writing: %s\n", errno_str()); - return -1; + return fd; } line = buffer; -- 1.8.5.3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox