X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Fcopy.c;h=4c227c8bee387a7a8a58b1e1c059c30934a91fa9;hp=4dfc2f3fca11438d92997ad257927d3f151730b6;hb=1b99214789101;hpb=0138a2dcc50d261ea3512b0eaca2c6e9d4a807f0 diff --git a/src/shared/copy.c b/src/shared/copy.c index 4dfc2f3fc..4c227c8be 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -22,7 +22,7 @@ #include "util.h" #include "copy.h" -static int stream_bytes(int fdf, int fdt) { +int copy_bytes(int fdf, int fdt) { assert(fdf >= 0); assert(fdt >= 0); @@ -92,7 +92,7 @@ static int fd_copy_regular(int df, const char *from, const struct stat *st, int return -errno; } - r = stream_bytes(fdf, fdt); + r = copy_bytes(fdf, fdt); if (r < 0) { unlinkat(dt, to, 0); return r; @@ -273,7 +273,7 @@ int copy_file(const char *from, const char *to, int flags, mode_t mode) { if (fdt < 0) return -errno; - r = stream_bytes(fdf, fdt); + r = copy_bytes(fdf, fdt); if (r < 0) { unlink(to); return r;