Re: Question: Invoking driver code

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

 



On Thu, Sep 20, 2001 at 01:33:48PM -0400, Sean Murphy wrote:
> I have a scsi device defined with no partitions. I am able to open the
> device
> successfully by giving fp = open("/dev/sda",...) however when I do a read
> on
> fp the driver code doesn't get invoked.

Which driver code? The SCSI disk driver code and the SCSI card driver
code should be invoked.

> I guess I have to do something before I can access the device. Can anyone
> tell me what is that I have to do to be able to access the device ?

Just open() it, that's enough. Remember the UNIX rule: everything is a
file.

> Do I have to mount the device after making a file system?

Not necessarily, but in order to use the filesystem you have. You could
also fsck the filesystem, for example.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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