Re: How to open and write to a block driver within a character driver?

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

 



On Thu, Oct 06, 2011 at 03:43:08PM -0700, Yang Xiang wrote:
> Hi Greg,
> 
> Let me rephrase my question then.
> 
> If I am in kernel space and in another device driver and I need to write a log
> entry of some sort to another block device, do I just perform an "open" and
> "write" as if I am in user space?

No, you never do that, no device driver ever opens a file and writes to
it.  It's that simple.

Please see the kernelnewbies.org site for more details about why this is
so.

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[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