Lines Matching refs:buf

492 kern_shmctl_locked(struct thread *td, int shmid, int cmd, void *buf,
521 memcpy(buf, &shminfo, sizeof(shminfo));
533 memcpy(buf, &shm_info, sizeof(shm_info));
551 shmidp = (struct shmid_ds *)buf;
566 shmidp = (struct shmid_ds *)buf;
596 kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, size_t *bufsz)
601 error = kern_shmctl_locked(td, shmid, cmd, buf, bufsz);
610 struct shmid_ds *buf;
617 struct shmid_ds buf;
631 if ((error = copyin(uap->buf, &buf, sizeof(struct shmid_ds))))
635 error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&buf, &bufsz);
642 error = copyout(&buf, uap->buf, bufsz);
1439 ap.buf = PTRIN(uap->a4);
1471 if ((error = copyin(uap->buf, &u32.shmid_ds32,
1497 error = copyout(&u32.shminfo32, uap->buf,
1507 error = copyout(&u32.shm_info32, uap->buf,
1526 error = copyout(&u32.shmid_ds32, uap->buf,
1557 if ((error = copyin(uap->buf, &u32.shmid_ds32,
1583 error = copyout(&u32.shminfo32, uap->buf,
1593 error = copyout(&u32.shm_info32, uap->buf,
1610 error = copyout(&u32.shmid_ds32, uap->buf,
1631 struct shmid_ds_old *buf;
1639 struct shmid_ds buf;
1653 if ((error = copyin(uap->buf, &old, sizeof(old))))
1655 ipcperm_old2new(&old.shm_perm, &buf.shm_perm);
1656 CP(old, buf, shm_segsz);
1657 CP(old, buf, shm_lpid);
1658 CP(old, buf, shm_cpid);
1659 CP(old, buf, shm_nattch);
1660 CP(old, buf, shm_atime);
1661 CP(old, buf, shm_dtime);
1662 CP(old, buf, shm_ctime);
1665 error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&buf, &bufsz);
1673 ipcperm_new2old(&buf.shm_perm, &old.shm_perm);
1674 if (buf.shm_segsz > INT_MAX)
1677 CP(buf, old, shm_segsz);
1678 CP(buf, old, shm_lpid);
1679 CP(buf, old, shm_cpid);
1680 if (buf.shm_nattch > SHRT_MAX)
1683 CP(buf, old, shm_nattch);
1684 CP(buf, old, shm_atime);
1685 CP(buf, old, shm_dtime);
1686 CP(buf, old, shm_ctime);
1688 error = copyout(&old, uap->buf, sizeof(old));