asmlinkage long sys32_fstat64(unsigned int fd, struct stat64 __user *statbuf) { struct kstat stat; int ret = vfs_fstat(fd, &stat); if (!ret) ret = cp_stat64(statbuf, &stat); return ret; }
asmlinkage long sys32_lstat64(char __user * filename, struct stat64 __user *statbuf) { struct kstat stat; int ret = vfs_lstat(filename, &stat); if (!ret) ret = cp_stat64(statbuf, &stat); return ret; }
int sys_fstat64(unsigned int fd, struct stat64 * statbuf) { struct file * f; struct m_inode * inode; if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) return -ENOENT; return cp_stat64(inode,statbuf); }
asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename, struct stat64 __user *statbuf, int flag) { struct kstat stat; int error; error = vfs_fstatat(dfd, filename, &stat, flag); if (error) return error; return cp_stat64(statbuf, &stat); }
int sys_stat64(char * filename, struct stat64 * statbuf) { int i; struct m_inode * inode; if (!(inode=namei(filename))) return -ENOENT; i=cp_stat64(inode,statbuf); iput(inode); return i; }
asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename, struct stat64 __user *statbuf, int flag) { struct kstat stat; int error = -EINVAL; if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) goto out; if (flag & AT_SYMLINK_NOFOLLOW) error = vfs_lstat_fd(dfd, filename, &stat); else error = vfs_stat_fd(dfd, filename, &stat); if (!error) error = cp_stat64(statbuf, &stat); out: return error; }