Re: proc_mkdir

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

 



-----------------------------------------------------------------------
static int
create_procfs_dir(struct proc_dir_entry *entry, const char *name,
                  struct proc_dir_entry *parent)
{
        entry = proc_mkdir(name, parent);
        if (entry == NULL) {
                /*Failed when creating file */
                printk(KERN_ALERT "Error while creating %s directory\n",
name);
                return -1;
        }
Print the value of variable entry in create_procfs_dir() in the
beginning and before return. You would understand. It is a problem
with your understanding of C pointers.
If you did not, change the create_procfs_dir() first param to struct
proc_dir_entry ** and pass the address of the variable.

All the best,
Om.

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