Deleted Added
full compact
vfs_extattr.c (109153) vfs_extattr.c (109623)
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.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
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.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
39 * $FreeBSD: head/sys/kern/vfs_extattr.c 109153 2003-01-13 00:33:17Z dillon $
39 * $FreeBSD: head/sys/kern/vfs_extattr.c 109623 2003-01-21 08:56:16Z alfred $
40 */
41
42/* For 4.3 integer FS ID compatibility */
43#include "opt_compat.h"
44#include "opt_mac.h"
45
46#include <sys/param.h>
47#include <sys/systm.h>

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

1099 struct vattr vattr;
1100 char *syspath;
1101 int error;
1102 struct nameidata nd;
1103
1104 if (segflg == UIO_SYSSPACE) {
1105 syspath = path;
1106 } else {
40 */
41
42/* For 4.3 integer FS ID compatibility */
43#include "opt_compat.h"
44#include "opt_mac.h"
45
46#include <sys/param.h>
47#include <sys/systm.h>

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

1099 struct vattr vattr;
1100 char *syspath;
1101 int error;
1102 struct nameidata nd;
1103
1104 if (segflg == UIO_SYSSPACE) {
1105 syspath = path;
1106 } else {
1107 syspath = uma_zalloc(namei_zone, M_WAITOK);
1107 syspath = uma_zalloc(namei_zone, 0);
1108 if ((error = copyinstr(path, syspath, MAXPATHLEN, NULL)) != 0)
1109 goto out;
1110 }
1111restart:
1112 bwillwrite();
1113 NDINIT(&nd, CREATE, LOCKPARENT | NOOBJ | SAVENAME, segflg, link, td);
1114 if ((error = namei(&nd)) != 0)
1115 goto out;

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

3105 fp->f_offset = auio.uio_offset;
3106 } else
3107# endif
3108 {
3109 kuio = auio;
3110 kuio.uio_iov = &kiov;
3111 kuio.uio_segflg = UIO_SYSSPACE;
3112 kiov.iov_len = uap->count;
1108 if ((error = copyinstr(path, syspath, MAXPATHLEN, NULL)) != 0)
1109 goto out;
1110 }
1111restart:
1112 bwillwrite();
1113 NDINIT(&nd, CREATE, LOCKPARENT | NOOBJ | SAVENAME, segflg, link, td);
1114 if ((error = namei(&nd)) != 0)
1115 goto out;

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

3105 fp->f_offset = auio.uio_offset;
3106 } else
3107# endif
3108 {
3109 kuio = auio;
3110 kuio.uio_iov = &kiov;
3111 kuio.uio_segflg = UIO_SYSSPACE;
3112 kiov.iov_len = uap->count;
3113 MALLOC(dirbuf, caddr_t, uap->count, M_TEMP, M_WAITOK);
3113 MALLOC(dirbuf, caddr_t, uap->count, M_TEMP, 0);
3114 kiov.iov_base = dirbuf;
3115 error = VOP_READDIR(vp, &kuio, fp->f_cred, &eofflag,
3116 NULL, NULL);
3117 fp->f_offset = kuio.uio_offset;
3118 if (error == 0) {
3119 readcnt = uap->count - kuio.uio_resid;
3120 edp = (struct dirent *)&dirbuf[readcnt];
3121 for (dp = (struct dirent *)dirbuf; dp < edp; ) {

--- 1184 unchanged lines hidden ---
3114 kiov.iov_base = dirbuf;
3115 error = VOP_READDIR(vp, &kuio, fp->f_cred, &eofflag,
3116 NULL, NULL);
3117 fp->f_offset = kuio.uio_offset;
3118 if (error == 0) {
3119 readcnt = uap->count - kuio.uio_resid;
3120 edp = (struct dirent *)&dirbuf[readcnt];
3121 for (dp = (struct dirent *)dirbuf; dp < edp; ) {

--- 1184 unchanged lines hidden ---