[RFC] ubi: tmp hack for lstat
Peter Korsgaard
jacmet at sunsite.dk
Mon Oct 20 08:57:14 EDT 2008
>>>>> "Artem" == Artem Bityutskiy <dedekind at infradead.org> writes:
Hi,
Artem> On Mon, 2008-10-20 at 11:11 +0200, Sebastian Andrzej Siewior wrote:
>> I'm actually not sure what the expected behavior is. stat() returns
>> information about a file and ubi isn't a regular file it is a character
>> node. So it would be probably better to leave everything as it and
>> change userspace instead.
Artem> In my understanding, stat() should return how many bytes of
Artem> data inode contains. Stat on a character device should return
Artem> amount of bytes the character device inode contain. In ext3
Artem> major/minor are stored as meta-data, so it returns 0.
Exactly. The normal way to know the size of these things is to open
them and do the lseek(fd, 0, SEEK_END) thing.
--
Bye, Peter Korsgaard
More information about the linux-mtd
mailing list