tirumal b <[EMAIL PROTECTED]> said:
> hello,
>
> i have tried to create files in /proc but i am not
> able to do so. This is the code i have written and it
> generates some errors.
>
/proc isn't a 'real' file system. It's a virtual representation of your
machine/os environment and kernel, and gives you some access to ongoing
operations. Under most conditions you cannot write to that directory.
best
rickf
>
> #include<stdio.h>
> #include<sys/types.h>
> #include<linux/proc_fs.h>
> main()
> {
> const char* name="CPU";
> mode_t mode=444;
> struct proc_dir_entry *l;
> l=create_proc_entry(name,mode,NULL);
> }
>
> gcc -c example.c
> In file included from example.c:3:
> /usr/include/linux/proc_fs.h:70: parse error before
> "atomic_t"
> /usr/include/linux/proc_fs.h:72: parse error before
> "rdev"
> /usr/include/linux/proc_fs.h:187: parse error before
> "kdev_t"
> /usr/include/linux/proc_fs.h:203: parse error before
> "void"
>
> i have tried to include linux/kdev_t.h and
> asm/atomic.h but the errors persist. could anyone tell
> me what is the problem.
>
> Thank you
--
________________________________________________________________
This message was sent using KTB.net InTouch with Tomorrow.
For more information visit http://www.ktb.net
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list