Well, what if we try to create a decently sized stack buffer (say 256 chars) - in 99% we fit into that buffer (actually I can't image we would ever need more), and if we do not fit into that buffer we just return 1 (most likely some sort of acl is likely there). That would allow for a nice and simple to read patch.
-----Original Message----- From: Paul Eggert <egg...@cs.ucla.edu> Sent: Donnerstag, 4. Mai 2023 00:54 To: Ondrej Valousek <ondrej.valousek...@renesas.com>; bug-gnulib@gnu.org Subject: Re: [PATCH] fix NFSv4 acl detection on F39 On 5/2/23 22:44, Ondrej Valousek wrote: > What's the reason for doing that? > I wanted to save syscalls, not to create more. Yes, and the approach I suggested will save a syscall in 99.99% of the cases, as there will be just one llistxattr syscall where your approach has two. In a very few (practically zero?) cases there will be three or more syscalls, but that's OK.