Re: [PATCH 2/3] libfile: Add copy_fd()

2021-06-22 Thread Sascha Hauer
On Tue, Jun 22, 2021 at 11:24:57PM -0700, Trent Piepho wrote: > On Tue, Jun 22, 2021 at 9:34 PM Sascha Hauer wrote: > > + while (1) { > > + int now, wr; > > + > > + now = read(in, buf, bs); > > + if (now < 0) { > > + ret = now;

Re: [PATCH 2/3] libfile: Add copy_fd()

2021-06-22 Thread Trent Piepho
On Tue, Jun 22, 2021 at 9:34 PM Sascha Hauer wrote: > + while (1) { > + int now, wr; > + > + now = read(in, buf, bs); > + if (now < 0) { > + ret = now; > + goto err; > + } > + > +

[PATCH 2/3] libfile: Add copy_fd()

2021-06-22 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- include/libfile.h | 1 + lib/libfile.c | 34 ++ 2 files changed, 35 insertions(+) diff --git a/include/libfile.h b/include/libfile.h index 350f70..3c2fe1714d 100644 --- a/include/libfile.h +++ b/include/libfile.h @@ -5,6 +5