chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sysusers: add minimal tool to reconstruct /etc/passwd and /etc/group from static...
[elogind.git]
/
src
/
shared
/
copy.c
diff --git
a/src/shared/copy.c
b/src/shared/copy.c
index 4dfc2f3fca11438d92997ad257927d3f151730b6..4c227c8bee387a7a8a58b1e1c059c30934a91fa9 100644
(file)
--- a/
src/shared/copy.c
+++ b/
src/shared/copy.c
@@
-22,7
+22,7
@@
#include "util.h"
#include "copy.h"
#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);
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;
}
return -errno;
}
- r =
stream
_bytes(fdf, fdt);
+ r =
copy
_bytes(fdf, fdt);
if (r < 0) {
unlinkat(dt, to, 0);
return r;
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;
if (fdt < 0)
return -errno;
- r =
stream
_bytes(fdf, fdt);
+ r =
copy
_bytes(fdf, fdt);
if (r < 0) {
unlink(to);
return r;
if (r < 0) {
unlink(to);
return r;