diff mbox

mtd-utils: Fix incompatibility with kernel UBI block ioctls

Message ID 1400597820-6589-1-git-send-email-helmut.schaa@googlemail.com
State Rejected
Headers show

Commit Message

Helmut Schaa May 20, 2014, 2:57 p.m. UTC
The kernel UBI block ioctl definition is out of sync with the one
in mtd-utils resulting in ubiblock being unusable on current kernels.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
Not sure if it is required to keep this backward compatible somehow?
Seems the definition of the ioctl is a leftover from a previous
version of the UBI block implementation.

 include/mtd/ubi-user.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ezequiel Garcia May 20, 2014, 9:34 p.m. UTC | #1
Hi Helmut,

On 20 May 04:57 PM, Helmut Schaa wrote:
> The kernel UBI block ioctl definition is out of sync with the one
> in mtd-utils resulting in ubiblock being unusable on current kernels.
> 

Which version are you taking as "current". The ioctl parameter is actually
an improvement over the first parameter-less implementation, so this patch
makes no sense.

Take a look at:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=463c5eedb4a13b9aa91f05498a0f2c20bd03f8c4

Maybe you have some old kernel or maybe you've backported this feature and you
are using some internal version?
Helmut Schaa May 20, 2014, 9:46 p.m. UTC | #2
On Tue, May 20, 2014 at 11:34 PM, Ezequiel Garcia
<ezequiel.garcia@free-electrons.com> wrote:
> Hi Helmut,
>
> On 20 May 04:57 PM, Helmut Schaa wrote:
>> The kernel UBI block ioctl definition is out of sync with the one
>> in mtd-utils resulting in ubiblock being unusable on current kernels.
>>
>
> Which version are you taking as "current". The ioctl parameter is actually
> an improvement over the first parameter-less implementation, so this patch
> makes no sense.
>
> Take a look at:
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=463c5eedb4a13b9aa91f05498a0f2c20bd03f8c4
>
> Maybe you have some old kernel or maybe you've backported this feature and you
> are using some internal version?

Ouch, I was indeed on a different (older) tree :/

Sorry for the noise. Please drop this patch.

Thanks,
Helmut
diff mbox

Patch

diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h
index 2b50dad..8e7ef5d 100644
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -197,7 +197,7 @@ 
 #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \
 			       struct ubi_set_vol_prop_req)
 /* Create a R/O block device on top of an UBI volume */
-#define UBI_IOCVOLCRBLK _IOW(UBI_VOL_IOC_MAGIC, 7, struct ubi_blkcreate_req)
+#define UBI_IOCVOLCRBLK _IO(UBI_VOL_IOC_MAGIC, 7)
 /* Remove the R/O block device */
 #define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8)