summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-03-23 22:28:16 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-07 11:57:00 +0200
commit94dbf2c18cb0eef21df844f99d9045f0d47b5f79 (patch)
treed4152d0c91d49b55b6cf116fe7df05709cf06362
parent41b24382e7849758e456eef50bbf740a1f097c6e (diff)
downloadsystemd-94dbf2c18cb0eef21df844f99d9045f0d47b5f79.tar.gz
mountpoint-util: rebreak some comments
(cherry picked from commit 9d0619dee729b9b481efa512295cf70cb5887fe1)
-rw-r--r--src/basic/mountpoint-util.c24
-rw-r--r--src/shared/mount-util.c5
2 files changed, 11 insertions, 18 deletions
diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c
index 6d47419194..1d617e87b2 100644
--- a/src/basic/mountpoint-util.c
+++ b/src/basic/mountpoint-util.c
@@ -233,16 +233,13 @@ int fd_is_mount_point(int fd, const char *filename, int flags) {
} else if (r < 0)
return r;
- /* The parent can do name_to_handle_at() but the
- * directory we are interested in can't? If so, it
- * must be a mount point. */
+ /* The parent can do name_to_handle_at() but the directory we are interested in can't? If so, it must
+ * be a mount point. */
if (nosupp)
return 1;
- /* If the file handle for the directory we are
- * interested in and its parent are identical, we
- * assume this is the root directory, which is a mount
- * point. */
+ /* If the file handle for the directory we are interested in and its parent are identical, we assume
+ * this is the root directory, which is a mount point. */
if (h->handle_bytes == h_parent->handle_bytes &&
h->handle_type == h_parent->handle_type &&
@@ -265,17 +262,14 @@ fallback_fdinfo:
if (mount_id != mount_id_parent)
return 1;
- /* Hmm, so, the mount ids are the same. This leaves one
- * special case though for the root file system. For that,
- * let's see if the parent directory has the same inode as we
- * are interested in. Hence, let's also do fstat() checks now,
- * too, but avoid the st_dev comparisons, since they aren't
- * that useful on unionfs mounts. */
+ /* Hmm, so, the mount ids are the same. This leaves one special case though for the root file
+ * system. For that, let's see if the parent directory has the same inode as we are interested
+ * in. Hence, let's also do fstat() checks now, too, but avoid the st_dev comparisons, since they
+ * aren't that useful on unionfs mounts. */
check_st_dev = false;
fallback_fstat:
- /* yay for fstatat() taking a different set of flags than the other
- * _at() above */
+ /* yay for fstatat() taking a different set of flags than the other _at() above */
if (flags & AT_SYMLINK_FOLLOW)
flags &= ~AT_SYMLINK_FOLLOW;
else
diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c
index 576e4054c2..53516c671b 100644
--- a/src/shared/mount-util.c
+++ b/src/shared/mount-util.c
@@ -84,9 +84,8 @@ int umount_recursive(const char *prefix, int flags) {
int n = 0, r;
bool again;
- /* Try to umount everything recursively below a
- * directory. Also, take care of stacked mounts, and keep
- * unmounting them until they are gone. */
+ /* Try to umount everything recursively below a directory. Also, take care of stacked mounts, and
+ * keep unmounting them until they are gone. */
do {
_cleanup_(mnt_free_tablep) struct libmnt_table *table = NULL;