Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\stat.c Create Date:2022-07-28 20:03:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:For backward compatibility? Maybe this should be moved* into arch/i386 instead?

Proto:static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user *statbuf)

Type:int

Parameter:

TypeParameterName
struct kstat *stat
struct __old_kernel_stat __user *statbuf
211  warncount = 5
214  If warncount > 0 Then
215  warncount--
216  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
218  Else if warncount < 0 Then
220  warncount = 0
223  memset( & tmp, 0, sizeof(struct__old_kernel_stat))
224  st_dev = old_encode_dev(dev)
225  st_ino = ino
226  If size of st_ino < size of ino && st_ino != ino Then Return -EOVERFLOW
228  st_mode = mode
229  st_nlink = nlink
230  If st_nlink != nlink Then Return -EOVERFLOW
232  uid/gid input should be always 32bit uid_t (st_uid, from_kuid_munged(current_user_ns(), uid))
233  SET_GID(st_gid, from_kgid_munged(current_user_ns(), gid))
234  st_rdev = old_encode_dev(rdev)
236  If size > MAX_NON_LFS Then Return -EOVERFLOW
239  st_size = size
240  st_atime = tv_sec
241  st_mtime = seconds
242  st_ctime = seconds
243  Return If copy_to_user(statbuf, & tmp, size of tmp ) Then -EFAULT Else 0
Caller
NameDescribe
SYSCALL_DEFINE2
SYSCALL_DEFINE2
SYSCALL_DEFINE2