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: make a couple of files we write atomic
[elogind.git]
/
src
/
hostnamed.c
diff --git
a/src/hostnamed.c
b/src/hostnamed.c
index cf2172fd2c127d4ebc6347a5b607c3dd5b8b3eab..68c5715b0e1cc1ed7ab6df2cd510a7407c844d6b 100644
(file)
--- a/
src/hostnamed.c
+++ b/
src/hostnamed.c
@@
-201,7
+201,7
@@
static int write_data_static_hostname(void) {
return 0;
}
- return write_one_line_file("/etc/hostname", data[PROP_STATIC_HOSTNAME]);
+ return write_one_line_file
_atomic
("/etc/hostname", data[PROP_STATIC_HOSTNAME]);
}
static int write_data_other(void) {