mirror of
https://github.com/systemd/systemd.git
synced 2025-02-08 09:57:41 +03:00
tmpfiles: shorten code a bit
This commit is contained in:
parent
18f2638f48
commit
2f3745dd26
@ -1515,10 +1515,8 @@ static int truncate_file(Item *i, const char *path) {
|
||||
log_debug("Writing to \"%s\".", path);
|
||||
|
||||
r = loop_write(fd, i->argument, strlen(i->argument), false);
|
||||
if (r < 0) {
|
||||
r = erofs ? -EROFS : r;
|
||||
return log_error_errno(r, "Failed to write file %s: %m", path);
|
||||
}
|
||||
if (r < 0)
|
||||
return log_error_errno(erofs ? -EROFS : r, "Failed to write file %s: %m", path);
|
||||
}
|
||||
|
||||
return fd_set_perms(i, fd, path, st);
|
||||
|
Loading…
x
Reference in New Issue
Block a user