]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: fix permission check of /dev/vhost-net
authorChen Qi <Qi.Chen@windriver.com>
Mon, 10 Aug 2020 06:57:29 +0000 (14:57 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Aug 2020 19:35:32 +0000 (20:35 +0100)
The code should check /dev/vhost-net instead of /dev/kvm. And
the permission check logically belongs to the part when kvm-vhost
is enabled. Also fix the URL to point to the correct wiki page.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index f2168c18a3dc729c7ed54bc1d21fe2ea9e74a185..c40acc4a86f06aef853286d6517f5e5c58a6c3f9 100755 (executable)
@@ -585,10 +585,10 @@ class BaseConfig(object):
                 logger.error("For further help see:")
                 raise RunQemuError(yocto_paravirt_kvm_wiki)
 
-        if not os.access(dev_kvm, os.W_OK|os.R_OK):
+            if not os.access(dev_vhost, os.W_OK|os.R_OK):
                 logger.error("You have no read or write permission on /dev/vhost-net.")
                 logger.error("Please change the ownership of this file as described at:")
-                raise RunQemuError(yocto_kvm_wiki)
+                raise RunQemuError(yocto_paravirt_kvm_wiki)
 
     def check_fstype(self):
         """Check and setup FSTYPE"""