]> git.proxmox.com Git - mirror_qemu.git/commit - util/module.c
module: Don't load the same module if requested multiple times
authorFam Zheng <famz@redhat.com>
Mon, 5 Sep 2016 02:50:44 +0000 (10:50 +0800)
committerMax Reitz <mreitz@redhat.com>
Fri, 7 Oct 2016 12:14:06 +0000 (14:14 +0200)
commitdffa41b48651c4002af02e80b7459e56a77152c7
tree909495655b4efc4182f9814d634d89ca8188996e
parent159975f38b2c88cd7b1fef511ba86dd7266a9f4e
module: Don't load the same module if requested multiple times

Use a hash table to keep record of all loaded modules, and return early
if the requested module is already loaded.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1473043845-13197-3-git-send-email-famz@redhat.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
util/module.c