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: AS3215 2.6.0.0/16 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 D9F9D1F601 for ; Mon, 5 Dec 2022 16:41:36 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="sLeYZwu4"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1D7D23952497 for ; Mon, 5 Dec 2022 16:41:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D7D23952497 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670258496; bh=oLcEzWTMNV8Mx4/68jMEbdgty8sDBcfJx6lvS0+DVG0=; 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=sLeYZwu4OrNpOo6u4ZoNZyDLib/J0LkhPYZC3ACrf+luI9Gl/hQ/kpYMhqKNoe5jh 6A11e2cT7/kOn78nNdTjRUr5a7la03lRJ+uCaRyhz3A+Upr7HHa4f0P3moI4/QGIvA fK4qydbJPKHyJN19KG4shCbTF74Q7WaXer1rDW0c= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 921723947C27 for ; Mon, 5 Dec 2022 16:40:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 921723947C27 Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-589-49C_Jgd_O3GCOSJKUBZs1A-1; Mon, 05 Dec 2022 11:40:08 -0500 X-MC-Unique: 49C_Jgd_O3GCOSJKUBZs1A-1 Received: by mail-il1-f197.google.com with SMTP id i14-20020a056e020d8e00b003034b93bd07so5719369ilj.14 for ; Mon, 05 Dec 2022 08:40:07 -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=oLcEzWTMNV8Mx4/68jMEbdgty8sDBcfJx6lvS0+DVG0=; b=ohpWcNeKnS1CCqYl8mZ8rrPrWbyfcE8EGDmzi6JD5R+6fk9JUARgM5TkJZFLR0H11E sHJxBz6kADD2nJzvVeIEPEBZvDUevGVgr+PXjiTgf2wlZIUAqHYZBPTbJX/OJ7aFiSQi wXwswMUt3vN280EjDNKFBn+knlvkXTomKa44BD0OB05IsLWoDkXRbbpEs1IlhDmkH9k9 zH6TJLDrmaYU1iB2Pp4aub7KShFDLty6VQz5lr66fyyrByo3eqobDqgRkbpjCgWbfsJT Sg3u+HHNi4N3agQ5vvjXc99IEKYssar3XchBgEG3EZW8KpWGBVs33tiHpFc8UAxB2sfv YTZQ== X-Gm-Message-State: ANoB5plTKgB1oEbaWjgW//GpZfXmFBsEJCC39RlibkLxxYnnXSkC2wG6 WjwkJ46rvKdqTtT/b6yXc0ku9QGAWzZRXScnaGofBu5f4X9DoxMNA8yrPuffcOdVlB0Y/WXm35s 0bDfXCekSYfqi9mXmHoau X-Received: by 2002:a05:6e02:152c:b0:303:a2:5654 with SMTP id i12-20020a056e02152c00b0030300a25654mr21684266ilu.203.1670258407289; Mon, 05 Dec 2022 08:40:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf4dLmklp6QU80FCSVL5y0dQezFzeALv+rHjNhsRtMNRwu4/kcS0JVSA1K2GzlJUgedf/Krw6A== X-Received: by 2002:a05:6e02:152c:b0:303:a2:5654 with SMTP id i12-20020a056e02152c00b0030300a25654mr21684255ilu.203.1670258407083; Mon, 05 Dec 2022 08:40:07 -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 q16-20020a056638041000b00363c866d646sm5927919jap.26.2022.12.05.08.40.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Dec 2022 08:40:06 -0800 (PST) Message-ID: Date: Mon, 5 Dec 2022 11:40:05 -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 13/30] Linux: consolidate symlink implementation To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20221019221433.1082017-1-adhemerval.zanella@linaro.org> <20221019221433.1082017-14-adhemerval.zanella@linaro.org> Organization: Red Hat In-Reply-To: <20221019221433.1082017-14-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 symlink syscall if defined, otherwise use symlinkat. > > 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 => }/symlink.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > rename sysdeps/unix/sysv/linux/{generic => }/symlink.c (78%) > > diff --git a/sysdeps/unix/sysv/linux/generic/symlink.c b/sysdeps/unix/sysv/linux/symlink.c > similarity index 78% > rename from sysdeps/unix/sysv/linux/generic/symlink.c > rename to sysdeps/unix/sysv/linux/symlink.c > index 9242f5825e..b336d5ec4c 100644 > --- a/sysdeps/unix/sysv/linux/generic/symlink.c > +++ b/sysdeps/unix/sysv/linux/symlink.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,6 +24,10 @@ > int > __symlink (const char *from, const char *to) > { > - return INLINE_SYSCALL (symlinkat, 3, from, AT_FDCWD, to); > +#ifdef __NR_symlink > + return INLINE_SYSCALL_CALL (symlink, from, to); OK. > +#else > + return INLINE_SYSCALL_CALL (symlinkat, from, AT_FDCWD, to); > +#endif > } > weak_alias (__symlink, symlink) -- Cheers, Carlos.