aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorGuoyi Tu <tugy@chinatelecom.cn>2023-01-16 12:56:00 +0800
committerLaurent Vivier <laurent@vivier.eu>2023-01-16 17:42:17 +0100
commit0038e9a22619387a905b57888fb34c5d8ece720e (patch)
tree913a823fd6275c938b3e46489928888a2972ec63 /backends
parenta8d6abe1292e1db1ad9be5b2b124b9c01bcda094 (diff)
Call qemu_socketpair() instead of socketpair() when possible
As qemu_socketpair() was introduced in commit 3c63b4e9 ("oslib-posix: Introduce qemu_socketpair()"), it's time to replace the other existing socketpair() calls with qemu_socketpair() if possible Signed-off-by: Guoyi Tu <tugy@chinatelecom.cn> Acked-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <cd28916a-f1f3-b54e-6ade-8a3647c3a9a5@chinatelecom.cn> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'backends')
-rw-r--r--backends/tpm/tpm_emulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/tpm/tpm_emulator.c b/backends/tpm/tpm_emulator.c
index 49cc3d749d..67e7b212e3 100644
--- a/backends/tpm/tpm_emulator.c
+++ b/backends/tpm/tpm_emulator.c
@@ -553,7 +553,7 @@ static int tpm_emulator_prepare_data_fd(TPMEmulator *tpm_emu)
Error *err = NULL;
int fds[2] = { -1, -1 };
- if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
+ if (qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
error_report("tpm-emulator: Failed to create socketpair");
return -1;
}