Lines Matching refs:tmp
228 struct __old_kernel_stat tmp; in cp_old_stat() local
239 memset(&tmp, 0, sizeof(struct __old_kernel_stat)); in cp_old_stat()
240 tmp.st_dev = old_encode_dev(stat->dev); in cp_old_stat()
241 tmp.st_ino = stat->ino; in cp_old_stat()
242 if (sizeof(tmp.st_ino) < sizeof(stat->ino) && tmp.st_ino != stat->ino) in cp_old_stat()
244 tmp.st_mode = stat->mode; in cp_old_stat()
245 tmp.st_nlink = stat->nlink; in cp_old_stat()
246 if (tmp.st_nlink != stat->nlink) in cp_old_stat()
248 SET_UID(tmp.st_uid, from_kuid_munged(current_user_ns(), stat->uid)); in cp_old_stat()
249 SET_GID(tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid)); in cp_old_stat()
250 tmp.st_rdev = old_encode_dev(stat->rdev); in cp_old_stat()
255 tmp.st_size = stat->size; in cp_old_stat()
256 tmp.st_atime = stat->atime.tv_sec; in cp_old_stat()
257 tmp.st_mtime = stat->mtime.tv_sec; in cp_old_stat()
258 tmp.st_ctime = stat->ctime.tv_sec; in cp_old_stat()
259 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; in cp_old_stat()
315 struct stat tmp; in cp_new_stat() local
317 if (sizeof(tmp.st_dev) < 4 && !old_valid_dev(stat->dev)) in cp_new_stat()
319 if (sizeof(tmp.st_rdev) < 4 && !old_valid_dev(stat->rdev)) in cp_new_stat()
326 INIT_STRUCT_STAT_PADDING(tmp); in cp_new_stat()
327 tmp.st_dev = new_encode_dev(stat->dev); in cp_new_stat()
328 tmp.st_ino = stat->ino; in cp_new_stat()
329 if (sizeof(tmp.st_ino) < sizeof(stat->ino) && tmp.st_ino != stat->ino) in cp_new_stat()
331 tmp.st_mode = stat->mode; in cp_new_stat()
332 tmp.st_nlink = stat->nlink; in cp_new_stat()
333 if (tmp.st_nlink != stat->nlink) in cp_new_stat()
335 SET_UID(tmp.st_uid, from_kuid_munged(current_user_ns(), stat->uid)); in cp_new_stat()
336 SET_GID(tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid)); in cp_new_stat()
337 tmp.st_rdev = new_encode_dev(stat->rdev); in cp_new_stat()
338 tmp.st_size = stat->size; in cp_new_stat()
339 tmp.st_atime = stat->atime.tv_sec; in cp_new_stat()
340 tmp.st_mtime = stat->mtime.tv_sec; in cp_new_stat()
341 tmp.st_ctime = stat->ctime.tv_sec; in cp_new_stat()
343 tmp.st_atime_nsec = stat->atime.tv_nsec; in cp_new_stat()
344 tmp.st_mtime_nsec = stat->mtime.tv_nsec; in cp_new_stat()
345 tmp.st_ctime_nsec = stat->ctime.tv_nsec; in cp_new_stat()
347 tmp.st_blocks = stat->blocks; in cp_new_stat()
348 tmp.st_blksize = stat->blksize; in cp_new_stat()
349 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; in cp_new_stat()
460 struct stat64 tmp; in cp_new_stat64() local
462 INIT_STRUCT_STAT64_PADDING(tmp); in cp_new_stat64()
465 tmp.st_dev = new_encode_dev(stat->dev); in cp_new_stat64()
466 tmp.st_rdev = new_encode_dev(stat->rdev); in cp_new_stat64()
468 tmp.st_dev = huge_encode_dev(stat->dev); in cp_new_stat64()
469 tmp.st_rdev = huge_encode_dev(stat->rdev); in cp_new_stat64()
471 tmp.st_ino = stat->ino; in cp_new_stat64()
472 if (sizeof(tmp.st_ino) < sizeof(stat->ino) && tmp.st_ino != stat->ino) in cp_new_stat64()
475 tmp.__st_ino = stat->ino; in cp_new_stat64()
477 tmp.st_mode = stat->mode; in cp_new_stat64()
478 tmp.st_nlink = stat->nlink; in cp_new_stat64()
479 tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid); in cp_new_stat64()
480 tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid); in cp_new_stat64()
481 tmp.st_atime = stat->atime.tv_sec; in cp_new_stat64()
482 tmp.st_atime_nsec = stat->atime.tv_nsec; in cp_new_stat64()
483 tmp.st_mtime = stat->mtime.tv_sec; in cp_new_stat64()
484 tmp.st_mtime_nsec = stat->mtime.tv_nsec; in cp_new_stat64()
485 tmp.st_ctime = stat->ctime.tv_sec; in cp_new_stat64()
486 tmp.st_ctime_nsec = stat->ctime.tv_nsec; in cp_new_stat64()
487 tmp.st_size = stat->size; in cp_new_stat64()
488 tmp.st_blocks = stat->blocks; in cp_new_stat64()
489 tmp.st_blksize = stat->blksize; in cp_new_stat64()
490 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; in cp_new_stat64()
544 struct statx tmp; in cp_statx() local
546 memset(&tmp, 0, sizeof(tmp)); in cp_statx()
548 tmp.stx_mask = stat->result_mask; in cp_statx()
549 tmp.stx_blksize = stat->blksize; in cp_statx()
550 tmp.stx_attributes = stat->attributes; in cp_statx()
551 tmp.stx_nlink = stat->nlink; in cp_statx()
552 tmp.stx_uid = from_kuid_munged(current_user_ns(), stat->uid); in cp_statx()
553 tmp.stx_gid = from_kgid_munged(current_user_ns(), stat->gid); in cp_statx()
554 tmp.stx_mode = stat->mode; in cp_statx()
555 tmp.stx_ino = stat->ino; in cp_statx()
556 tmp.stx_size = stat->size; in cp_statx()
557 tmp.stx_blocks = stat->blocks; in cp_statx()
558 tmp.stx_attributes_mask = stat->attributes_mask; in cp_statx()
559 tmp.stx_atime.tv_sec = stat->atime.tv_sec; in cp_statx()
560 tmp.stx_atime.tv_nsec = stat->atime.tv_nsec; in cp_statx()
561 tmp.stx_btime.tv_sec = stat->btime.tv_sec; in cp_statx()
562 tmp.stx_btime.tv_nsec = stat->btime.tv_nsec; in cp_statx()
563 tmp.stx_ctime.tv_sec = stat->ctime.tv_sec; in cp_statx()
564 tmp.stx_ctime.tv_nsec = stat->ctime.tv_nsec; in cp_statx()
565 tmp.stx_mtime.tv_sec = stat->mtime.tv_sec; in cp_statx()
566 tmp.stx_mtime.tv_nsec = stat->mtime.tv_nsec; in cp_statx()
567 tmp.stx_rdev_major = MAJOR(stat->rdev); in cp_statx()
568 tmp.stx_rdev_minor = MINOR(stat->rdev); in cp_statx()
569 tmp.stx_dev_major = MAJOR(stat->dev); in cp_statx()
570 tmp.stx_dev_minor = MINOR(stat->dev); in cp_statx()
571 tmp.stx_mnt_id = stat->mnt_id; in cp_statx()
573 return copy_to_user(buffer, &tmp, sizeof(tmp)) ? -EFAULT : 0; in cp_statx()
616 struct compat_stat tmp; in cp_compat_stat() local
618 if (sizeof(tmp.st_dev) < 4 && !old_valid_dev(stat->dev)) in cp_compat_stat()
620 if (sizeof(tmp.st_rdev) < 4 && !old_valid_dev(stat->rdev)) in cp_compat_stat()
623 memset(&tmp, 0, sizeof(tmp)); in cp_compat_stat()
624 tmp.st_dev = new_encode_dev(stat->dev); in cp_compat_stat()
625 tmp.st_ino = stat->ino; in cp_compat_stat()
626 if (sizeof(tmp.st_ino) < sizeof(stat->ino) && tmp.st_ino != stat->ino) in cp_compat_stat()
628 tmp.st_mode = stat->mode; in cp_compat_stat()
629 tmp.st_nlink = stat->nlink; in cp_compat_stat()
630 if (tmp.st_nlink != stat->nlink) in cp_compat_stat()
632 SET_UID(tmp.st_uid, from_kuid_munged(current_user_ns(), stat->uid)); in cp_compat_stat()
633 SET_GID(tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid)); in cp_compat_stat()
634 tmp.st_rdev = new_encode_dev(stat->rdev); in cp_compat_stat()
637 tmp.st_size = stat->size; in cp_compat_stat()
638 tmp.st_atime = stat->atime.tv_sec; in cp_compat_stat()
639 tmp.st_atime_nsec = stat->atime.tv_nsec; in cp_compat_stat()
640 tmp.st_mtime = stat->mtime.tv_sec; in cp_compat_stat()
641 tmp.st_mtime_nsec = stat->mtime.tv_nsec; in cp_compat_stat()
642 tmp.st_ctime = stat->ctime.tv_sec; in cp_compat_stat()
643 tmp.st_ctime_nsec = stat->ctime.tv_nsec; in cp_compat_stat()
644 tmp.st_blocks = stat->blocks; in cp_compat_stat()
645 tmp.st_blksize = stat->blksize; in cp_compat_stat()
646 return copy_to_user(ubuf, &tmp, sizeof(tmp)) ? -EFAULT : 0; in cp_compat_stat()