From patchwork Tue Mar 7 22:22:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 660810 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E1BCC678D5 for ; Tue, 7 Mar 2023 22:23:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231674AbjCGWX1 (ORCPT ); Tue, 7 Mar 2023 17:23:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjCGWWz (ORCPT ); Tue, 7 Mar 2023 17:22:55 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BFBF15C81; Tue, 7 Mar 2023 14:22:44 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1678227761; bh=Q1jPkyZPjmkNR+Jyt/fGKq7/BIdQKHocnxXtbPXnLSw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lfM6gB7vpnbV7lLlqhIAQvjNfPPsozDIil7qCsXldnF7LPqqzcg+6k9gfyy8OVi5N F03kVXkRO5yyxxK6hYFAm0FXxCwRiP2KYL49r3PBOSQ6y4PAVju0czdw/bkWcUIjIG FFufZnn/jvclQ1YHa2ZChcz6uyZIkJS+s+qYARXk= Date: Tue, 07 Mar 2023 22:22:30 +0000 Subject: [PATCH RFC 1/5] tools/nolibc: add definitions for standard fds MIME-Version: 1.0 Message-Id: <20230223-nolibc-stackprotector-v1-1-3e74d81b3f21@weissschuh.net> References: <20230223-nolibc-stackprotector-v1-0-3e74d81b3f21@weissschuh.net> In-Reply-To: <20230223-nolibc-stackprotector-v1-0-3e74d81b3f21@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678227756; l=623; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Q1jPkyZPjmkNR+Jyt/fGKq7/BIdQKHocnxXtbPXnLSw=; b=k9sQ2zQo0NYNDTEvziF2PQIfuN0V6xMfb7Q1Mjy1kpxg7OsUccF2ZAZUmoqJ0+KzrfoAY2NzZ +mLkLpw/h3IAnWIF+tu2OHFTiVb2tr4DISmA/JJGeea/cY4teLpfhYk X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org These are useful for users and will also be used in an upcoming testcase. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/unistd.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/include/nolibc/unistd.h b/tools/include/nolibc/unistd.h index 1cfcd52106a4..ac7d53d986cd 100644 --- a/tools/include/nolibc/unistd.h +++ b/tools/include/nolibc/unistd.h @@ -13,6 +13,11 @@ #include "sys.h" +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 + + static __attribute__((unused)) int msleep(unsigned int msecs) {