Re: [PATCH RFC 2/3] libfile: implement read_fd counterpart to read_file

2023-11-22 Thread Ahmad Fatoum
On 21.11.23 08:36, Sascha Hauer wrote: > On Mon, Nov 20, 2023 at 09:37:49AM +0100, Ahmad Fatoum wrote: >> Files opened with O_TMPFILE have no name, so read_file can't be used >> with them. Therefore add a read_fd function, which slurps all a file's >> contents into a buffer. >> >> Signed-off-by: Ah

Re: [PATCH RFC 2/3] libfile: implement read_fd counterpart to read_file

2023-11-20 Thread Sascha Hauer
On Mon, Nov 20, 2023 at 09:37:49AM +0100, Ahmad Fatoum wrote: > Files opened with O_TMPFILE have no name, so read_file can't be used > with them. Therefore add a read_fd function, which slurps all a file's > contents into a buffer. > > Signed-off-by: Ahmad Fatoum > --- > include/libfile.h | 2 +

Re: [PATCH RFC 2/3] libfile: implement read_fd counterpart to read_file

2023-11-20 Thread Ahmad Fatoum
Hello Yann, On 20.11.23 10:49, Yann Sionneau wrote: > Hello Ahmad, > > On 11/20/23 09:37, Ahmad Fatoum wrote: >> Files opened with O_TMPFILE have no name, so read_file can't be used >> with them. Therefore add a read_fd function, which slurps all a file's >> contents into a buffer. >> >> Signed-o

Re: [PATCH RFC 2/3] libfile: implement read_fd counterpart to read_file

2023-11-20 Thread Yann Sionneau
Hello Ahmad, On 11/20/23 09:37, Ahmad Fatoum wrote: Files opened with O_TMPFILE have no name, so read_file can't be used with them. Therefore add a read_fd function, which slurps all a file's contents into a buffer. Signed-off-by: Ahmad Fatoum --- include/libfile.h | 2 ++ lib/libfile.c

[PATCH RFC 2/3] libfile: implement read_fd counterpart to read_file

2023-11-20 Thread Ahmad Fatoum
Files opened with O_TMPFILE have no name, so read_file can't be used with them. Therefore add a read_fd function, which slurps all a file's contents into a buffer. Signed-off-by: Ahmad Fatoum --- include/libfile.h | 2 ++ lib/libfile.c | 44 2 fi