Deleted Added
sdiff udiff text old ( 193014 ) new ( 224778 )
full compact
1/*-
2 * Copyright (c) 1998 Mark Newton. All rights reserved.
3 * Copyright (c) 1994, 1996 Christos Zoulas. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31/*
32 * Pretend that we have streams...
33 * Yes, this is gross.
34 *
35 * ToDo: The state machine for getmsg needs re-thinking
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/compat/svr4/svr4_stream.c 193014 2009-05-29 05:58:46Z delphij $");
40
41#include "opt_compat.h"
42#include "opt_ktrace.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/fcntl.h>
47#include <sys/filedesc.h>
48#include <sys/filio.h>
49#include <sys/lock.h>
50#include <sys/malloc.h>
51#include <sys/file.h> /* Must come after sys/malloc.h */
52#include <sys/mbuf.h>
53#include <sys/mutex.h>

--- 1389 unchanged lines hidden (view full) ---

1443int
1444svr4_sys_putmsg(td, uap)
1445 struct thread *td;
1446 struct svr4_sys_putmsg_args *uap;
1447{
1448 struct file *fp;
1449 int error;
1450
1451 if ((error = fget(td, uap->fd, &fp)) != 0) {
1452#ifdef DEBUG_SVR4
1453 uprintf("putmsg: bad fp\n");
1454#endif
1455 return EBADF;
1456 }
1457 error = svr4_do_putmsg(td, uap, fp);
1458 fdrop(fp, td);
1459 return (error);

--- 155 unchanged lines hidden (view full) ---

1615int
1616svr4_sys_getmsg(td, uap)
1617 struct thread *td;
1618 struct svr4_sys_getmsg_args *uap;
1619{
1620 struct file *fp;
1621 int error;
1622
1623 if ((error = fget(td, uap->fd, &fp)) != 0) {
1624#ifdef DEBUG_SVR4
1625 uprintf("getmsg: bad fp\n");
1626#endif
1627 return EBADF;
1628 }
1629 error = svr4_do_getmsg(td, uap, fp);
1630 fdrop(fp, td);
1631 return (error);

--- 406 unchanged lines hidden ---