提交 70678b82 编写于 作者: A Anthony Liguori

fips: fix build on !Linux

Commit 0f66998f 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: NAnthony Liguori <aliguori@us.ibm.com>
上级 b34bd5e5
...@@ -188,6 +188,11 @@ void os_parse_cmd_args(int index, const char *optarg) ...@@ -188,6 +188,11 @@ void os_parse_cmd_args(int index, const char *optarg)
case QEMU_OPTION_daemonize: case QEMU_OPTION_daemonize:
daemonize = 1; daemonize = 1;
break; break;
#if defined(CONFIG_LINUX)
case QEMU_OPTION_enablefips:
fips_set_state(true);
break;
#endif
} }
return; return;
} }
......
...@@ -3199,9 +3199,6 @@ int main(int argc, char **argv, char **envp) ...@@ -3199,9 +3199,6 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_qtest_log: case QEMU_OPTION_qtest_log:
qtest_log = optarg; qtest_log = optarg;
break; break;
case QEMU_OPTION_enablefips:
fips_set_state(true);
break;
default: default:
os_parse_cmd_args(popt->index, optarg); os_parse_cmd_args(popt->index, optarg);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册