vfs_vnops.c (bf876fcd34eac7f46d8bea6eeaa7291ab9337b1d) | vfs_vnops.c (510ea843baf66ae678ca6ddbbbca9816177be5b0) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 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. --- 186 unchanged lines hidden (view full) --- 195 if (vp->v_type == VLNK) { 196 error = EMLINK; 197 goto bad; 198 } 199 if (vp->v_type == VSOCK) { 200 error = EOPNOTSUPP; 201 goto bad; 202 } | 1/*- 2 * Copyright (c) 1982, 1986, 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. --- 186 unchanged lines hidden (view full) --- 195 if (vp->v_type == VLNK) { 196 error = EMLINK; 197 goto bad; 198 } 199 if (vp->v_type == VSOCK) { 200 error = EOPNOTSUPP; 201 goto bad; 202 } |
203 if (vp->v_type != VDIR && fmode & O_DIRECTORY) { 204 error = ENOTDIR; 205 goto bad; 206 } |
|
203 accmode = 0; 204 if (fmode & (FWRITE | O_TRUNC)) { 205 if (vp->v_type == VDIR) { 206 error = EISDIR; 207 goto bad; 208 } 209 accmode |= VWRITE; 210 } --- 562 unchanged lines hidden (view full) --- 773 sb->st_mode = mode; 774 sb->st_nlink = vap->va_nlink; 775 sb->st_uid = vap->va_uid; 776 sb->st_gid = vap->va_gid; 777 sb->st_rdev = vap->va_rdev; 778 if (vap->va_size > OFF_MAX) 779 return (EOVERFLOW); 780 sb->st_size = vap->va_size; | 207 accmode = 0; 208 if (fmode & (FWRITE | O_TRUNC)) { 209 if (vp->v_type == VDIR) { 210 error = EISDIR; 211 goto bad; 212 } 213 accmode |= VWRITE; 214 } --- 562 unchanged lines hidden (view full) --- 777 sb->st_mode = mode; 778 sb->st_nlink = vap->va_nlink; 779 sb->st_uid = vap->va_uid; 780 sb->st_gid = vap->va_gid; 781 sb->st_rdev = vap->va_rdev; 782 if (vap->va_size > OFF_MAX) 783 return (EOVERFLOW); 784 sb->st_size = vap->va_size; |
781 sb->st_atimespec = vap->va_atime; 782 sb->st_mtimespec = vap->va_mtime; 783 sb->st_ctimespec = vap->va_ctime; 784 sb->st_birthtimespec = vap->va_birthtime; | 785 sb->st_atim = vap->va_atime; 786 sb->st_mtim = vap->va_mtime; 787 sb->st_ctim = vap->va_ctime; 788 sb->st_birthtim = vap->va_birthtime; |
785 786 /* 787 * According to www.opengroup.org, the meaning of st_blksize is 788 * "a filesystem-specific preferred I/O block size for this 789 * object. In some filesystem types, this may vary from file 790 * to file" 791 * Default to PAGE_SIZE after much discussion. 792 * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. --- 545 unchanged lines hidden --- | 789 790 /* 791 * According to www.opengroup.org, the meaning of st_blksize is 792 * "a filesystem-specific preferred I/O block size for this 793 * object. In some filesystem types, this may vary from file 794 * to file" 795 * Default to PAGE_SIZE after much discussion. 796 * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. --- 545 unchanged lines hidden --- |