diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-03-28 17:07:42 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | cfe944b83031d44578b6924dfba2b2655d115068 (patch) | |
tree | dbee5c5bafd4ae27a6927237aae41d7e9f1e22b9 /src/core | |
parent | 53677ee47da3efae1ece7cc77aa0c911de1adfe8 (diff) |
machine-image,mount-setup: minor coding style fixes
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/mount-setup.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index 33ee049cd..4b5dd37d4 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -412,19 +412,18 @@ static int relabel_cgroup_filesystems(void) { only when the filesystem has been already populated by a previous instance of systemd running from initrd. Otherwise don't remount anything and leave the filesystem read-write for the cgroup filesystems to be mounted inside. */ - r = statfs("/sys/fs/cgroup", &st); - if (r < 0) { + if (statfs("/sys/fs/cgroup", &st) < 0) return log_error_errno(errno, "Failed to determine mount flags for /sys/fs/cgroup: %m"); - } if (st.f_flags & ST_RDONLY) (void) mount(NULL, "/sys/fs/cgroup", NULL, MS_REMOUNT, NULL); (void) label_fix("/sys/fs/cgroup", 0); - nftw("/sys/fs/cgroup", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL); + (void) nftw("/sys/fs/cgroup", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL); if (st.f_flags & ST_RDONLY) (void) mount(NULL, "/sys/fs/cgroup", NULL, MS_REMOUNT|MS_RDONLY, NULL); + } else if (r < 0) return log_error_errno(r, "Failed to determine whether we are in all unified mode: %m"); @@ -452,9 +451,9 @@ int mount_setup(bool loaded_policy) { before_relabel = now(CLOCK_MONOTONIC); - nftw("/dev", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL); - nftw("/dev/shm", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL); - nftw("/run", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL); + (void) nftw("/dev", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL); + (void) nftw("/dev/shm", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL); + (void) nftw("/run", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL); r = relabel_cgroup_filesystems(); if (r < 0) |