]> git.proxmox.com Git - qemu.git/blobdiff - os-posix.c
rng-egd: remove redundant free
[qemu.git] / os-posix.c
index f855abb09a2d2ad4cfea51e170e8b2f69cbd078c..d39261d84949243cfc407d93603eb4d66a0d0586 100644 (file)
@@ -36,7 +36,7 @@
 
 /* Needed early for CONFIG_BSD etc. */
 #include "config-host.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
 #include "net/slirp.h"
 #include "qemu-options.h"
 
@@ -193,7 +193,6 @@ void os_parse_cmd_args(int index, const char *optarg)
         break;
 #endif
     }
-    return;
 }
 
 static void change_process_uid(void)
@@ -364,3 +363,15 @@ bool is_daemonized(void)
 {
     return daemonize;
 }
+
+int os_mlock(void)
+{
+    int ret = 0;
+
+    ret = mlockall(MCL_CURRENT | MCL_FUTURE);
+    if (ret < 0) {
+        perror("mlockall");
+    }
+
+    return ret;
+}