Changeset View
Changeset View
Standalone View
Standalone View
emulators/qemu-sbruno/files/patch-bsd-misc.c
- This file was added.
--- qemu-bsd-user-8dcfea1/bsd-user/bsd-misc.c.orig 2018-02-06 21:54:42.932241000 +0000 | |||||
+++ qemu-bsd-user-8dcfea1/bsd-user/bsd-misc.c 2018-02-06 21:57:48.134412000 +0000 | |||||
@@ -166,8 +166,8 @@ | |||||
return -TARGET_EFAULT; | |||||
} | |||||
- /* msg_first and msg_last are not used by IPC_SET/IPC_STAT in kernel. */ | |||||
- host_md->msg_first = host_md->msg_last = NULL; | |||||
+ memset(host_md, 0, sizeof(struct msqid_ds)); | |||||
+ /* kmsg_first and kmsg_last are not used by IPC_SET/IPC_STAT in kernel. */ | |||||
host_md->msg_cbytes = tswapal(target_md->msg_cbytes); | |||||
host_md->msg_qnum = tswapal(target_md->msg_qnum); | |||||
host_md->msg_qbytes = tswapal(target_md->msg_qbytes); | |||||
@@ -193,7 +193,8 @@ | |||||
return -TARGET_EFAULT; | |||||
} | |||||
- /* msg_first and msg_last are not used by IPC_SET/IPC_STAT in kernel. */ | |||||
+ memset(target_md, 0, sizeof(struct msqid_ds)); | |||||
+ /* kmsg_first and kmsg_last are not used by IPC_SET/IPC_STAT in kernel. */ | |||||
target_md->msg_cbytes = tswapal(host_md->msg_cbytes); | |||||
target_md->msg_qnum = tswapal(host_md->msg_qnum); | |||||
target_md->msg_qbytes = tswapal(host_md->msg_qbytes); |