chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3fb90db
)
import-raw: set NOCOW flag on all raw images we create
author
Lennart Poettering
<lennart@poettering.net>
Sat, 17 Jan 2015 01:34:33 +0000
(
02:34
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 19 Jan 2015 19:24:09 +0000
(20:24 +0100)
src/import/import-raw.c
patch
|
blob
|
history
diff --git
a/src/import/import-raw.c
b/src/import/import-raw.c
index c15765d51c0e919abb11064096921c6fb99da803..f830ba47ff8950a4b2944cbae9c29928a96592e4 100644
(file)
--- a/
src/import/import-raw.c
+++ b/
src/import/import-raw.c
@@
-205,7
+205,7
@@
static void raw_import_file_success(RawImportFile *f) {
* writes. */
r = chattr_fd(dfd, true, FS_NOCOW_FL);
if (r < 0)
* writes. */
r = chattr_fd(dfd, true, FS_NOCOW_FL);
if (r < 0)
- log_warning_errno(errno, "Failed to set file attributes on %s: %m",
f->temp_path
);
+ log_warning_errno(errno, "Failed to set file attributes on %s: %m",
tp
);
r = copy_bytes(f->disk_fd, dfd, (off_t) -1, true);
if (r < 0) {
r = copy_bytes(f->disk_fd, dfd, (off_t) -1, true);
if (r < 0) {
@@
-402,6
+402,10
@@
static int raw_import_file_open_disk_for_write(RawImportFile *f) {
if (f->disk_fd < 0)
return log_error_errno(errno, "Failed to create %s: %m", f->temp_path);
if (f->disk_fd < 0)
return log_error_errno(errno, "Failed to create %s: %m", f->temp_path);
+ r = chattr_fd(f->disk_fd, true, FS_NOCOW_FL);
+ if (r < 0)
+ log_warning_errno(errno, "Failed to set file attributes on %s: %m", f->temp_path);
+
return 0;
}
return 0;
}