Re: Calling stat from kernel space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 24, 2002 at 12:37:31AM -0800, Amit Purohit wrote:
> I am trying to call the system call "stat" from the
> kernel module. But it is giving me some erronous
> values as output.

If you are wanting this data in userspace, just call stat(2) in the
userland program.

If you are wanting this data in kernelspace, find the sys_stat()
function, figure out what it does, and do the same things.

Calling system calls from within modules is unhealthy.

Cheers

-- 
"I'm not sure which upsets me more: that people are so unwilling
to accept responsibility for their own actions, or that they are
so eager to regulate everyone else's." -- Kee Hinckley

Attachment: pgp00026.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux