Skip to content

Commit

Permalink
uml: fix symlink loops
Browse files Browse the repository at this point in the history
symlinks to directories in the non-O= case were lacking -n, which meant
that, when the link already existed, a new link pointing at itself was
created in the target directory.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Nov 15, 2007
1 parent 5a6dca7 commit fcbaa08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ ifneq ($(KBUILD_SRC),)
$(Q)mkdir -p $(objtree)/include/asm-um
$(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) include/asm-um/arch
else
$(Q)cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(HEADER_ARCH) arch
$(Q)cd $(TOPDIR)/include/asm-um && ln -fsn ../asm-$(SUBARCH) arch
endif

$(objtree)/$(ARCH_DIR)/include:
Expand All @@ -180,15 +180,15 @@ $(ARCH_DIR)/include/sysdep: $(objtree)/$(ARCH_DIR)/include
ifneq ($(KBUILD_SRC),)
$(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/sysdep-$(SUBARCH) $(ARCH_DIR)/include/sysdep
else
$(Q)cd $(ARCH_DIR)/include && ln -sf sysdep-$(SUBARCH) sysdep
$(Q)cd $(ARCH_DIR)/include && ln -fsn sysdep-$(SUBARCH) sysdep
endif

$(ARCH_DIR)/os:
@echo ' SYMLINK $@'
ifneq ($(KBUILD_SRC),)
$(Q)ln -fsn $(srctree)/$(ARCH_DIR)/os-$(OS) $(ARCH_DIR)/os
else
$(Q)cd $(ARCH_DIR) && ln -sf os-$(OS) os
$(Q)cd $(ARCH_DIR) && ln -fsn os-$(OS) os
endif

# Generated files
Expand Down

0 comments on commit fcbaa08

Please sign in to comment.