Deleted Added
full compact
vfs_extattr.c (130187) vfs_extattr.c (130344)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
35 */
36
37#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/vfs_extattr.c 130187 2004-06-07 12:19:55Z pjd $");
38__FBSDID("$FreeBSD: head/sys/kern/vfs_extattr.c 130344 2004-06-11 11:16:26Z phk $");
39
40#include "opt_compat.h"
41#include "opt_mac.h"
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/bio.h>
46#include <sys/buf.h>

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

1728 return (error);
1729 }
1730 fp->f_offset = offset;
1731 *(off_t *)(td->td_retval) = fp->f_offset;
1732 fdrop(fp, td);
1733 return (0);
1734}
1735
39
40#include "opt_compat.h"
41#include "opt_mac.h"
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/bio.h>
46#include <sys/buf.h>

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

1728 return (error);
1729 }
1730 fp->f_offset = offset;
1731 *(off_t *)(td->td_retval) = fp->f_offset;
1732 fdrop(fp, td);
1733 return (0);
1734}
1735
1736#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
1736#if defined(COMPAT_43)
1737/*
1738 * Reposition read/write file offset.
1739 */
1740#ifndef _SYS_SYSPROTO_H_
1741struct olseek_args {
1742 int fd;
1743 long offset;
1744 int whence;

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

1883 vp = nd.ni_vp;
1884
1885 error = vn_access(vp, uap->flags, td->td_ucred, td);
1886 NDFREE(&nd, NDF_ONLY_PNBUF);
1887 vput(vp);
1888 return (error);
1889}
1890
1737/*
1738 * Reposition read/write file offset.
1739 */
1740#ifndef _SYS_SYSPROTO_H_
1741struct olseek_args {
1742 int fd;
1743 long offset;
1744 int whence;

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

1883 vp = nd.ni_vp;
1884
1885 error = vn_access(vp, uap->flags, td->td_ucred, td);
1886 NDFREE(&nd, NDF_ONLY_PNBUF);
1887 vput(vp);
1888 return (error);
1889}
1890
1891#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
1891#if defined(COMPAT_43)
1892/*
1893 * Get file status; this version follows links.
1894 */
1895#ifndef _SYS_SYSPROTO_H_
1896struct ostat_args {
1897 char *path;
1898 struct ostat *ub;
1899};

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

1986 ost->st_atime = st->st_atime;
1987 ost->st_mtime = st->st_mtime;
1988 ost->st_ctime = st->st_ctime;
1989 ost->st_blksize = st->st_blksize;
1990 ost->st_blocks = st->st_blocks;
1991 ost->st_flags = st->st_flags;
1992 ost->st_gen = st->st_gen;
1993}
1892/*
1893 * Get file status; this version follows links.
1894 */
1895#ifndef _SYS_SYSPROTO_H_
1896struct ostat_args {
1897 char *path;
1898 struct ostat *ub;
1899};

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

1986 ost->st_atime = st->st_atime;
1987 ost->st_mtime = st->st_mtime;
1988 ost->st_ctime = st->st_ctime;
1989 ost->st_blksize = st->st_blksize;
1990 ost->st_blocks = st->st_blocks;
1991 ost->st_flags = st->st_flags;
1992 ost->st_gen = st->st_gen;
1993}
1994#endif /* COMPAT_43 || COMPAT_SUNOS */
1994#endif /* COMPAT_43 */
1995
1996/*
1997 * Get file status; this version follows links.
1998 */
1999#ifndef _SYS_SYSPROTO_H_
2000struct stat_args {
2001 char *path;
2002 struct stat *ub;

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

2960 error = VOP_SETATTR(vp, &vattr, fp->f_cred, td);
2961 }
2962 VOP_UNLOCK(vp, 0, td);
2963 vn_finished_write(mp);
2964 fdrop(fp, td);
2965 return (error);
2966}
2967
1995
1996/*
1997 * Get file status; this version follows links.
1998 */
1999#ifndef _SYS_SYSPROTO_H_
2000struct stat_args {
2001 char *path;
2002 struct stat *ub;

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

2960 error = VOP_SETATTR(vp, &vattr, fp->f_cred, td);
2961 }
2962 VOP_UNLOCK(vp, 0, td);
2963 vn_finished_write(mp);
2964 fdrop(fp, td);
2965 return (error);
2966}
2967
2968#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
2968#if defined(COMPAT_43)
2969/*
2970 * Truncate a file given its path name.
2971 */
2972#ifndef _SYS_SYSPROTO_H_
2973struct otruncate_args {
2974 char *path;
2975 long length;
2976};

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

3016 int pad;
3017 off_t length;
3018 } */ nuap;
3019
3020 nuap.fd = uap->fd;
3021 nuap.length = uap->length;
3022 return (ftruncate(td, &nuap));
3023}
2969/*
2970 * Truncate a file given its path name.
2971 */
2972#ifndef _SYS_SYSPROTO_H_
2973struct otruncate_args {
2974 char *path;
2975 long length;
2976};

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

3016 int pad;
3017 off_t length;
3018 } */ nuap;
3019
3020 nuap.fd = uap->fd;
3021 nuap.length = uap->length;
3022 return (ftruncate(td, &nuap));
3023}
3024#endif /* COMPAT_43 || COMPAT_SUNOS */
3024#endif /* COMPAT_43 */
3025
3026/*
3027 * Sync an open file.
3028 */
3029#ifndef _SYS_SYSPROTO_H_
3030struct fsync_args {
3031 int fd;
3032};

--- 1782 unchanged lines hidden ---
3025
3026/*
3027 * Sync an open file.
3028 */
3029#ifndef _SYS_SYSPROTO_H_
3030struct fsync_args {
3031 int fd;
3032};

--- 1782 unchanged lines hidden ---