[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST 1/2] uboot: use "readlink -f"



If the path is not a symlink, readlink by default returns empty string.
Use "-f" to always return canonical path. This fixes the problem that
xenpolicy file not getting loaded (because it is not a symlink).

Also change another spot that calls readlink to get xen binary path in
case in the future we decide to not use symlink.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 Osstest/Debian.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 6784024..b829878 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -162,7 +162,7 @@ sub setupboot_uboot ($$$$) {
            $flask_commands = <<END;
 
 setenv flask_policy_addr_r 0x1200000
-flaskpolicy=`readlink /boot/$flaskpolicy`
+flaskpolicy=`readlink -f /boot/$flaskpolicy`
 ext2load scsi 0 \\\${flask_policy_addr_r} \$flaskpolicy
 fdt mknod /chosen module\@2
 fdt set /chosen/module\@2 compatible "xen,xsm-policy" "xen,multiboot-module"
@@ -227,7 +227,7 @@ fi
 cp -n /boot/boot.xen /boot/boot.xen.bak
 cp -n /boot/boot.scr.xen /boot/boot.scr.xen.bak
 
-xen=`readlink /boot/$xen`
+xen=`readlink -f /boot/$xen`
 
 cat >/boot/boot.xen <<EOF
 ${load_dtb}
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.