]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
fips: fix build on !Linux
authorAnthony Liguori <aliguori@us.ibm.com>
Fri, 3 Aug 2012 23:28:37 +0000 (18:28 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 3 Aug 2012 23:28:37 +0000 (18:28 -0500)
Commit 0f66998 makes -enable-fips conditional on Linux hosts but then uses it
unconditionally in vl.c.

Fix this by moving the fips handling to os-posix.c and adding a condition.

Cc: Paul Moore <pmoore@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
os-posix.c
vl.c

index daf3d6f6f381105a04b09ec5efa54a756ddd30a6..79fa2288e486d85888ef41136cef019b46de4257 100644 (file)
@@ -188,6 +188,11 @@ void os_parse_cmd_args(int index, const char *optarg)
     case QEMU_OPTION_daemonize:
         daemonize = 1;
         break;
+#if defined(CONFIG_LINUX)
+    case QEMU_OPTION_enablefips:
+        fips_set_state(true);
+        break;
+#endif
     }
     return;
 }
diff --git a/vl.c b/vl.c
index 8cda85f084a70b48bb564b17662c856de64807fb..6d2ce45fefe3e33986fc7d5b62ba234ca245c44f 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3199,9 +3199,6 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_qtest_log:
                 qtest_log = optarg;
                 break;
-            case QEMU_OPTION_enablefips:
-                fips_set_state(true);
-                break;
             default:
                 os_parse_cmd_args(popt->index, optarg);
             }