Age | Commit message (Collapse) | Author |
|
|I mean, IMO most of these warnings are not really sane, and cleaning
|that up just adds mess - you stop understanding why is something signed
|or unsigned :-)
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
The 2GiB limit is at erase block 8192. In mtd_is_bad() the computation
for the MEMGETBADBLOCK ioctl() looks like the following:
| seek = eb * mtd->eb_size;
with both eb and mtd->eb_size being a signed int results in seek being a
signed result.
The _FILE_OFFSET_BITS=64 define is required to switch off_t from 32bit
to 64bit an 32bit systems. This is required in order to keep using
lseek() as lseek64 on 32bit system. Without this change lseek() in
mtd_read() is called with a 32bit value with most significat bit set and
the kernel performs a sign extension for the 64bit value which is used
in the mtd layer.
The last change also changes the size of the parameter which is passed
to the MEMGETBADBLOCK ioctl() from 32 to 64bit. The counter part in
kernel is also defined as loff_t which is of type __kernel_loff_t and
this is "long long". So this must have been broken for a while unless I
missed something.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
I got some reports from people who use make-3.80 that mtd-utils wasn't
building correctly the first time. Turns out that older versions of make
misbehave with pattern rules and full paths. So I've tweaked the code a
little to work with make-3.80 and make-3.81 (the latest release).
Also, I added a small optimization to avoid running `mkdir` when building
in-tree.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Rather than duplicating the same thing over and over in every Makefile,
move it all to common.mk.
Other things fixed here:
- doing subdirs in parallel
- fix src!=build compiling in subdirs
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|