Lines Matching defs:stat
134 static int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf)
136 compat_ino_t ino = stat->ino;
141 SET_UID(uid, stat->uid);
142 SET_GID(gid, stat->gid);
144 if ((u64) stat->size > MAX_NON_LFS ||
145 !old_valid_dev(stat->dev) ||
146 !old_valid_dev(stat->rdev))
148 if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino)
154 err = __put_user(old_encode_dev(stat->dev), &ubuf->st_dev);
156 err |= __put_user(stat->mode, &ubuf->st_mode);
157 err |= __put_user(stat->nlink, &ubuf->st_nlink);
160 err |= __put_user(old_encode_dev(stat->rdev), &ubuf->st_rdev);
161 err |= __put_user(stat->size, &ubuf->st_size);
162 err |= __put_user(stat->atime.tv_sec, &ubuf->st_atime);
163 err |= __put_user(stat->atime.tv_nsec, &ubuf->st_atime_nsec);
164 err |= __put_user(stat->mtime.tv_sec, &ubuf->st_mtime);
165 err |= __put_user(stat->mtime.tv_nsec, &ubuf->st_mtime_nsec);
166 err |= __put_user(stat->ctime.tv_sec, &ubuf->st_ctime);
167 err |= __put_user(stat->ctime.tv_nsec, &ubuf->st_ctime_nsec);
168 err |= __put_user(stat->blksize, &ubuf->st_blksize);
169 err |= __put_user(stat->blocks, &ubuf->st_blocks);
176 struct kstat stat;
179 error = vfs_stat(filename, &stat);
182 return cp_compat_stat(&stat, statbuf);
188 struct kstat stat;
191 error = vfs_lstat(filename, &stat);
194 return cp_compat_stat(&stat, statbuf);
202 struct kstat stat;
205 error = vfs_fstatat(dfd, filename, &stat, flag);
208 return cp_compat_stat(&stat, statbuf);
215 struct kstat stat;
216 int error = vfs_fstat(fd, &stat);
219 error = cp_compat_stat(&stat, statbuf);