procfs_note.c (77031) | procfs_note.c (87321) |
---|---|
1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 22 unchanged lines hidden (view full) --- 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * @(#)procfs_note.c 8.2 (Berkeley) 1/21/94 38 * | 1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 22 unchanged lines hidden (view full) --- 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * @(#)procfs_note.c 8.2 (Berkeley) 1/21/94 38 * |
39 * $FreeBSD: head/sys/fs/procfs/procfs_note.c 77031 2001-05-23 09:42:29Z ru $ | 39 * $FreeBSD: head/sys/fs/procfs/procfs_note.c 87321 2001-12-04 01:35:06Z des $ |
40 */ 41 42#include <sys/param.h> | 40 */ 41 42#include <sys/param.h> |
43#include <sys/vnode.h> | 43#include <sys/lock.h> 44#include <sys/mutex.h> 45#include <sys/sbuf.h> 46 47#include <fs/pseudofs/pseudofs.h> |
44#include <fs/procfs/procfs.h> 45 46int | 48#include <fs/procfs/procfs.h> 49 50int |
47procfs_donote(curp, p, pfs, uio) 48 struct proc *curp; 49 struct proc *p; 50 struct pfsnode *pfs; 51 struct uio *uio; | 51procfs_doprocnote(PFS_FILL_ARGS) |
52{ | 52{ |
53 int xlen; 54 int error; 55 char note[PROCFS_NOTELEN+1]; 56 57 if (uio->uio_rw != UIO_WRITE) 58 return (EINVAL); 59 60 xlen = PROCFS_NOTELEN; 61 error = vfs_getuserstr(uio, note, &xlen); 62 if (error) 63 return (error); 64 | 53 sbuf_trim(sb); 54 sbuf_finish(sb); |
65 /* send to process's notify function */ 66 return (EOPNOTSUPP); 67} | 55 /* send to process's notify function */ 56 return (EOPNOTSUPP); 57} |