2001-05-14 00:52:33 +02:00
|
|
|
|
.\" -*- nroff -*-
|
|
|
|
|
.\"
|
|
|
|
|
.\" Copyright (c) 1996 Doug Rabson
|
|
|
|
|
.\"
|
|
|
|
|
.\" All rights reserved.
|
|
|
|
|
.\"
|
|
|
|
|
.\" This program is free software.
|
|
|
|
|
.\"
|
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
|
.\" are met:
|
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
|
.\"
|
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
|
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
.\"
|
2001-12-23 01:24:24 +01:00
|
|
|
|
.\" %FreeBSD: src/share/man/man9/VOP_ATTRIB.9,v 1.9.2.2 2001/12/17 11:30:18 ru Exp %
|
2001-05-14 00:52:33 +02:00
|
|
|
|
.\"
|
2001-05-14 03:10:24 +02:00
|
|
|
|
.\" $FreeBSD$
|
2001-05-14 00:52:33 +02:00
|
|
|
|
.Dd July 24, 1996
|
|
|
|
|
.Os
|
|
|
|
|
.Dt VOP_ATTRIB 9
|
|
|
|
|
.Sh ̾<EFBFBD><EFBFBD>
|
|
|
|
|
.Nm VOP_GETATTR ,
|
|
|
|
|
.Nm VOP_SETATTR
|
|
|
|
|
.Nd <EFBFBD>ե<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD>ϥǥ<EFBFBD><EFBFBD>쥯<EFBFBD>ȥ<EFBFBD><EFBFBD><EFBFBD>°<EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.Sh <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2001-12-23 01:24:24 +01:00
|
|
|
|
.In sys/param.h
|
|
|
|
|
.In sys/vnode.h
|
2001-05-14 00:52:33 +02:00
|
|
|
|
.Ft int
|
|
|
|
|
.Fn VOP_GETATTR "struct vnode *vp" "struct vattr *vap" "struct ucred *cred" "struct proc *p"
|
|
|
|
|
.Ft int
|
|
|
|
|
.Fn VOP_SETATTR "struct vnode *vp" "struct vattr *vap" "struct ucred *cred" "struct proc *p"
|
|
|
|
|
.Sh <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD><EF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FBD>ξ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.Xr VOP_SETATTR 9
|
|
|
|
|
<EFBFBD><EFBFBD>°<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>줿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤ<EFBFBD> 0 <20><><EFBFBD>֤<EFBFBD><D6A4><EFBFBD>
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤ<EFBFBD>Ŭ<EFBFBD>ڤʥ<EFBFBD><EFBFBD>顼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɤ<EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.Sh <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.Bd -literal
|
|
|
|
|
int
|
|
|
|
|
vop_getattr(struct vnode *vp, struct vattr *vap,
|
|
|
|
|
struct ucred *cred, struct proc *p)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* *vap <20><><EFBFBD>ե<EFBFBD><D5A5><EFBFBD><EFBFBD>륷<EFBFBD><EBA5B7><EFBFBD>ƥफ<C6A5><E0A4AB><EFBFBD>ξ<EFBFBD><CEBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
...;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
vop_setattr(struct vnode *vp, struct vattr *vap,
|
|
|
|
|
struct ucred *cred, struct proc *p)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* <20><><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4>ʤ<EFBFBD>°<EFBFBD><C2B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
if ((vap->va_type != VNON) || (vap->va_nlink != VNOVAL) ||
|
|
|
|
|
(vap->va_fsid != VNOVAL) || (vap->va_fileid != VNOVAL) ||
|
|
|
|
|
(vap->va_blocksize != VNOVAL) || (vap->va_rdev != VNOVAL) ||
|
|
|
|
|
((int)vap->va_bytes != VNOVAL) || (vap->va_gen != VNOVAL)) {
|
|
|
|
|
return (EINVAL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (vap->va_flags != VNOVAL) {
|
|
|
|
|
/*
|
|
|
|
|
* <20>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD>ǽ<EFBFBD><C7BD><EFBFBD>ɲåե饰<D5A5><E9A5B0><EFBFBD><EFBFBD><EFBFBD>ꤷ<EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) {
|
|
|
|
|
/*
|
|
|
|
|
* <20>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD>ͭ<EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD><EFBFBD>/<2F>ޤ<EFBFBD><DEA4>ϥ<EFBFBD><CFA5>롼<EFBFBD>פ<EFBFBD><D7A4>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (vap->va_size != VNOVAL) {
|
|
|
|
|
/*
|
|
|
|
|
* <20>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ꤵ<EFBFBD>줿<EFBFBD>礭<EFBFBD><E7A4AD><EFBFBD><EFBFBD><EFBFBD>ڤ<EFBFBD><DAA4>ͤ<EFBFBD><CDA4>ޤ<EFBFBD><DEA4><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (vap->va_atime.tv_sec != VNOVAL || vap->va_mtime.tv_sec != VNOVAL) {
|
|
|
|
|
/*
|
|
|
|
|
* <20>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><CEA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F>ޤ<EFBFBD><DEA4>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (vap->va_mode != (mode_t)VNOVAL) {
|
|
|
|
|
/*
|
|
|
|
|
* <20>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υѡ<CEA5><D1A1>ߥå<DFA5><C3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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