Lines Matching defs:ubuf
134 static int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf)
137 typeof(ubuf->st_uid) uid = 0;
138 typeof(ubuf->st_gid) gid = 0;
151 if (clear_user(ubuf, sizeof(*ubuf)))
154 err = __put_user(old_encode_dev(stat->dev), &ubuf->st_dev);
155 err |= __put_user(ino, &ubuf->st_ino);
156 err |= __put_user(stat->mode, &ubuf->st_mode);
157 err |= __put_user(stat->nlink, &ubuf->st_nlink);
158 err |= __put_user(uid, &ubuf->st_uid);
159 err |= __put_user(gid, &ubuf->st_gid);
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);
223 static int put_compat_statfs(struct compat_statfs __user *ubuf, struct kstatfs *kbuf)
226 if (sizeof ubuf->f_blocks == 4) {
239 if (!access_ok(VERIFY_WRITE, ubuf, sizeof(*ubuf)) ||
240 __put_user(kbuf->f_type, &ubuf->f_type) ||
241 __put_user(kbuf->f_bsize, &ubuf->f_bsize) ||
242 __put_user(kbuf->f_blocks, &ubuf->f_blocks) ||
243 __put_user(kbuf->f_bfree, &ubuf->f_bfree) ||
244 __put_user(kbuf->f_bavail, &ubuf->f_bavail) ||
245 __put_user(kbuf->f_files, &ubuf->f_files) ||
246 __put_user(kbuf->f_ffree, &ubuf->f_ffree) ||
247 __put_user(kbuf->f_namelen, &ubuf->f_namelen) ||
248 __put_user(kbuf->f_fsid.val[0], &ubuf->f_fsid.val[0]) ||
249 __put_user(kbuf->f_fsid.val[1], &ubuf->f_fsid.val[1]) ||
250 __put_user(kbuf->f_frsize, &ubuf->f_frsize) ||
251 __put_user(0, &ubuf->f_spare[0]) ||
252 __put_user(0, &ubuf->f_spare[1]) ||
253 __put_user(0, &ubuf->f_spare[2]) ||
254 __put_user(0, &ubuf->f_spare[3]) ||
255 __put_user(0, &ubuf->f_spare[4]))
298 static int put_compat_statfs64(struct compat_statfs64 __user *ubuf, struct kstatfs *kbuf)
300 if (sizeof ubuf->f_blocks == 4) {
313 if (!access_ok(VERIFY_WRITE, ubuf, sizeof(*ubuf)) ||
314 __put_user(kbuf->f_type, &ubuf->f_type) ||
315 __put_user(kbuf->f_bsize, &ubuf->f_bsize) ||
316 __put_user(kbuf->f_blocks, &ubuf->f_blocks) ||
317 __put_user(kbuf->f_bfree, &ubuf->f_bfree) ||
318 __put_user(kbuf->f_bavail, &ubuf->f_bavail) ||
319 __put_user(kbuf->f_files, &ubuf->f_files) ||
320 __put_user(kbuf->f_ffree, &ubuf->f_ffree) ||
321 __put_user(kbuf->f_namelen, &ubuf->f_namelen) ||
322 __put_user(kbuf->f_fsid.val[0], &ubuf->f_fsid.val[0]) ||
323 __put_user(kbuf->f_fsid.val[1], &ubuf->f_fsid.val[1]) ||
324 __put_user(kbuf->f_frsize, &ubuf->f_frsize))