Age | Commit message (Collapse) | Author |
|
Fixed several compiler warnings, mainly when compiling on 64-bit
architectures (where "size_t"-related types are not necessarily
32-bit).
Signed-off-by: Brian Norris <norris@broadcom.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
gcc 4.4.3 on x86_64:
libcrc32.c:42: warning: ‘static’ is not at beginning of declaration
libfec.c:120: warning: initialization discards qualifiers from pointer target type
libfec.c:121: warning: initialization discards qualifiers from pointer target type
libfec.c:417: warning: passing argument 2 of ‘my_malloc’ discards qualifiers from pointer target type
recv_image.c:164: warning: comparison of unsigned expression < 0 is always false
recv_image.c:170: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
recv_image.c:170: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
And many more along the same lines.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This patch is based on Kevin Cernekee's patch posted to the MTD mailing
list. It adds 'mtd_read_oob()' and 'mtd_write_oob()' interfaces support.
The interfaces use MEMREADOOB64/MEMWRITEOOB64 MTD ioctls if possible, and
fall-back to MEMREADOOB/MEMWRITEOOB if the 64-bit versions are not supported.
The information about ioctls support is then cashed in 'offs64_ioctls'
libmtd flag.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This patch is base on Kevin Cernekee's patch posted to the MTD mailing
list. It adds MEMERASE64 support to the 'mtd_erase()' call. Now it
first tries to use MEMERASE64, and if that is not supported, falls
back to the old MEMERASE ioctl.
This patch also introduces an 'offs64_ioctl' flag to the libmtd
descriptor. However, we cannot initialize it in 'libmtd_open()',
because we need an MTD device node, which we do not have in
'libmtd_open()'. Thus, we firs mark this flag as "uninitialized",
and at the first invocation of 'mtd_erase()' we initialize it.
This also means that we have to pass the limbtd descriptor to
'mtd_erase()', to save the flag value. This, in turn, requires
tweaking 'mtd_erase()' users.
This is not very nice, but good enough so far.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
My fault, forgot to run git add.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Source files for libmtd, crc32, and fec are scattered throughout the
tree. Move them to a central location so they can be built into a
common "libmtd.a" library used by all mtd-utils programs.
This patch only renames/deletes files and does not change the content.
Also modify the build system and source code so that libmtd.a can be built
from a "common" location (lib/). Statically link all utilities at the top
level with libmtd.a . Minor changes to mkfs.ubifs to allow using the common
crc32 implementation.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|