Re: Problem with open

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

 



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


--

--------- Original Message ---------

DATE: Mon, 9 Feb 2004 02:36:58 
From: prasanna wakhare <prasannawakhare@yahoo.com>
To: vishwas.manral@lycos.com
Cc: kernelnewbies@nl.linux.org

>hi,
>u confirm yrself what's this error
>by giving errno to strerror
>might be coz
>the file is not in existance,but u  have succesfull
>make the mknod,
>if u r giving major number statically,
>then rather try to allot it dynamically
>check /proc/devices file
>lsmod ,
>and rather some dependancy problem is still there
>then u include "sysdep.h"  file of rubini
>which is nearly have resolved all symbols from 2.2
>kernels,
>i given u all possibilities which i could think.
>
>--- vishwas manral <vishwas.manral@lycos.com> wrote:
>> Hi Prasanna,
>> 
>> Going ahead from the previous after creating a
>> device file using mknod, if I try to do an open from
>> user space I get the fd as -1. 
>> 
>> Do let me know what you think I have done wrong?
>> 
>> Thanks,
>> Vishwas
>> 
>> 


____________________________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10

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