Re: how to use errno in kernel loadable modules

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

 



Hi,

kishore wrote:

>     let me know, how to use errno in kernel loadable modules. 

Errno doesn't exist in the kernel. Return the error code directly, as
for example:

  ptr = kmalloc (sizeof(foobar), GFP_KERNEL);
  if (! ptr)
    return -ENOMEM;

Sincerly,

Thomas
-- 
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx

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