chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
treewide: fix multiple typos
[elogind.git]
/
src
/
core
/
machine-id-setup.c
diff --git
a/src/core/machine-id-setup.c
b/src/core/machine-id-setup.c
index 74582a5dcd0be2121778197e6301bc0f922fc4b7..7e0aee6a75ba883b92f737033cd0f99730d1fdf6 100644
(file)
--- a/
src/core/machine-id-setup.c
+++ b/
src/core/machine-id-setup.c
@@
-182,7
+182,7
@@
static int write_machine_id(int fd, char id[34]) {
assert(id);
lseek(fd, 0, SEEK_SET);
assert(id);
lseek(fd, 0, SEEK_SET);
- if (loop_write(fd, id, 33, false) ==
33
)
+ if (loop_write(fd, id, 33, false) ==
0
)
return 0;
return -errno;
return 0;
return -errno;
@@
-205,7
+205,7
@@
int machine_id_commit(const char *root) {
r = path_is_mount_point(etc_machine_id, false);
if (r < 0)
r = path_is_mount_point(etc_machine_id, false);
if (r < 0)
- return log_error_errno(r, "Failed to determine wether %s is a mount point: %m", etc_machine_id);
+ return log_error_errno(r, "Failed to determine w
h
ether %s is a mount point: %m", etc_machine_id);
if (r == 0) {
log_debug("%s is is not a mount point. Nothing to do.", etc_machine_id);
return 0;
if (r == 0) {
log_debug("%s is is not a mount point. Nothing to do.", etc_machine_id);
return 0;
@@
-329,10
+329,9
@@
int machine_id_setup(const char *root) {
if (r < 0)
return r;
if (r < 0)
return r;
- if (S_ISREG(st.st_mode) && writable)
{
+ if (S_ISREG(st.st_mode) && writable)
if (write_machine_id(fd, id) == 0)
return 0;
if (write_machine_id(fd, id) == 0)
return 0;
- }
fd = safe_close(fd);
fd = safe_close(fd);