[PATCH v2 04/10] um: change machine name for uname output
Johannes Berg <[email protected]> Thu, 23 Jul 2026 11:35:45 +0200
| Newsgroups | org.infradead.lists.linux-um |
|---|---|
| Message-ID | <20260723113633.bcaf234695c5.I226381aaaf6dd46c559b0e694b29370d0102ce3f@changeid> |
From: Hajime Tazaki <[email protected]> This commit tries to display MMU/!MMU mode from the output of uname(2) so that users can distinguish which mode of UML is running right now. Signed-off-by: Hajime Tazaki <[email protected]> [remove / to fix regression with systemd userspace] Signed-off-by: Johannes Berg <[email protected]> --- v2: regression fix --- arch/um/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/um/Makefile b/arch/um/Makefile index 937639edc295..1f85b73d4abb 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -148,6 +148,12 @@ export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) $(CC_FLAGS_ CLEAN_FILES += linux x.i gmon.out MRPROPER_FILES += $(HOST_DIR)/include/generated +ifeq ($(CONFIG_MMU),y) +UTS_MACHINE := "um" +else +UTS_MACHINE := "um\(nommu\)" +endif + archclean: @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ -o -name '*.gcov' \) -type f -print | xargs rm -f -- 2.53.0