path: root/jffsX-utils
AgeCommit message (Collapse)Author
2016-11-17Unify version string printingDavid Oberhollenzer
When a program does sophisticated enough command line processing (i.e. getopt), make sure it responds to -V and --version. When a program prints a version string, make sure it uses the common_print_version macro to print out its name, that it is part of mtd-utils and the mtd-utils version from the build system in a fashion similar to common program packages like the GNU coreutils. When a program responds to -V/--version or -h/--help, make sure it reports success exit status. Signed-off-by: David Oberhollenzer <> Signed-off-by: Richard Weinberger <>
2016-11-17Change build system to autotoolsRichard Weinberger
This patch is largely based on Richards original RFC. The major differences to the RFC patch are: - Add missing sumtools & mtdpart targets - Fix name of mkfs.jffs2 target - Add missing subdir-objects option for non-recursive make - Move all automake options to - Add manpages to install target - Make XATTR & LZO support configurable - Install binaries to sbin directory like in the old build system - Install flash_erase wrapper script - Add files missing from distribution target Signed-off-by: David Oberhollenzer <> Signed-off-by: Richard Weinberger <>
2016-11-17Remove jffs-dump.cDavid Oberhollenzer
This _entire_ file is dead code. The download packages on the FTP server contain it all the way back to mtd-utils 1.0, but it isn't built in any of them. The git history (which dates back to 2006) contains no instance where that file was ever used in a build process. A quick look at various distribution packages didn't reveal any that contained a jffs-dump utilty. There have been no major changes to this file since the initial commit. It won't even compile as it doesn't have a PROGRAM_NAME defined required by common.h at least since 2010. At this point, it can be safeley assumed that nobody will miss this. They had at least 10 years to do something about it. Signed-off-by: David Oberhollenzer <> Signed-off-by: Richard Weinberger <>
2016-08-25mtd-utils: mkfs.jffs2: initialize lzo decompression buffer sizeDavid Oberhollenzer
This fix was initialially part of a patch submitted by Carsten Schlote in January 2009. It didn't get merged back then because of coding style issues and a proposed buffer size change guessed by shotgun debugging. I was unable to reproduce the claimed segfaults in the compression function that lead to the proposed buffer size change. Valgrind did not issue any errors or warnings about the code in question either, so I didn't include the proposed buffer size change. The original patch also added a call to lzo_init(), which (according to LZO documentation & source code) does not actually perform any initialization, but only checks at runtime that the data type sizes and endianness of the library code match those in the caller code and should be unnecessary. Other fixes from the original patch have already been added over the years. Signed-off-by: David Oberhollenzer <> Signed-off-by: Richard Weinberger <>
2015-11-12Fix scanf() formatstring for modern C versionDaniel Walter
mkfs.jffs2 is using an old assignment-allocation modifier for scanf(). Add a check so this modifier does not get confused with a float formatstring on newer C standard (C99 onwards). Signed-off-by: Daniel Walter <> Signed-off-by: Richard Weinberger <>
2015-11-11mtd-utils: Restructure the mtd-utils source.Dongsheng Yang
* There is no code modification in this commit, only moving * the files to proper place. The user tools looks a little messy as we place almost the all tools in the root directory of mtd-utils. To make it more clear, I propose to introduce the following structure for our source code. mtd-utils/ |-- lib |-- include |-- misc-utils |-- jffsX-utils |-- nand-utils |-- nor-utils |-- ubi-utils |-- ubifs-utils `-- tests Signed-off-by: Dongsheng Yang <> Signed-off-by: Brian Norris <>