hello,

  can u tell me how can i change this to kernel code,
will i need to modify the kernel code and recompile it
.please let me know.

Thank you



On Thu, 2003-06-26 at 20:45, [EMAIL PROTECTED] wrote:
> 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

Upon initial inspection, the code seems valid.  I'm
guessing the 
problem
is that creating entries in /proc can only be done by
kernel code.  
This
is not kernel code, it's application code.

> > #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);
> > }
> > 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to