* [PATCH 0/1] runqemu-internal: get rid of annoying but harmless error message
@ 2015-01-29 5:44 Chen Qi
2015-01-29 5:44 ` [PATCH 1/1] " Chen Qi
0 siblings, 1 reply; 2+ messages in thread
From: Chen Qi @ 2015-01-29 5:44 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 2a775ebbb175dd70fc7228607c306d4ccb9e4ba4:
net-tools: Fix rerunning of do_patch task (2015-01-23 14:32:40 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib ChenQi/runqemu-internal-error-message
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/runqemu-internal-error-message
Chen Qi (1):
runqemu-internal: get rid of annoying but harmless error message
scripts/runqemu-internal | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] runqemu-internal: get rid of annoying but harmless error message
2015-01-29 5:44 [PATCH 0/1] runqemu-internal: get rid of annoying but harmless error message Chen Qi
@ 2015-01-29 5:44 ` Chen Qi
0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2015-01-29 5:44 UTC (permalink / raw)
To: openembedded-core
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...
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
scripts/runqemu-internal | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 5711bd3..a0a1e96 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -138,7 +138,11 @@ else
return 1
fi
- touch $lockfile.lock
+ touch $lockfile.lock 2>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Acquiring lockfile for $lockfile.lock failed"
+ return 1
+ fi
exec 8>$lockfile.lock
flock -n -x 8
if [ $? -ne 0 ]; then
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-29 5:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 5:44 [PATCH 0/1] runqemu-internal: get rid of annoying but harmless error message Chen Qi
2015-01-29 5:44 ` [PATCH 1/1] " Chen Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox