Lines Matching +full:no +full:- +full:bf

3 /*-
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
37 * Jan-Simon Pendry.
54 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
68 * Copyright (c) 1993 Jan-Simon Pendry
71 * Jan-Simon Pendry.
92 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
144 struct vnode *vp = ap->a_vp; in procfs_rw()
145 struct uio *uio = ap->a_uio; in procfs_rw()
152 if (uio->uio_offset < 0) in procfs_rw()
156 procfs_proc_lock(vp->v_mount, pfs->pfs_pid, &p, ESRCH)) != 0) in procfs_rw()
167 mutex_enter(p->p_lock); in procfs_rw()
168 error = kauth_authorize_process(curl->l_cred, KAUTH_PROCESS_PROCFS, in procfs_rw()
169 p, pfs, KAUTH_ARG(M2K(uio->uio_rw)), NULL); in procfs_rw()
170 mutex_exit(p->p_lock); in procfs_rw()
177 mutex_enter(p->p_lock); in procfs_rw()
178 LIST_FOREACH(l, &p->p_lwps, l_sibling) { in procfs_rw()
179 if (l->l_stat != LSZOMB) in procfs_rw()
182 /* Process is exiting if no-LWPS or all LWPs are LSZOMB */ in procfs_rw()
184 mutex_exit(p->p_lock); in procfs_rw()
190 mutex_exit(p->p_lock); in procfs_rw()
192 switch (pfs->pfs_type) { in procfs_rw()
343 * Get a string from userland into (bf). Strip a trailing
350 * EINVAL: file offset is non-zero.
355 vfs_getuserstr(struct uio *uio, char *bf, int *buflenp) in vfs_getuserstr() argument
360 if (uio->uio_offset != 0) in vfs_getuserstr()
366 if (xlen < uio->uio_resid) in vfs_getuserstr()
368 xlen = uio->uio_resid; in vfs_getuserstr()
370 if ((error = uiomove(bf, xlen, uio)) != 0) in vfs_getuserstr()
374 uio->uio_offset = 0; in vfs_getuserstr()
377 bf[xlen] = '\0'; in vfs_getuserstr()
378 xlen = strlen(bf); in vfs_getuserstr()
379 if (xlen > 0 && bf[xlen-1] == '\n') in vfs_getuserstr()
380 bf[--xlen] = '\0'; in vfs_getuserstr()
387 vfs_findname(const vfs_namemap_t *nm, const char *bf, int buflen) in vfs_findname() argument
390 for (; nm->nm_name; nm++) in vfs_findname()
391 if (memcmp(bf, nm->nm_name, buflen+1) == 0) in vfs_findname()
400 const int flags = VFSTOPROC(mp)->pmnt_flags; in procfs_use_linux_compat()
427 if (tp != NULL && !rw_tryenter(&tp->p_reflock, RW_READER)) in procfs_proc_lock()
440 rw_exit(&p->p_reflock); in procfs_proc_unlock()
447 const char *ename = p->p_emul->e_name; in procfs_doemul()