sszie_t and loff_t V.S u_int32_t (Was Re: Problems with nftl_format)
Ollie Lho
ollie at sis.com.tw
Tue Apr 10 00:21:59 EDT 2001
David Woodhouse wrote:
>
> pollastri at iriti.cnr.it said:
> > MEMWRITEOOB at 14200: Invalid argument
>
> OK, I probably broke it when I changed the structures slightly to make
> sparc64 happy. Can you confirm or deny my suspicion that it broke on the
> 17th of March?
>
> Does it start to work again if you recompile nftl_format against the new
> headers?
>
David,
I think the problem should be that you have changed the definition
of struct mtd_oob_buf. In older header file you have:
struct mtd_oob_buf {
loff_t start;
ssize_t length;
unsigned char *ptr;
};
and in newer header file:
struct mtd_oob_buf {
loff_t start;
ssize_t length;
unsigned char *ptr;
};
But you still use loff_t and ssize_t in mtd_ioctl in mtdchar.c
ret = (mtd->write_oob)(mtd, buf.start, buf.length, &retlen,
databuf);
if (copy_to_user((void *)arg + sizeof(loff_t), &retlen,
sizeof(ssize_t)))
ret = -EFAULT;
Dose this cause any problem ??
Ollie
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list