diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2021-02-13 16:02:47 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2021-02-13 16:02:47 +0100 |
commit | 665695e425dd29010b5e1dc944bd2765254ec7f8 (patch) | |
tree | f09755d7b6a60f14ee1cc50d61305e7b6406e53b /patches | |
parent | Bump eudev to v3.2.10 (diff) | |
download | genkernel-665695e425dd29010b5e1dc944bd2765254ec7f8.tar.gz genkernel-665695e425dd29010b5e1dc944bd2765254ec7f8.tar.bz2 genkernel-665695e425dd29010b5e1dc944bd2765254ec7f8.zip |
Bump util-linux to v2.36.2
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/util-linux/2.36.1/util-linux-2.36.1-switch_root-check-if-mountpoint-exists.patch | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/patches/util-linux/2.36.1/util-linux-2.36.1-switch_root-check-if-mountpoint-exists.patch b/patches/util-linux/2.36.1/util-linux-2.36.1-switch_root-check-if-mountpoint-exists.patch deleted file mode 100644 index 17bcd91d..00000000 --- a/patches/util-linux/2.36.1/util-linux-2.36.1-switch_root-check-if-mountpoint-exists.patch +++ /dev/null @@ -1,31 +0,0 @@ -switch_root: check if mount point to move even exists - ---- a/sys-utils/switch_root.c -+++ b/sys-utils/switch_root.c -@@ -131,7 +131,12 @@ static int switchroot(const char *newroot) - int i; - int cfd; - pid_t pid; -- struct stat newroot_stat, sb; -+ struct stat newroot_stat, oldroot_stat, sb; -+ -+ if (stat("/", &oldroot_stat) != 0) { -+ warn(_("stat of %s failed"), "/"); -+ return -1; -+ } - - if (stat(newroot, &newroot_stat) != 0) { - warn(_("stat of %s failed"), newroot); -@@ -143,6 +148,11 @@ static int switchroot(const char *newroot) - - snprintf(newmount, sizeof(newmount), "%s%s", newroot, umounts[i]); - -+ if ((stat(umounts[i], &sb) == 0) && sb.st_dev == oldroot_stat.st_dev) { -+ /* mount point to move seems to be a normal directory or stat failed */ -+ continue; -+ } -+ - if ((stat(newmount, &sb) != 0) || (sb.st_dev != newroot_stat.st_dev)) { - /* mount point seems to be mounted already or stat failed */ - umount2(umounts[i], MNT_DETACH); - |