Re: Problem with open

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

 



Just to clarify things.  Are you saying *errno* is 1 or just that the 
return value from your open() is -1?  It is errno's value that is 
needed before anyone here can answer your question.


On Tuesday 10 February 2004 06:59, vishwas manral wrote:
> Amit,
>
> I get the error -1 as I said, which maps to
> #define EPERM            1      /* Operation not permitted */
>  in error.h if I understand things correctly?
>
> Thanks,
> Vishwas
>
> -----Original Message-----
> From: kernelnewbies-bounce@nl.linux.org
> [mailto:kernelnewbies-bounce@nl.linux.org]On Behalf Of Amit Limaye
> Sent: Tuesday, February 10, 2004 5:13 PM
> To: vishwas.manral@lycos.com; kernelnewbies@nl.linux.org
> Subject: Re: Problem with open
>
>
> what error do u get value of errno
>
> -SIGTERM
> amit
>
> ----------------------------------------------
> Hi folks,
>
> I am unable to open the device file and any help here would be great.
>
> 1. I insert the module using insmod get the dynamic Major number
> seeing /proc/devices.
>
> 2. Using the major number I add the device special file using mknod.
> mknod- m /dev/devName c 254 0.
>
> 3. I now do an open on the device in the user space. I am unable to
> open the file it returns -1. I tried to do open with O_RDONLY yet I
> get the same error.
>
> Please let me know what I am doing wrong(link would be great too). I
> checked the archives but found nothing useful.
>
> Thanks,
> Vishwas


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