From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by sourceware.org (Postfix) with ESMTPS id 23D843858400 for ; Wed, 19 Oct 2022 22:14:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 23D843858400 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1326637be6eso22369748fac.13 for ; Wed, 19 Oct 2022 15:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=40CVLB+eXEIWG4vaLsKJ4S6N2Q+d1kOvrVWRLD1vU+I=; b=f1nfz2JEnTtaMKios8C7hP/jDxRxayw8yHutJ/7NMkk2tniEBWfSZ3+5xWA8v7XVxX OKD7NCilssv/2OnMThhJWIblACBD34/8oFylgaIxQ+TTMZODAX4Jkj9y3wz38xGt2sEb LK6QKl7Lpx0/FFwjQcYg7VxcYXtTnXcahyT8++XyGAVgmG821q6YBoFhwsOroBlI2TTC TYNqgykt2U2H9ViB3qZsRNLrqYzsi6n7AzGWkpiYSLnAH/kerNGN5dYvoqEQ9stIjdm1 hmRIZ/c6LkcUP7ylKKO2ru6smctenWSFjqUfujR7VtIVTeku8J4RO9cb23SwSa1BGRnB k5Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=40CVLB+eXEIWG4vaLsKJ4S6N2Q+d1kOvrVWRLD1vU+I=; b=m5jWEaHP6J2zJbn35+5R04DnEIJuYN/sIwYx3MiX7mD7YCM46SfN83SBFNGPtSuY0v gOimKauIYekOpVFZhvMnyKLm+/my+YJptfzCrPdqMGw1PVNxCOr8BZT2hGi9lFLuz/he Vim4mt6VHgdNgjnTLbYqvtdC0mxNp/f+d+43Ib/6dFZM1opBVQoFr2v/Ay/syShz+315 o54q6DEUCb7eycapbVaibvC9lOYvvHOi6s/8yJ82I9s3hfIrctfA61AwMtxJKIpo7mGq jotybwCgo9xG8XWG7+mV/ZN6f50r/oSTAs2pYiyvJGowqNtALi7/f1EAufH/4ao7Hn3G CZNw== X-Gm-Message-State: ACrzQf3Fq/4I7lU0UPmqewpAREmzDvy5mAzluzOpTQLoiYPD6tg1PrrI qtO/1G3skUJ7fH2DxH/GuYcaddUuRHTlmCEo X-Google-Smtp-Source: AMsMyM6FLc1vOVDA7W9DkmBT24CpOY/7NGBrab7YlZXLW1HRYtXgGSM6uuP4WsJ3SAtGR1ASm+SO9w== X-Received: by 2002:a05:6871:9f:b0:131:52e5:fe7b with SMTP id u31-20020a056871009f00b0013152e5fe7bmr6427491oaa.80.1666217687162; Wed, 19 Oct 2022 15:14:47 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:7d19:f1c1:9fb4:472a:ab68]) by smtp.gmail.com with ESMTPSA id m9-20020aca5809000000b00353fe4fb4casm7137927oib.48.2022.10.19.15.14.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 15:14:46 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 07/30] Linux: consolidate inotify_init implementation Date: Wed, 19 Oct 2022 19:14:10 -0300 Message-Id: <20221019221433.1082017-8-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221019221433.1082017-1-adhemerval.zanella@linaro.org> References: <20221019221433.1082017-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Use inotify_init syscall if defined, otherwise use inotify_init1. --- sysdeps/unix/sysv/linux/{generic => }/inotify_init.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) rename sysdeps/unix/sysv/linux/{generic => }/inotify_init.c (78%) diff --git a/sysdeps/unix/sysv/linux/generic/inotify_init.c b/sysdeps/unix/sysv/linux/inotify_init.c similarity index 78% rename from sysdeps/unix/sysv/linux/generic/inotify_init.c rename to sysdeps/unix/sysv/linux/inotify_init.c index 3297ebc705..4da5b723a6 100644 --- a/sysdeps/unix/sysv/linux/generic/inotify_init.c +++ b/sysdeps/unix/sysv/linux/inotify_init.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2011-2022 Free Software Foundation, Inc. +/* Initialize an inotify instance. Linux version. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +24,10 @@ libc_hidden_proto (inotify_init) int inotify_init (void) { - return INLINE_SYSCALL (inotify_init1, 1, 0); +#ifdef __NR_inotify_init + return INLINE_SYSCALL_CALL (inotify_init); +#else + return INLINE_SYSCALL_CALL (inotify_init1, 0); +#endif } libc_hidden_def (inotify_init) -- 2.34.1