Re: 2 programming questions

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 24 March 2003 15:24, you wrote:
> > 2. an other user told me that his redhat kernel bet kernel doesn't export
> > sys_call_table  anymore. I use that to give to user an overview of which
> > devices are loaded and that stuff. It works also without the proc stuff,
> > but I still would like to have my proc stuff, is there now a new way for
> > the proc stuff?
> I didn't understand why do you need sys_call_table to do the proc stuff.
> Your new_open() function doesn't seem to do anything except calling the
> real open() syscall.

sorry for my late answer but I didn't have the time to work on my kernel 
module

I need the sys_call_table import, or do I not need to save the sys_call_table 
?

        /* setup the proc stuff */
        old_open = sys_call_table[__NR_open];
        sys_call_table[__NR_open] = new_open;

        proc_entry = create_proc_entry("virtualcd", 0440, NULL);

        if (proc_entry)
                proc_entry->read_proc = proc_read;
        else {
                printk("<1>Error registering /proc entry!\n");
                return -ENOENT;
        }



- -- 
Regards,
Robert
- ----------------
Robert Penz
robert.penz AT outertech.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+j2Z68tTsQqJDUBMRAltIAJ4mpQyJCxo8mqfQenXcyjZzo2ZiEQCcCx3G
JeM0PCeGBMWrHKBzAY4hrok=
=l2Fk
-----END PGP SIGNATURE-----

--
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