1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. 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
--- 16 unchanged lines hidden (view full) ---
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/kern/uipc_usrreq.c 130640 2004-06-17 17:16:53Z phk $");
34
35#include "opt_mac.h"
36
37#include <sys/param.h>
38#include <sys/domain.h>
39#include <sys/fcntl.h>
40#include <sys/malloc.h> /* XXX must be before <sys/file.h> */
41#include <sys/file.h>
--- 400 unchanged lines hidden (view full) ---
442 if (unp == NULL)
443 return (EINVAL);
444 UNP_LOCK();
445 sb->st_blksize = so->so_snd.sb_hiwat;
446 if (so->so_type == SOCK_STREAM && unp->unp_conn != NULL) {
447 so2 = unp->unp_conn->unp_socket;
448 sb->st_blksize += so2->so_rcv.sb_cc;
449 }
450 sb->st_dev = NODEV;
451 if (unp->unp_ino == 0)
452 unp->unp_ino = (++unp_ino == 0) ? ++unp_ino : unp_ino;
453 sb->st_ino = unp->unp_ino;
454 UNP_UNLOCK();
455 return (0);
456}
457
458static int
--- 1211 unchanged lines hidden ---
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. 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
--- 16 unchanged lines hidden (view full) ---
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/kern/uipc_usrreq.c 130640 2004-06-17 17:16:53Z phk $");
34
35#include "opt_mac.h"
36
37#include <sys/param.h>
38#include <sys/domain.h>
39#include <sys/fcntl.h>
40#include <sys/malloc.h> /* XXX must be before <sys/file.h> */
41#include <sys/file.h>
--- 400 unchanged lines hidden (view full) ---
442 if (unp == NULL)
443 return (EINVAL);
444 UNP_LOCK();
445 sb->st_blksize = so->so_snd.sb_hiwat;
446 if (so->so_type == SOCK_STREAM && unp->unp_conn != NULL) {
447 so2 = unp->unp_conn->unp_socket;
448 sb->st_blksize += so2->so_rcv.sb_cc;
449 }
450 sb->st_dev = NODEV;
451 if (unp->unp_ino == 0)
452 unp->unp_ino = (++unp_ino == 0) ? ++unp_ino : unp_ino;
453 sb->st_ino = unp->unp_ino;
454 UNP_UNLOCK();
455 return (0);
456}
457
458static int
--- 1211 unchanged lines hidden ---