<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/Makefile.am, branch v2.3.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2026-04-13T06:42:56+00:00</updated>
<entry>
<title>mtd-utils: tests: jittertest: reject overlong file names</title>
<updated>2026-04-13T06:42:56+00:00</updated>
<author>
<name>Aviv Daum</name>
<email>aviv.daum@gmail.com</email>
</author>
<published>2026-03-18T22:53:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=514063a6d7a628e358894b6a6a6cb089c264fc09'/>
<id>urn:sha1:514063a6d7a628e358894b6a6a6cb089c264fc09</id>
<content type='text'>
plotJittervsFill copies the -f argument into a 250-byte buffer with
strncpy(..., sizeof(LogFile)). A 250-byte file name leaves the buffer
unterminated, and the subsequent fopen() reads past the end of LogFile.

JitterTest uses the same fixed-size file name pattern for -r, while -c
still silently truncates overlong names and -f already rejects them.

Validate jittertest file name arguments before copying them so these
options all reject overlong input instead of truncating it or reading
past the end of fixed-size buffers.

Add a shell regression test that exercises the accepted and rejected
boundary lengths for plotJittervsFill and JitterTest during make check.

Signed-off-by: Aviv Daum &lt;aviv.daum@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>tests: ubifs_tools: fsck_tests: Add corrupted images</title>
<updated>2024-11-11T09:32:46+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:08:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=4e6f5098716ad2bf8859a1915fc0e42e69eaf88a'/>
<id>urn:sha1:4e6f5098716ad2bf8859a1915fc0e42e69eaf88a</id>
<content type='text'>
This is a preparation for adding bad images fsck testcase. There is
no debugfs tools (for example: debugfs[ext4], xfs_db) for UBIFS, so
there is no way to inject precise corruption into UBIFS image, we have
to prepare inconsistent UBIFS images in advance like e2fsprogs[1] does.
(Goto [2] to see how to generate inconsistent UBIFS images).
Original UBIFS image content:
 /
 ├── corrupt_file (xattr - user.corrupt:123, 2K data)
 ├── dir
 │   ├── block_dev
 │   ├── char_dev
 │   ├── dir
 │   └── file (content: '123')
 ├── hardl_corrupt_file =&gt; corrupt_file
 └── softl_corrupt_file -&gt; corrupt_file

Here's a descriptons of the various testing images:
=========================================================================
      image         |     Description     |          expectancy
-------------------------------------------------------------------------
good                | good image contains | fsck success, fs content is
                    | kinds of files.     | not changed.
-------------------------------------------------------------------------
sb_fanout           | invalid fanout in   | fsck failed.
                    | superblock.         |
-------------------------------------------------------------------------
sb_fmt_version      | invalid fmt_version | fsck failed.
                    | in superblock.      |
-------------------------------------------------------------------------
sb_leb_size         | invalid leb_size in | fsck failed.
                    | superblock.         |
-------------------------------------------------------------------------
sb_log_lebs         | invalid log lebs in | fsck failed.
                    | superblock.         |
-------------------------------------------------------------------------
sb_min_io_size      | invalid min_io_size | fsck failed.
                    | in superblock.      |
-------------------------------------------------------------------------
master_highest_inum | invalid highest_inum| fsck success, fs content is
                    | in master nodes.    | not changed.
-------------------------------------------------------------------------
master_lpt          | bad lpt pos in      | fsck success, fs content is
                    | master nodes.       | not changed.
-------------------------------------------------------------------------
master_tnc          | bad tnc pos in      | fsck success, fs content is
                    | master nodes.       | not changed.
-------------------------------------------------------------------------
master_total_dead   | bad total_dead in   | fsck success, fs content is
                    | master nodes.       | not changed.
-------------------------------------------------------------------------
master_total_dirty  | bad total_dirty in  | fsck success, fs content is
                    | master nodes.       | not changed.
-------------------------------------------------------------------------
master_total_free   | bad total_free in   | fsck success, fs content is
                    | master nodes.       | not changed.
-------------------------------------------------------------------------
journal_log         | corrupted log area. | fsck success, fs content is
                    |                     | not changed.
-------------------------------------------------------------------------
journal_bud         | corrupted bud area. | fsck success, file data is
                    |                     | lost.
-------------------------------------------------------------------------
orphan_node         | bad orphan node.    | fsck success, file is
                    |                     | deleted as expected.
-------------------------------------------------------------------------
lpt_dirty           | bad dirty in pnode. | fsck success, fs content is
                    |                     | not changed.
-------------------------------------------------------------------------
lpt_flags           | bad flags in pnode  | fsck success, fs content is
                    | (eg. index).        | not changed.
-------------------------------------------------------------------------
lpt_free            | bad free in pnode.  | fsck success, fs content is
                    |                     | not changed.
-------------------------------------------------------------------------
lpt_pos             | bad pos in nnode.   | fsck success, fs content is
                    |                     | not changed.
-------------------------------------------------------------------------
ltab_dirty          | bad dirty in lprops | fsck success, fs content is
                    | table.              | not changed.
-------------------------------------------------------------------------
ltab_free           | bad free in lprops  | fsck success, fs content is
                    | table.              | not changed.
-------------------------------------------------------------------------
index_size          | bad index size in   | fsck success, fs content is
                    | master nodes.       | not changed.
-------------------------------------------------------------------------
tnc_lv0_key         | bad key in lv0      | fsck success, fs content is
                    | znode.              | not changed.
-------------------------------------------------------------------------
tnc_lv0_len         | bad len in lv0      | fsck success, fs content is
                    | znode.              | not changed.
-------------------------------------------------------------------------
tnc_lv0_pos         | bad pos in lv0      | fsck success, fs content is
                    | znode.              | not changed.
-------------------------------------------------------------------------
tnc_noleaf_key      | bad key in non-leaf | fsck success, fs content is
                    | znode.              | not changed.
-------------------------------------------------------------------------
tnc_noleaf_len      | bad len in non-leaf | fsck success, fs content is
                    | znode.              | not changed.
-------------------------------------------------------------------------
tnc_noleaf_pos      | bad pos in non-leaf | fsck success, fs content is
                    | znode.              | not changed.
-------------------------------------------------------------------------
corrupted_data_leb  | corrupted data leb. | fsck success, partial data of
                    |                     | file is lost.
-------------------------------------------------------------------------
corrupted_idx_leb   | corrupted index leb.| fsck success, fs content is
                    |                     | not changed.
-------------------------------------------------------------------------
inode_data          | bad data node.      | fsck success, file content
                    |                     | is changed, other files are
                    |                     | not changed.
-------------------------------------------------------------------------
inode_mode          | bad inode mode for  | fsck success, file is
                    | file.               | dropped, other files are not
                    |                     | changed.
-------------------------------------------------------------------------
inode_nlink         | wrong nlink for     | fsck success, nlink is
                    | file.               | corrected, fs content is not
                    |                     | changed.
-------------------------------------------------------------------------
inode_size          | wrong inode size    | fsck success, inode size is
                    | for file.           | corrected, fs content is not
                    |                     | changed.
-------------------------------------------------------------------------
inode_xcnt          | wrong inode         | fsck success, xattr_cnt is
                    | xattr_cnt for file. | corrected, fs content is not
                    |                     | changed.
-------------------------------------------------------------------------
soft_link_inode_mode| bad inode mode for  | fsck success, soft link
                    | solf link file.     | file is dropped, other files
                    |                     | are not changed.
-------------------------------------------------------------------------
soft_link_data_len  | bad inode data_len  | fsck success, soft link
                    | for solt link file. | file is dropped, other files
                    |                     | are not changed.
-------------------------------------------------------------------------
dentry_key          | bad dentry key for  | fsck success, dentry is
                    | file.               | removed, other files are
                    |                     | not changed.
-------------------------------------------------------------------------
dentry_nlen         | inconsistent nlen   | fsck success, dentry is
                    | and name in dentry  | removed, other files are
                    | for file.           | not changed.
-------------------------------------------------------------------------
dentry_type         | inconsistent type   | fsck success, dentry is
                    | between dentry and  | removed, other files are
                    | inode for file.     | not changed.
-------------------------------------------------------------------------
xinode_flags        | lost UBIFS_XATTR_FL | fsck success, xattr is
                    | in xattr inode      | removed, other files are
                    | flags for file.     | not changed.
-------------------------------------------------------------------------
xinode_key          | bad xattr inode key | fsck success, xattr is
                    | for file.           | removed, other files are
                    |                     | not changed.
-------------------------------------------------------------------------
xinode_mode         | bad xattr inode     | fsck success, xattr is
                    | mode for file.      | removed, other files are
                    |                     | not changed.
-------------------------------------------------------------------------
xentry_key          | bad xattr entry key | fsck success, xattr is
                    | for file.           | removed, other files are
                    |                     | not changed.
-------------------------------------------------------------------------
xentry_nlen         | inconsistent nlen   | fsck success, xattr is
                    | and name in xattr   | removed, other files are
                    | entry for file.     | not changed.
-------------------------------------------------------------------------
xentry_type         | inconsistent type   | fsck success, xattr is
                    | between xattr entry | removed, other files are
                    | and xattr inode for | not changed.
                    | file.               |
-------------------------------------------------------------------------
xent_host           | the xattr's host    | fsck success, file, hard
                    | is a xattr too, the | link and soft link are
                    | flag of corrupt_file| dropped, other files are
                    | inode is modified.  | not changed.
-------------------------------------------------------------------------
dir_many_dentry     | dir has too many    | fsck success, hard link is
                    | dentries, the dentry| dropped, other files are not
                    | of hard link is     | changed.
                    | modified.           |
-------------------------------------------------------------------------
dir_lost            | bad dentry for dir. | fsck success, the 'file' is
                    |                     | recovered under lost+found,
                    |                     | left files under dir are
                    |                     | removed, other files are not
                    |                     | changed.
-------------------------------------------------------------------------
dir_lost_duplicated | bad inode for dir,  | fsck success, the 'file' is
                    | there is a file     | recovered with INO_&lt;inum&gt;_1
                    | under lost+found,   | under lost+found, left files
                    | which named with the| under dir are removed, other
                    | inum of the 'file'. | files are not changed.
-------------------------------------------------------------------------
dir_lost_not_recover| bad inode for dir,  | fsck success, all files
                    | lost+found is a     | under dir are removed,
                    | regular file and    | other files are not changed.
                    | exists under root   |
                    | dir.                |
-------------------------------------------------------------------------
root_dir            | bad '/'.            | fsck success, create new
                    |                     | root dir('/'). All regular
                    |                     | files are reocovered under
                    |                     | lost+found, other files are
                    |                     | removed.
-------------------------------------------------------------------------
empty_tnc           | all files have bad  | fsck success, fs content
                    | inode.              | becomes empty.
=========================================================================

[1] https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/tree/tests/README
[2] https://bugzilla.kernel.org/show_bug.cgi?id=218924

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>tests: Add common libs for testing fsck.ubifs/mkfs.ubifs</title>
<updated>2024-11-11T09:32:46+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:08:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=4fd91da892b2c24a6755d901da7934510e2260a1'/>
<id>urn:sha1:4fd91da892b2c24a6755d901da7934510e2260a1</id>
<content type='text'>
This is a preparation for adding testcases for fsck.ubifs and
mkfs.ubifs. Add some common functions, for example: powercut,
load_mtdram, mount_ubifs, encryption operations, etc.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Unify handling of configure switches</title>
<updated>2024-02-19T08:04:00+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-02-28T14:34:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=edc83b61745e6ee7fa9c9502eb520493832b1e9c'/>
<id>urn:sha1:edc83b61745e6ee7fa9c9502eb520493832b1e9c</id>
<content type='text'>
Remove the strict check of the with or enable value and use the
generated variable instead of our own.

Also, don't use WITH_GETRANDOM as an implicit WITH_UBIHEALTHD, split
the two autoconf/automake variables and handle them separately.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Make zlib an optional dependency</title>
<updated>2024-02-18T13:27:31+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2024-02-17T15:37:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=2465754716634422620b4577e0b7ba79c4ce1a39'/>
<id>urn:sha1:2465754716634422620b4577e0b7ba79c4ce1a39</id>
<content type='text'>
Now that we have plumbing in place for both jffsX-utils and mkfs.ubifs,
add the missing autoconf and automake changes to allow mtd-utils to be
built without a hard dependency on zlib.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Make it possible to compile jffsX-utils without zlib</title>
<updated>2024-02-18T12:54:59+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2024-02-18T12:52:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=3f73bfb3e09c407425245aa5f62477fd572328c9'/>
<id>urn:sha1:3f73bfb3e09c407425245aa5f62477fd572328c9</id>
<content type='text'>
The jffsX-utils already have a CONFIG_JFFS2_ZLIB define, but it is
statically defined in a header and not used consistently. This patch
first replaces it with a "WITH_ZLIB" define, provided via automake,
to bring it in line with the already existing "WITH_LZO". Then, the
missing checks and typedefs are added in jffs2reader.c.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup handling of optional dependencies</title>
<updated>2024-02-15T14:07:17+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-02-28T12:50:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=6fcdc552ffdca93334ffe2d044745c83de0722fa'/>
<id>urn:sha1:6fcdc552ffdca93334ffe2d044745c83de0722fa</id>
<content type='text'>
Don't use super pedantic parsing of the argument and work with the
generated variable instead of assigning it to our own and set it
to "check" if not value is assigned. Then search for a dependency
if the with variable is anything other than "no" and fail if it
was set to "yes".

In addition, the WITHOUT_xxx defines are replaced with WITH_xxx defines.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Add a README file</title>
<updated>2023-09-03T12:41:26+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2023-09-03T12:41:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=fb7b905de6b9154b3cc46a4ae39a40f9385749f2'/>
<id>urn:sha1:fb7b905de6b9154b3cc46a4ae39a40f9385749f2</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Piece together a CHANGELOG file from the release announcments</title>
<updated>2023-09-02T15:00:17+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2023-09-02T14:56:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f0c0022d8cb9337015df845d9a31fbab39b87327'/>
<id>urn:sha1:f0c0022d8cb9337015df845d9a31fbab39b87327</id>
<content type='text'>
The CHANGELOG tries to summarize the change history of the project
and currently contains changes from 2.0.0 onwards that could easily
be extracted from the release mails.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: Use AC_SYS_LARGEFILE</title>
<updated>2021-02-28T12:36:26+00:00</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2021-02-26T10:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=e91700286ff531f344f4d9a1f1c96c501bfeadad'/>
<id>urn:sha1:e91700286ff531f344f4d9a1f1c96c501bfeadad</id>
<content type='text'>
Currently mtd-utils on 32bit systems fail on devices &gt;2GiB due to off_t being
a signed 32bit type. Add AC_SYS_LARGEFILE to make off_t a 64bit type.
Adding AC_SYS_LARGEFILE results in _FILE_OFFSET_BITS being defined to 64
in include/config.h. To let this have an effect we must make sure that
include/config.h is included before all other includes which is
archieved by adding its inclusion to CPPFLAGS.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
