/* vfs_xxx.c 6.2 84/07/08 */
* Oh, how backwards compatibility is ugly!!!
* The old fstat system call.
register struct file
*fp
;
} *uap
= (struct a
*)u
.u_ap
;
extern struct file
*getinode();
ostat1((struct inode
*)fp
->f_data
, uap
->sb
);
* Old stat system call. This version follows links.
register struct inode
*ip
;
} *uap
= (struct a
*)u
.u_ap
;
register struct nameidata
*ndp
= &u
.u_nd
;
ndp
->ni_nameiop
= LOOKUP
| FOLLOW
;
ndp
->ni_segflg
= UIO_USERSPACE
;
ndp
->ni_dirp
= uap
->fname
;
register struct inode
*ip
;
IUPDAT(ip
, &time
, &time
, 0);
ds
.ost_ino
= (short)ip
->i_number
;
ds
.ost_mode
= (u_short
)ip
->i_mode
;
ds
.ost_nlink
= ip
->i_nlink
;
ds
.ost_uid
= (short)ip
->i_uid
;
ds
.ost_gid
= (short)ip
->i_gid
;
ds
.ost_rdev
= (dev_t
)ip
->i_rdev
;
ds
.ost_size
= (int)ip
->i_size
;
ds
.ost_atime
= (int)ip
->i_atime
;
ds
.ost_mtime
= (int)ip
->i_mtime
;
ds
.ost_ctime
= (int)ip
->i_ctime
;
u
.u_error
= copyout((caddr_t
)&ds
, (caddr_t
)ub
, sizeof(ds
));
* Set IUPD and IACC times on file.
} *uap
= (struct a
*)u
.u_ap
;
register struct inode
*ip
;
if ((ip
= owner(uap
->fname
, FOLLOW
)) == NULL
)
u
.u_error
= copyin((caddr_t
)uap
->tptr
, (caddr_t
)tv
, sizeof (tv
));
ip
->i_flag
|= IACC
|IUPD
|ICHG
;
tv0
.tv_sec
= tv
[0]; tv0
.tv_usec
= 0;
tv1
.tv_sec
= tv
[1]; tv1
.tv_usec
= 0;
iupdat(ip
, &tv0
, &tv1
, 0);