From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cs.unibo.it header.i=@cs.unibo.it header.b="CiMJ7MWR" X-Greylist: delayed 55736 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 10 Dec 2023 00:07:58 PST Received: from mail.virtlab.unibo.it (mail.virtlab.unibo.it [130.136.161.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 288119D for ; Sun, 10 Dec 2023 00:07:58 -0800 (PST) Received: from cs.unibo.it (94-33-52-139.static.clienti.tiscali.it [94.33.52.139]) by mail.virtlab.unibo.it (Postfix) with ESMTPSA id CA0111C013D; Sun, 10 Dec 2023 09:07:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.unibo.it; s=virtlab; t=1702195673; bh=Ry2lnm1sB89bHSl9wbPmd1cqgwoUpO3wV4o15TfcfRA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CiMJ7MWRLOdGnqdmqUvKPmiTtwgq8xFWed2ICQFI+0LqUSMFoattgxMIdBgM7iFKY yPDroCzMJfMgyMER9jFAzi/7b3l/xf5e3E6qD5rNOk1IwGr9hXBcp7D7XegwM+ejGb ertLMLfBMBNvicqUcXx8+IW5tvN+ecwi2bXiblX4= Date: Sun, 10 Dec 2023 09:07:52 +0100 From: Renzo Davoli To: Alejandro Colomar Cc: linux-man@vger.kernel.org Subject: Re: utimensat(2) and faccessat(2): man pages do not mention AT_EMPTY_PATH flag Message-ID: References: Precedence: bulk X-Mailing-List: linux-man@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="kX4Z5RgoCpgEZmuh" Content-Disposition: inline In-Reply-To: --kX4Z5RgoCpgEZmuh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Dec 09, 2023 at 10:36:19PM +0100, Alejandro Colomar wrote: > Dear Renzo, > > +.\" Modified 2023-12-09 by Renzo Davoli > We don't use those anymore. Simply add yourself to Copyright if > appropriate, but for knowing what was written by who, git(1) works > better. Okay. You'll find here attached the new patch. ciao renzo --kX4Z5RgoCpgEZmuh Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="access_utimensat_add_emptypath.patch" diff --git a/man2/access.2 b/man2/access.2 index 95de3815d..2b3e70e34 100644 --- a/man2/access.2 +++ b/man2/access.2 @@ -155,6 +155,27 @@ By default, uses the real IDs (like .BR access ()). .TP +.BR AT_EMPTY_PATH " (since Linux 5.8)" +If +.I pathname +is an empty string, operate on the file referred to by +.I dirfd +(which may have been obtained using the +.BR open (2) +.B O_PATH +flag). +In this case, +.I dirfd +can refer to any type of file, not just a directory. +If +.I dirfd +is +.BR AT_FDCWD , +the call operates on the current working directory. +This flag is Linux-specific; define +.B _GNU_SOURCE +to obtain its definition. +.TP .B AT_SYMLINK_NOFOLLOW If .I pathname diff --git a/man2/utimensat.2 b/man2/utimensat.2 index 495e15cee..d58b4d82e 100644 --- a/man2/utimensat.2 +++ b/man2/utimensat.2 @@ -182,10 +182,31 @@ is ignored. .P The .I flags -field is a bit mask that may be 0, or include the following constant, -defined in +argument is a bit mask created by ORing together zero or more of +the following values defined in .IR : .TP +.BR AT_EMPTY_PATH " (since Linux 5.8)" +If +.I pathname +is an empty string, operate on the file referred to by +.I dirfd +(which may have been obtained using the +.BR open (2) +.B O_PATH +flag). +In this case, +.I dirfd +can refer to any type of file, not just a directory. +If +.I dirfd +is +.BR AT_FDCWD , +the call operates on the current working directory. +This flag is Linux-specific; define +.B _GNU_SOURCE +to obtain its definition. +.TP .B AT_SYMLINK_NOFOLLOW If .I pathname --kX4Z5RgoCpgEZmuh--