mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: shashank kharche <shashank_pict@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: Problem in writing simple block device driver...
Date: Thu, 15 Sep 2005 14:06:07 +0100 (BST)	[thread overview]
Message-ID: <20050915130607.56132.qmail@web8404.mail.in.yahoo.com> (raw)

I have written a simple block device driver in which i
m just displaying messages
in read & write part e.g " Device Reading .... " &  "
Device Writing .....".
I have succesfully loaded that module in memory using
"insmod" . 
& then use " mknod " command ...as   : 

                   mknod block_dev b 100 0 
  where , block_dev : name of device
                  b : as i m using block device driver
                100 : major number
                  0 : minor number
   
Even this is also working without error, now after
this command device "block_dev" is created (i have
checked it wit ls command ).
But , now while using "cat" & "echo" i am getting
error as :
       
       [root@localhost root]# cat block_dev
       cat: block_dev : No such device or address

       [root@localhost root]# echo "hello" > block_dev
       bash: block_dev : No such device or address
               
Is it ok to use 'b' in mknod command while working
with block device driver,
as i hav used (shown above).

Im attaching C-code also,so plz help me....if you have
another simple code for block device driver please
send me : shashank_pict@yahoo.com 

Please tell me what is going wrong in this code.....



		
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

             reply	other threads:[~2005-09-15 13:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-15 13:06 shashank kharche [this message]
2005-09-15 13:06 shashank kharche

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=20050915130607.56132.qmail@web8404.mail.in.yahoo.com \
    --to=shashank_pict@yahoo.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®