Fix: Always use 'WSLInterop` as the binfmt name (#13467)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Ben Hillis committed
Sep 9, 2025 at 09:28 UTC
d43b725b3d52e3c18cd5b03c2c1b0ce4bacb8a26
2 files changed
+2
-11
src/linux/init/binfmt.h
-9
@@ -19,15 +19,6 @@ Abstract:
19
//
20
21
#define LX_INIT_BINFMT_NAME "WSLInterop"
22
-
23
-//
24
-// Name of the WSL 'late' binfmt_misc interpreter.
25
-// This name is used by the wsl-binfmt systemd unit which
26
-// registers the interpreter a second time after systemd-binfmt to make sure
27
-// that wsl's interpreter is always registered last.
28
-//
29
-
30
-#define LX_INIT_BINFMT_NAME_LATE "WSLInterop-late"
22
#define BINFMT_MISC_MOUNT_TARGET "/proc/sys/fs/binfmt_misc"
23
#define BINFMT_MISC_REGISTER_FILE BINFMT_MISC_MOUNT_TARGET "/register"
24
#define BINFMT_INTEROP_REGISTRATION_STRING(Name) ":" Name ":M::MZ::" LX_INIT_PATH ":P"
src/linux/init/init.cpp
+2
-2
@@ -365,8 +365,8 @@ ExecStart=/bin/mount -o bind,ro,X-mount.mkdir -t none /mnt/wslg/.X11-unix /tmp/.
365
ExecStop=
366
ExecStart=/bin/sh -c '(echo -1 > {}/{}) ; (echo "{}" > {})' )",
367
BINFMT_MISC_MOUNT_TARGET,
368
- LX_INIT_BINFMT_NAME_LATE,
369
- BINFMT_INTEROP_REGISTRATION_STRING(LX_INIT_BINFMT_NAME_LATE),
368
+ LX_INIT_BINFMT_NAME,
369
+ BINFMT_INTEROP_REGISTRATION_STRING(LX_INIT_BINFMT_NAME),
370
BINFMT_MISC_REGISTER_FILE);
371
372
// Install the override for systemd-binfmt.service.