From 273d76f4f88e9b8b6e3be21d1cde1d0a943009c5 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 18 Nov 2020 16:38:49 +0900 Subject: [PATCH] tree-wide: update "that that" --- docs/CONTAINER_INTERFACE.md | 4 ++-- src/basic/copy.c | 2 +- src/shared/loop-util.c | 2 +- src/shutdown/shutdown.c | 4 ++-- src/shutdown/umount.c | 12 ++++-------- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/CONTAINER_INTERFACE.md b/docs/CONTAINER_INTERFACE.md index 40b1533595..980fce3968 100644 --- a/docs/CONTAINER_INTERFACE.md +++ b/docs/CONTAINER_INTERFACE.md @@ -77,7 +77,7 @@ manager, please consider supporting the following interfaces. container instance) or creating one scope unit for each container instance via systemd's transient unit API (in case you have one container manager that manages all instances. Either way, make sure to set `Delegate=yes` in - it. This ensures that that the unit you created will be part of all cgroup + it. This ensures that the unit you created will be part of all cgroup controllers (or at least the ones systemd understands). The latter may also be done via `systemd-machined`'s `CreateMachine()` API. Make sure to use the cgroup path systemd put your process in for all operations of the container. @@ -364,7 +364,7 @@ If you write software that wants to detect whether it is run in a container, please check `/proc/1/environ` and look for the `container=` environment variable. Do not assume the environment variable is inherited down the process tree. It generally is not. Hence check the environment block of PID 1, not your -own. Note though that that file is only accessible to root. systemd hence early +own. Note though that this file is only accessible to root. systemd hence early on also copies the value into `/run/systemd/container`, which is readable for everybody. However, that's a systemd-specific interface and other init systems are unlikely to do the same. diff --git a/src/basic/copy.c b/src/basic/copy.c index 0494c9068d..6a9c3a396f 100644 --- a/src/basic/copy.c +++ b/src/basic/copy.c @@ -1103,7 +1103,7 @@ int copy_file_atomic_full( assert(from); assert(to); - /* We try to use O_TMPFILE here to create the file if we can. Note that that only works if COPY_REPLACE is not + /* We try to use O_TMPFILE here to create the file if we can. Note that this only works if COPY_REPLACE is not * set though as we need to use linkat() for linking the O_TMPFILE file into the file system but that system * call can't replace existing files. Hence, if COPY_REPLACE is set we create a temporary name in the file * system right-away and unconditionally which we then can renameat() to the right name after we completed diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c index 62d5b7ae8e..84f415aa61 100644 --- a/src/shared/loop-util.c +++ b/src/shared/loop-util.c @@ -232,7 +232,7 @@ static int loop_configure( * ioctl can return EAGAIN in case we change the lo_offset field, if someone else is accessing the * block device while we try to reconfigure it. This is a pretty common case, since udev might * instantly start probing the device as soon as we attach an fd to it. Hence handle it in two ways: - * first, let's take the BSD lock that that ensures that udev will not step in between the point in + * first, let's take the BSD lock to ensure that udev will not step in between the point in * time where we attach the fd and where we reconfigure the device. Secondly, let's wait 50ms on * EAGAIN and retry. The former should be an efficient mechanism to avoid we have to wait 50ms * needlessly if we are just racing against udev. The latter is protection against all other cases, diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c index ee4e215c57..0d07865542 100644 --- a/src/shutdown/shutdown.c +++ b/src/shutdown/shutdown.c @@ -232,8 +232,8 @@ static void sync_with_progress(void) { BLOCK_SIGNALS(SIGCHLD); - /* Due to the possibility of the sync operation hanging, we fork a child process and monitor the progress. If - * the timeout lapses, the assumption is that that particular sync stalled. */ + /* Due to the possibility of the sync operation hanging, we fork a child process and monitor + * the progress. If the timeout lapses, the assumption is that the particular sync stalled. */ r = asynchronous_sync(&pid); if (r < 0) { diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c index e6542c2716..3a72a13e1a 100644 --- a/src/shutdown/umount.c +++ b/src/shutdown/umount.c @@ -514,10 +514,8 @@ static int remount_with_timeout(MountPoint *m, int umount_log_level) { assert(m); - /* Due to the possibility of a remount operation hanging, we - * fork a child process and set a timeout. If the timeout - * lapses, the assumption is that that particular remount - * failed. */ + /* Due to the possibility of a remount operation hanging, we fork a child process and set a + * timeout. If the timeout lapses, the assumption is that the particular remount failed. */ r = safe_fork("(sd-remount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid); if (r < 0) return r; @@ -552,10 +550,8 @@ static int umount_with_timeout(MountPoint *m, int umount_log_level) { assert(m); - /* Due to the possibility of a umount operation hanging, we - * fork a child process and set a timeout. If the timeout - * lapses, the assumption is that that particular umount - * failed. */ + /* Due to the possibility of a umount operation hanging, we fork a child process and set a + * timeout. If the timeout lapses, the assumption is that the particular umount failed. */ r = safe_fork("(sd-umount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid); if (r < 0) return r;