From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CDB151F601 for ; Mon, 5 Dec 2022 16:42:13 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ikhs6QbP"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 10E823954C59 for ; Mon, 5 Dec 2022 16:42:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10E823954C59 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670258533; bh=cA7erPsAIuWPqmRasQOnoRHnXQOVwMqC+0l8pBIPM6U=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ikhs6QbPo0fKSQckMXqeq9lXU3EFmsyz46XQk3qXcGJvOH4GFuZHQXS+i6b8P+3A1 +lFI0Ww0k3ChgwdSHHoTMOipLzaxL4G4lRH/XpjKo6WLYCtvTXYiWwJ4uDK1MlItJX WzQs75SrS7ZctrWzbXEFyhVOrXlKrjdOJ4sfkm5Y= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 160E53940CDD for ; Mon, 5 Dec 2022 16:40:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 160E53940CDD Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-478-ybubwGm4OlS6AjF2enKrwg-1; Mon, 05 Dec 2022 11:40:00 -0500 X-MC-Unique: ybubwGm4OlS6AjF2enKrwg-1 Received: by mail-io1-f72.google.com with SMTP id b9-20020a056602218900b006dfecfefcfbso6632909iob.13 for ; Mon, 05 Dec 2022 08:40:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cA7erPsAIuWPqmRasQOnoRHnXQOVwMqC+0l8pBIPM6U=; b=G0STQ4W11/MtOGFZ05eTTgTrew+vYCwlI4IgrJ+/vh0JyKhxcT+vVBPYyLhZAzilm9 7ljVK0P18FoN9MJo2Fv72VBBfrUpHRlLmDZ61vZncwNNphNjw0vr0QfeTZ/7Ri/2OQeE sWEuuxtx4r96RIam+r8xBSvPkdjxaKkYH3j/nTHQ41De8YwrUAOJfvUbNb4sp9ehUkM8 gcdxZ2x2u160HtOhAY9G8ISFjEdjIy6hAW8XedCm+EsWSZO0gPtB1aiXjRgkKL42WMZe ql+TN0mintnTbRDc14eDBrd6b9HSMd1QQSBffyxsKSLKVAgrUivZPZ+pVKGcTY+tcDQ3 hy0A== X-Gm-Message-State: ANoB5plNFw3vPcdqde5zlcJBR88+Z2BcOqUYcIWFEA15107srvgc/lsB tukghvkq/K353DEFa47+3azq5mnGoOGmeSX/cy4t8B+N/LjzBvTFgO7vVz0eH0hTpwm2knv8SlP QgxY/v2t11wficetOlUCR X-Received: by 2002:a92:4a0f:0:b0:302:e9ff:dc96 with SMTP id m15-20020a924a0f000000b00302e9ffdc96mr25346363ilf.236.1670258399627; Mon, 05 Dec 2022 08:39:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf4wYj4AwmGw7FUwam+HDZirdRMr7baOGnlZryiWuoskjW4MPincPjtUMSvxRp1vHYXDu8PH5A== X-Received: by 2002:a92:4a0f:0:b0:302:e9ff:dc96 with SMTP id m15-20020a924a0f000000b00302e9ffdc96mr25346358ilf.236.1670258399393; Mon, 05 Dec 2022 08:39:59 -0800 (PST) Received: from [192.168.0.241] (192-0-145-146.cpe.teksavvy.com. [192.0.145.146]) by smtp.gmail.com with ESMTPSA id f6-20020a056638112600b00389d352e175sm5820230jar.43.2022.12.05.08.39.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Dec 2022 08:39:58 -0800 (PST) Message-ID: Date: Mon, 5 Dec 2022 11:39:58 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH 09/30] Linux: consolidate link implementation To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20221019221433.1082017-1-adhemerval.zanella@linaro.org> <20221019221433.1082017-10-adhemerval.zanella@linaro.org> Organization: Red Hat In-Reply-To: <20221019221433.1082017-10-adhemerval.zanella@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Carlos O'Donell via Libc-alpha Reply-To: Carlos O'Donell Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 10/19/22 18:14, Adhemerval Zanella via Libc-alpha wrote: > Use link syscall if defined, otherwise use linkat. > > Checked on x86_64-linux-gnu. LGTM. No regressions on x86_64 and i686. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell > --- > sysdeps/unix/sysv/linux/{generic => }/link.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > rename sysdeps/unix/sysv/linux/{generic => }/link.c (78%) > > diff --git a/sysdeps/unix/sysv/linux/generic/link.c b/sysdeps/unix/sysv/linux/link.c > similarity index 78% > rename from sysdeps/unix/sysv/linux/generic/link.c > rename to sysdeps/unix/sysv/linux/link.c > index e07655d521..eb4fe1569e 100644 > --- a/sysdeps/unix/sysv/linux/generic/link.c > +++ b/sysdeps/unix/sysv/linux/link.c > @@ -1,4 +1,5 @@ > -/* Copyright (C) 2011-2022 Free Software Foundation, Inc. > +/* Make a new name for a file. 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,7 +24,11 @@ > int > __link (const char *from, const char *to) > { > - return INLINE_SYSCALL (linkat, 5, AT_FDCWD, from, AT_FDCWD, to, 0); > +#ifdef __NR_link > + return INLINE_SYSCALL_CALL (link, from, to); > +#else > + return INLINE_SYSCALL_CALL (linkat, AT_FDCWD, from, AT_FDCWD, to, 0); > +#endif OK. > } > > weak_alias (__link, link) -- Cheers, Carlos.