Re: storage size of `nd' isn't known problem

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

 



On Tue, Jun 18, 2002 at 01:09:54PM -0700, Karthik M wrote:
> I wrote a small program to access the inode data for a
> given filename with it's path. I am not sure whether
> what i wrote was correct , but i could'nt get it to
> compile at all and am clueless abt the error that it
> is giving me.

Hey Karthik; the problem with this program is that you are trying to use
kernel datastructures from userspace. What you are trying to do can only
be done in the kernel[1], but this is a userland program.

Take a look at one of the various module programming guides for
information on starting your own kernel module, and try to stuff some of
this code into a module.


[1] well, ok, /dev/kmem can let you do this from userland, but if you
have to ask, you probably shouldn't be trying this. :) You might be able
to directly parse the filesystem yourself, which is how I imagine the
e2fs tools work.

-- 
http://sardonix.org/

Attachment: pgp00104.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