| 1108 | } |
| 1109 | |
| 1110 | int |
| 1111 | sys_msgsnd(struct thread *td, struct msgsnd_args *uap) |
| 1112 | { |
| 1113 | int error; |
| 1114 | long mtype; |
| 1115 | |
| 1116 | DPRINTF(("call to msgsnd(%d, %p, %zu, %d)\n", uap->msqid, uap->msgp, |
| 1117 | uap->msgsz, uap->msgflg)); |
| 1118 | |
| 1119 | if ((error = copyin(uap->msgp, &mtype, sizeof(mtype))) != 0) { |
| 1120 | DPRINTF(("error %d copying the message type\n", error)); |
| 1121 | return (error); |
| 1122 | } |
| 1123 | return (kern_msgsnd(td, uap->msqid, |
| 1124 | (const char *)uap->msgp + sizeof(mtype), |
| 1125 | uap->msgsz, uap->msgflg, mtype)); |
| 1126 | } |
| 1127 | |
| 1128 | #ifndef _SYS_SYSPROTO_H_ |
| 1129 | struct msgrcv_args { |
nothing calls this directly
no test coverage detected