Deleted Added
full compact
svr4_stream.c (89308) svr4_stream.c (89319)
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

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

22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
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

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

22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 * $FreeBSD: head/sys/compat/svr4/svr4_stream.c 89308 2002-01-13 12:07:15Z alfred $
30 * $FreeBSD: head/sys/compat/svr4/svr4_stream.c 89319 2002-01-14 00:13:45Z alfred $
31 */
32
33/*
34 * Pretend that we have streams...
35 * Yes, this is gross.
36 *
37 * ToDo: The state machine for getmsg needs re-thinking
38 */

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

1712int
1713svr4_sys_putmsg(td, uap)
1714 register struct thread *td;
1715 struct svr4_sys_putmsg_args *uap;
1716{
1717 struct file *fp;
1718 int error;
1719
31 */
32
33/*
34 * Pretend that we have streams...
35 * Yes, this is gross.
36 *
37 * ToDo: The state machine for getmsg needs re-thinking
38 */

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

1712int
1713svr4_sys_putmsg(td, uap)
1714 register struct thread *td;
1715 struct svr4_sys_putmsg_args *uap;
1716{
1717 struct file *fp;
1718 int error;
1719
1720 fp = ffind_hold(td, uap->fd);
1721 if (fp == NULL) {
1720 if ((error = fget(td, uap->fd, &fp)) != 0) {
1722#ifdef DEBUG_SVR4
1723 uprintf("putmsg: bad fp\n");
1724#endif
1725 return EBADF;
1726 }
1727 error = svr4_do_putmsg(td, uap, fp);
1728 fdrop(fp, td);
1729 return (error);

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

1900int
1901svr4_sys_getmsg(td, uap)
1902 struct thread *td;
1903 struct svr4_sys_getmsg_args *uap;
1904{
1905 struct file *fp;
1906 int error;
1907
1721#ifdef DEBUG_SVR4
1722 uprintf("putmsg: bad fp\n");
1723#endif
1724 return EBADF;
1725 }
1726 error = svr4_do_putmsg(td, uap, fp);
1727 fdrop(fp, td);
1728 return (error);

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

1899int
1900svr4_sys_getmsg(td, uap)
1901 struct thread *td;
1902 struct svr4_sys_getmsg_args *uap;
1903{
1904 struct file *fp;
1905 int error;
1906
1908 fp = ffind_hold(td, uap->fd);
1909 if (fp == NULL) {
1907 if ((error = fget(td, uap->fd, &fp)) != 0) {
1910#ifdef DEBUG_SVR4
1911 uprintf("getmsg: bad fp\n");
1912#endif
1913 return EBADF;
1914 }
1915 error = svr4_do_getmsg(td, uap, fp);
1916 fdrop(fp, td);
1917 return (error);

--- 385 unchanged lines hidden ---
1908#ifdef DEBUG_SVR4
1909 uprintf("getmsg: bad fp\n");
1910#endif
1911 return EBADF;
1912 }
1913 error = svr4_do_getmsg(td, uap, fp);
1914 fdrop(fp, td);
1915 return (error);

--- 385 unchanged lines hidden ---