Re: How to register block device as read-only

2007-07-28 Thread Jan Engelhardt
On Jul 28 2007 13:36, Bernd Petrovitsch wrote: > >Unless I misunderstand the question, the "write" and "writev" function >of the "struct file_operations" should return an appropriate error value >(which is here -EACCES). >You may think of returning an error in the "open" if someone wants to >open

Re: How to register block device as read-only

2007-07-28 Thread Bernd Petrovitsch
On Fri, 2007-07-27 at 13:07 -0500, [EMAIL PROTECTED] wrote: > Hello, > > In a block device driver, how do you tell the kernel that your block device > is read-only? Is it in the registration of the gendisk, or is there an > ioctl I should be catching to inform the kernel (and user) that this

Re: How to register block device as read-only

2007-07-28 Thread Bernd Petrovitsch
On Fri, 2007-07-27 at 13:07 -0500, [EMAIL PROTECTED] wrote: Hello, In a block device driver, how do you tell the kernel that your block device is read-only? Is it in the registration of the gendisk, or is there an ioctl I should be catching to inform the kernel (and user) that this disk

Re: How to register block device as read-only

2007-07-28 Thread Jan Engelhardt
On Jul 28 2007 13:36, Bernd Petrovitsch wrote: Unless I misunderstand the question, the write and writev function of the struct file_operations should return an appropriate error value (which is here -EACCES). You may think of returning an error in the open if someone wants to open it to write

How to register block device as read-only

2007-07-27 Thread beck0778
Hello, In a block device driver, how do you tell the kernel that your block device is read-only? Is it in the registration of the gendisk, or is there an ioctl I should be catching to inform the kernel (and user) that this disk is read-only? --Matthew - To unsubscribe from this list: send

How to register block device as read-only

2007-07-27 Thread beck0778
Hello, In a block device driver, how do you tell the kernel that your block device is read-only? Is it in the registration of the gendisk, or is there an ioctl I should be catching to inform the kernel (and user) that this disk is read-only? --Matthew - To unsubscribe from this list: send