On 6/7/23 17:06, Steve Sakoman wrote:
From: Alexander Kanavin <[email protected]>
Signed-off-by: Alexander Kanavin <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
(cherry picked from commit 004d6bcb067ecf1d796801fa43a98820c4efd3c7)
Signed-off-by: Steve Sakoman <[email protected]>
---
scripts/runqemu | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 5a98abfffe..f275cf7813 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1062,6 +1062,17 @@ class BaseConfig(object):
self.set('NETWORK_CMD', '-netdev bridge,br=%s,id=net0,helper=%s
-device virtio-net-pci,netdev=net0 ' % (
self.net_bridge, os.path.join(self.bindir_native,
'qemu-oe-bridge-helper')))
+ def make_lock_dir(self, lockdir):
+ if not os.path.exists(lockdir):
+ # There might be a race issue when multi runqemu processess are
+ # running at the same time.
+ try:
+ os.mkdir(lockdir)
+ os.chmod(lockdir, 0o777)
+ except FileExistsError:
+ pass
+ return
Since it is now a function, could be rewritten as:
if os.path.exists(lockdir):
return
try:
...
Regardless:
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184003):
https://lists.openembedded.org/g/openembedded-core/message/184003
Mute This Topic: https://lists.openembedded.org/mt/99987348/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-