Re: more big problems

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

 



Linux 2.4.X is not exporting proc_register 
and proc_unregister..Its been changed..
try to use creat_proc_entry..and try to read some 
doc on 'linux kernel procfs'                                             


Regards,
  Mahesh


On Tue, 8 Jul 2003, r2 wrote:

:-)---------------------------my_pid.c---------------------------
:-)#define __KERNEL__
:-)#define MODULE
:-)
:-)#include <linux/module.h>
:-)#include <linux/proc_fs.h>
:-)
:-)#define MODVERSIONS
:-)
:-)int my_pid_read (char *buf, char ** start, off_t offset,
:-)                 int len, int unused)
:-){
:-)  return 0;
:-)}
:-)
:-)struct proc_dir_entry my_pid_proc_entry = 
:-){
:-)  0,
:-)  6, "my_pid",
:-)  S_IFREG | S_IRUGO,
:-)  1, 0, 0,
:-)  0,
:-)  NULL,
:-)  &my_pid_read,
:-)};
:-)
:-)int init_module (void)
:-){
:-)  return proc_register (&proc_root, &my_pid_proc_entry);
:-)  printk ("<1> Module my_pid is loaded\n");
:-)  return 0;
:-)}
:-)
:-)void cleanup_module (void)
:-){
:-)  proc_unregister (&proc_root, &my_pid_proc_entry.low_ino);
:-)  printk ("<1> MOdule my_pid is unloaded\n");
:-)}
:-)---------------------------my_pid.c---------------------------
:-)
:-)during compilation the above code gives me the following warnings among other 
:-)warnings:-
:-)
:-)my_pid.c:30: warning: implicit declaration of function `proc_register'
:-)my_pid.c:30: warning: implicit declaration of function 'proc_unregister'
:-)
:-)when i try to insmod my_pid.o, it gives me the following errors:-
:-)my_pid.o: unresolved symbol proc_register
:-)my_pid.o: unresolved symbol proc register
:-)
:-)
:-)any idea why?
:-)
:-)r2
:-)
:-)
:-)--
:-)Kernelnewbies: Help each other learn about the Linux kernel.
:-)Archive:       http://mail.nl.linux.org/kernelnewbies/
:-)FAQ:           http://kernelnewbies.org/faq/
:-)
:-)

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[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