Browse Source

fix busybox

Chia-Che Tsai 8 years ago
parent
commit
0885fd8050

+ 2 - 0
LibOS/shim/include/shim_fs.h

@@ -363,6 +363,8 @@ char * dentry_get_path (struct shim_dentry * dent, bool on_stack,
     } else {
         if (c != buffer && *(c - 1) == '/')
             c--;
+        if (c == buffer)
+            *(c++) = '/';
     }
 
     *c = 0;

+ 1 - 0
LibOS/shim/test/apps/Makefile

@@ -13,6 +13,7 @@ manifest_rules = \
 	-e 's:\$$(BIN):$(subst .manifest,,$(notdir $@)):g' \
 	-e 's:\$$(SHIMPATH):$(abspath ../../src/libsysdb.so):g' \
 	-e 's:\$$(GLIBCDIR):$(abspath $(glibc_dir))/:g' \
+	-e 's:\$$(HOSTNAME):$(shell hostname)/:g' \
 	$(extra_rules)
 
 %.manifest: %.manifest.template

+ 1 - 0
LibOS/shim/test/apps/busybox/busybox.manifest.template

@@ -8,6 +8,7 @@ loader.env.LD_LIBRARY_PATH = /lib:/lib/x86_64-linux-gnu
 loader.env.USERNAME =
 loader.env.HOME =
 loader.env.PWD =
+loader.env.HOSTNAME = $(HOSTNAME)
 loader.debug_type = none
 
 fs.mount.root.type = chroot