chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: when creating temporary file names, allow including extra id string in it
[elogind.git]
/
src
/
shared
/
copy.c
diff --git
a/src/shared/copy.c
b/src/shared/copy.c
index 775a33985613a33c7d5b1e9a51dba1bf236c03ad..230e7e4d3fc3a793431fc5165a5c3631dbbf0d3b 100644
(file)
--- a/
src/shared/copy.c
+++ b/
src/shared/copy.c
@@
-372,7
+372,7
@@
int copy_file(const char *from, const char *to, int flags, mode_t mode, unsigned
}
if (chattr_flags != 0)
}
if (chattr_flags != 0)
- (void) chattr_fd(fdt,
true, chattr_flags
);
+ (void) chattr_fd(fdt,
chattr_flags, (unsigned) -1
);
r = copy_file_fd(from, fdt, true);
if (r < 0) {
r = copy_file_fd(from, fdt, true);
if (r < 0) {
@@
-396,7
+396,7
@@
int copy_file_atomic(const char *from, const char *to, mode_t mode, bool replace
assert(from);
assert(to);
assert(from);
assert(to);
- r = tempfn_random(to, &t);
+ r = tempfn_random(to,
NULL,
&t);
if (r < 0)
return r;
if (r < 0)
return r;