From patchwork Sat Mar 4 14:28:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Willy Tarreau X-Patchwork-Id: 64239 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp951461wrd; Sat, 4 Mar 2023 06:40:03 -0800 (PST) X-Google-Smtp-Source: AK7set9bKGtNcXw6QXYQeM2nImrDzd/fFzUxybTQ4L1ADuaEpDtQ4Hm0ps69h3oTGjl7lmKG+5XE X-Received: by 2002:aa7:968b:0:b0:593:befd:848c with SMTP id f11-20020aa7968b000000b00593befd848cmr4951384pfk.16.1677940803654; Sat, 04 Mar 2023 06:40:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677940803; cv=none; d=google.com; s=arc-20160816; b=raYEJ2niRRnPLfHmOMPpYXGnqsfO7IWlRxthdAFEWmiPKgEiYY1UIp9FsfFF8w237x 9RQrJZl1PTZ/GUaJr8T8K62k4S3Sf7mjdlolZzJQFsrkJ8YU+M6FR8RaCVc8hUr1ILst J+lBFa0TjyP2v5wN7ppv93yX00pxD43o8Q5eUZgl89BHMibrEFlYUuP/DS/pW0c/AFKM sXklrerFEECM+yUBlyUfqLjDoRZDRF+kox8TapQPNVvAxEc6o4Vlk6x2d+h/UsaJMTRL s13wdtkHwDhcrUqyWeA6vwryhn0at6efcac5/r6dmFrO7lhKONY62sWCuoCl8MnE94cP y2Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=meo0iwrx+m9UT+AYjrntvwDYGRkt65+iepAmQ1hhsBI=; b=A02y14NpojRX38oWGvDyYLfbFTJixlk4wfIICr8fzBXyLCE5KwAbIV+pMm5fT6x79f BnaAXa8yg99mi0tjtkIV+Qmv7z3lSsE4PHvB5JIQfVAmLyj00BZAPx/4rU50nWkGIa+U 73rmsW0c5fs4VDHSLU/MYvVy4Yql1/jXeAj/7lSipniLdnB+iFbW2Fudp1kM81E+Fa9l qUSvafqPedOIIHrRz/aX0r728uVxJwlM9plpZ5Ato86dHEplC6acZKx5ydo6dL6tL2nx QPJywdElJRms/fGTqrkLAns9qNkA8WKS1FNKSzp+27nu2PmNuwtBlxqCzooAxCg7aBR1 decg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a625e03000000b005a8f2051fd3si4609089pfb.230.2023.03.04.06.39.50; Sat, 04 Mar 2023 06:40:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229673AbjCDO3O (ORCPT + 99 others); Sat, 4 Mar 2023 09:29:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjCDO3F (ORCPT ); Sat, 4 Mar 2023 09:29:05 -0500 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5101293E7 for ; Sat, 4 Mar 2023 06:29:04 -0800 (PST) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 324ESuTI006573; Sat, 4 Mar 2023 15:28:56 +0100 From: Willy Tarreau To: paulmck@kernel.org Cc: chenhuacai@loongson.cn, chenfeiyang@loongson.cn, linux-kernel@vger.kernel.org, Willy Tarreau Subject: [PATCH 4/5] tools/nolibc: Include linux/fcntl.h and remove duplicate code Date: Sat, 4 Mar 2023 15:28:43 +0100 Message-Id: <20230304142844.6522-5-w@1wt.eu> X-Mailer: git-send-email 2.17.5 In-Reply-To: <20230304142844.6522-1-w@1wt.eu> References: <20230304142844.6522-1-w@1wt.eu> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759448456383138502?= X-GMAIL-MSGID: =?utf-8?q?1759448456383138502?= From: Feiyang Chen Include linux/fcntl.h for O_* and AT_*. asm/fcntl.h is included by linux/fcntl.h, so it can be safely removed. Signed-off-by: Feiyang Chen Acked-by: Huacai Chen Signed-off-by: Willy Tarreau --- tools/include/nolibc/sys.h | 2 +- tools/include/nolibc/types.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 115579e7f1db..41cad6d6137e 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -11,7 +11,6 @@ #include "std.h" /* system includes */ -#include // for O_* #include #include // for SIGCHLD #include @@ -20,6 +19,7 @@ #include #include #include +#include // for O_* and AT_* #include "arch.h" #include "errno.h" diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h index 47a0997d2d74..10823e5ac44b 100644 --- a/tools/include/nolibc/types.h +++ b/tools/include/nolibc/types.h @@ -81,11 +81,6 @@ #define MAXPATHLEN (PATH_MAX) #endif -/* Special FD used by all the *at functions */ -#ifndef AT_FDCWD -#define AT_FDCWD (-100) -#endif - /* whence values for lseek() */ #define SEEK_SET 0 #define SEEK_CUR 1