Commit ec82c32d45644998a28abad0a6a9ccdd721a054e

Authored by Al Viro
Committed by H. Peter Anvin
1 parent 887c57d480

x86, um: get rid of arch/um/os symlink

we can get DEV_NULL defined for arch/um/drivers/null.c in less
convoluted ways, TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>

Showing 5 changed files with 4 additions and 25 deletions Side-by-side Diff

... ... @@ -18,12 +18,9 @@
18 18 $(ARCH_DIR)/drivers/ \
19 19 $(ARCH_DIR)/os-$(OS)/
20 20  
21   -# XXX: The "os" symlink is only used by arch/um/include/os.h, which includes
22   -# ../os/include/file.h
23   -#
24 21 # These are cleaned up during mrproper. Please DO NOT fix it again, this is
25 22 # the Correct Thing(tm) to do!
26   -ARCH_SYMLINKS = $(ARCH_DIR)/os $(ARCH_DIR)/include/shared/uml-config.h
  23 +ARCH_SYMLINKS = $(ARCH_DIR)/include/shared/uml-config.h
27 24  
28 25 MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas
29 26  
... ... @@ -143,14 +140,6 @@
143 140 @echo ' MKDIR $@'
144 141 $(Q)mkdir -p $@
145 142  
146   -$(ARCH_DIR)/os:
147   - @echo ' SYMLINK $@'
148   -ifneq ($(KBUILD_SRC),)
149   - $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/os-$(OS) $@
150   -else
151   - $(Q)ln -fsn os-$(OS) $@
152   -endif
153   -
154 143 # Generated files
155 144 define filechk_umlconfig
156 145 sed 's/ CONFIG/ UML_CONFIG/'
... ... @@ -182,5 +171,5 @@
182 171 @echo ' SYMLINK $@'
183 172 $(Q)ln -sf ../../../../include/asm/asm-offsets.h $@
184 173  
185   -export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH
  174 +export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH
arch/um/Makefile-os-Linux
... ... @@ -6,4 +6,5 @@
6 6 # To get a definition of F_SETSIG
7 7 USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
8 8 KBUILD_CFLAGS += -D_LARGEFILE64_SOURCE
  9 +DEV_NULL_PATH = \"/dev/null\"
arch/um/drivers/Makefile
... ... @@ -62,6 +62,7 @@
62 62  
63 63 # pcap_user.o must be added explicitly.
64 64 USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o
  65 +CFLAGS_null.o = -DDEV_NULL=$(DEV_NULL_PATH)
65 66  
66 67 include arch/um/scripts/Makefile.rules
arch/um/include/shared/os.h
... ... @@ -11,7 +11,6 @@
11 11 #include "longjmp.h"
12 12 #include "mm_id.h"
13 13 #include "sysdep/tls.h"
14   -#include "../../os/include/file.h"
15 14  
16 15 #define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR))
17 16  
arch/um/os-Linux/include/file.h
1   -/*
2   - * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3   - * Licensed under the GPL
4   - */
5   -
6   -#ifndef __OS_FILE_H__
7   -#define __OS_FILE_H__
8   -
9   -#define DEV_NULL "/dev/null"
10   -
11   -#endif