summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2015-01-29 13:44:18 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-03 14:53:53 +0000
commitf14e96a9cc7b0be01b31e0cff032181482b45751 (patch)
treebe4df0aa618fa1b186bfe77857fdcb2ad9c21797 /scripts
parent491d1db8d186f52a1372ebbcc97424882f61a673 (diff)
downloadpoky-f14e96a9cc7b0be01b31e0cff032181482b45751.tar.gz
runqemu-internal: get rid of annoying but harmless error message
If tap0 interface has been created by other users on the system, we would get error messages when using runqemu. Error messages are like below. Acquiring lockfile for tap0... touch: cannot touch ‘/tmp/qemu-tap-locks/tap0.lock’: Permission denied /buildarea2/chenqi/poky/scripts/runqemu-internal: line 139: /tmp/qemu-tap-locks/tap0.lock: Permission denied flock: 8: Bad file descriptor The system can still boot up because runqemu would try to create a new tap interface. So the error message above is harmless, yet somewhat annoying. This patch fixes the above problem. With this patch, the output would be as follows. Acquiring lockfile for tap0... Acquiring lockfile for /tmp/qemu-tap-locks/tap0.lock failed Setting up tap interface under sudo Acquiring lockfile for tap1... Running qemu-system-arm... (From OE-Core rev: 039c57257c4180b0688fc2ec1b03948276009b04) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu-internal6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 5711bd3802..a0a1e96eb4 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -138,7 +138,11 @@ else
138 return 1 138 return 1
139 fi 139 fi
140 140
141 touch $lockfile.lock 141 touch $lockfile.lock 2>/dev/null
142 if [ $? -ne 0 ]; then
143 echo "Acquiring lockfile for $lockfile.lock failed"
144 return 1
145 fi
142 exec 8>$lockfile.lock 146 exec 8>$lockfile.lock
143 flock -n -x 8 147 flock -n -x 8
144 if [ $? -ne 0 ]; then 148 if [ $? -ne 0 ]; then