MCPcopy Create free account
hub / github.com/F-Stack/f-stack / shm_truncate

Function shm_truncate

freebsd/kern/uipc_shm.c:464–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464static int
465shm_truncate(struct file *fp, off_t length, struct ucred *active_cred,
466 struct thread *td)
467{
468 struct shmfd *shmfd;
469#ifdef MAC
470 int error;
471#endif
472
473 shmfd = fp->f_data;
474#ifdef MAC
475 error = mac_posixshm_check_truncate(active_cred, fp->f_cred, shmfd);
476 if (error)
477 return (error);
478#endif
479 return (shm_dotruncate(shmfd, length));
480}
481
482int
483shm_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred,

Callers

nothing calls this directly

Calls 2

shm_dotruncateFunction · 0.85

Tested by

no test coverage detected