From: Eugene Surovegin <ebs@ebshome.net>
To: Garcia J?r?mie <GARCIAJ@3il.fr>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Error while opennig device file
Date: Wed, 15 Jun 2005 10:26:05 -0700 [thread overview]
Message-ID: <20050615172605.GA21165@gate.ebshome.net> (raw)
In-Reply-To: <D4FDDD1349B5AC46B68FC26AD8AF42D6226B35@exnet.3il.fr>
On Wed, Jun 15, 2005 at 06:19:43PM +0200, Garcia J?r?mie wrote:
> Hi everybody,
> I'd like to have your opinion on such a stupid question. Indeed, it must be very easy to see but
> I can't find out what goes on.
> I'm writing a device driver. In the init_module(), I register it with TEST_DEV_MAJOR = 122
>
> ret_val = register_chrdev(TEST_DEV_MAJOR, TEST_DEV_PROC_NAME, &lcd_fops);
>
> In the user space, I have a programm that creates two device files using the same major number but with
> different minor numbers:
>
> ret_val = system("mknod -m 777 /dev/Test1 c 122 1");
> ret_val = system("mknod -m 777 /dev/Test1 c 122 2");
^
> Then I try to open both files :
> file_desc1 = open("/dev/test1", O_RDWR);
> file_desc2 = open("/dev/test2", O_RDWR);
You must be kidding.
You create /dev/Test1 twice, and then open /dev/test1 and /dev/test2.
First of all, Linux fs are case sensitive, second, you don't create
test2 (even with wrong case).
--
Eugene
next prev parent reply other threads:[~2005-06-15 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-15 16:19 Error while opennig device file Garcia Jérémie
2005-06-15 17:26 ` Eugene Surovegin [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-06-16 8:35 RE : RE : " Garcia Jérémie
2005-06-16 9:23 ` Marcin Dawidowicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050615172605.GA21165@gate.ebshome.net \
--to=ebs@ebshome.net \
--cc=GARCIAJ@3il.fr \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox