<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git, branch v2.1.5</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.5</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.5'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2022-10-07T11:02:04+00:00</updated>
<entry>
<title>Release mtd-utils-2.1.5</title>
<updated>2022-10-07T11:02:04+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2022-10-07T11:02:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=3f3b4cc6c3120107e7aaa21c6415772a255ac49c'/>
<id>urn:sha1:3f3b4cc6c3120107e7aaa21c6415772a255ac49c</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix warning about unaligned pointer in jffs2reader</title>
<updated>2022-10-07T10:58:44+00:00</updated>
<author>
<name>Frederic Germain</name>
<email>frederic.germain@gmail.com</email>
</author>
<published>2021-11-09T08:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=3f8ad12b92be3183e457def7c790291a7fb0d08b'/>
<id>urn:sha1:3f8ad12b92be3183e457def7c790291a7fb0d08b</id>
<content type='text'>
gcc 9.3.0-17ubuntu1~20.04 warning on time_t ctime value is :

Fix taking address of packed member of ‘struct jffs2_raw_inode’ may
result in an unaligned pointer value [-Waddress-of-packed-member].

Signed-off-by: Frederic Germain &lt;frederic.germain@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>.gitignore: add new ubiscan utility</title>
<updated>2022-10-07T10:58:41+00:00</updated>
<author>
<name>Frederic Germain</name>
<email>frederic.germain@gmail.com</email>
</author>
<published>2021-11-09T08:17:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=d798e9168cb0efe8883fb77a97fc893a210acf01'/>
<id>urn:sha1:d798e9168cb0efe8883fb77a97fc893a210acf01</id>
<content type='text'>
Signed-off-by: Frederic Germain &lt;frederic.germain@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>nor-utils: fix memory leak</title>
<updated>2022-10-04T21:29:26+00:00</updated>
<author>
<name>liaohua</name>
<email>liaohua4@huawei.com</email>
</author>
<published>2022-02-18T03:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=59fe9659c82e78bb02d06aa2581ba78061304013'/>
<id>urn:sha1:59fe9659c82e78bb02d06aa2581ba78061304013</id>
<content type='text'>
This patch replace "free(rfd.sector_map)" with "free(rfd.header)"
to fix memory leak.

Signed-off-by: liaohua &lt;liaohua4@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libmtd: do not ignore non-zero eraseblock size when MTD_NO_ERASE is set</title>
<updated>2022-09-27T06:32:46+00:00</updated>
<author>
<name>Enrico Jorns</name>
<email>ejo@pengutronix.de</email>
</author>
<published>2022-08-19T12:32:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=b83c64f7a12538417649accc1269c22d5ff074bb'/>
<id>urn:sha1:b83c64f7a12538417649accc1269c22d5ff074bb</id>
<content type='text'>
In 54d68799, mtd-&gt;eb_cnt was enforced to be '1' if MTD_NO_ERASE is set.
This was done with the aim of preventing divisions by zero.

However, even if MTD_NO_ERASE is set, mtd-&gt;eb_size (eraseblock size) can
still be set to a non-zero value which would not cause a division by
zero.

Instead, enforcing an eraseblock count of '1' here even leads to
inconsistent eraseblock counting in mtd-utils and lets for example a
'flash_erase' on an mtdnand device fail:

| # flash_erase /dev/mtd0 0 0
| Erasing 32768 Kibyte @ 0 --  0 % complete libmtd: error!: bad eraseblock number 255, mtd0 has 1 eraseblocks
| flash_erase: error!: /dev/mtd0: MTD Erase entire chip failureTrying one by one each sector.
|              error 22 (Invalid argument)
| Erasing 128 Kibyte @ 0 --  0 % complete libmtd: error!: bad eraseblock number 1, mtd0 has 1 eraseblocks
| flash_erase: error!: /dev/mtd0: MTD get bad block failed
|              error 22 (Invalid argument)

Also mtdinfo would look inconsistent (eraseblock size vs amount):

| # mtdinfo /dev/mtd0
| mtd0
| Name:                           mtdram test device
| Type:                           ram
| Eraseblock size:                131072 bytes, 128.0 KiB
| Amount of eraseblocks:          1 (33554432 bytes, 32.0 MiB)
| Minimum input/output unit size: 1 byte
| Sub-page size:                  1 byte
| Character device major/minor:   90:0
| Bad blocks are allowed:         false
| Device is writable:             true

Fix this by enforcing mtd-&gt;eb_cnt to be '1' only when mtd-&gt;eb_size is
actually zero and would lead to a division by zero otherwise.

Fixes: 54d68799 ("libmtd: avoid divide by zero")

Signed-off-by: Enrico Jorns &lt;ejo@pengutronix.de&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: flash_otp_dump make offset optional</title>
<updated>2022-09-27T06:32:46+00:00</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2022-08-18T09:35:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=374d3cd10eebacae3f5e987ce9e8cf8e8418a4db'/>
<id>urn:sha1:374d3cd10eebacae3f5e987ce9e8cf8e8418a4db</id>
<content type='text'>
Commit 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to
flash_otp_dump") introduced an offset parameter. This should have
been optional, but there was a typo. Fix it.

Reported-by: Sergei Antonov &lt;saproj@gmail.com&gt;
Fixes: 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to flash_otp_dump")
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Reviewed-by: Sergei Antonov &lt;saproj@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mkfs.jffs2: fix spelling of --compression-mode parameter in help text</title>
<updated>2022-09-27T06:32:46+00:00</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2022-09-22T03:14:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=df12f903eb26c5abbdcaa44732ff36b17c3a6032'/>
<id>urn:sha1:df12f903eb26c5abbdcaa44732ff36b17c3a6032</id>
<content type='text'>
--compr-mode is not accepted as an alias of --compression-mode.

Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>tests: Remove unused linux/fs.h header from includes</title>
<updated>2022-08-08T06:20:58+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2022-08-07T03:21:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ac98b3fc7cb9c122bea4b5d1d351727eb4ea0bac'/>
<id>urn:sha1:ac98b3fc7cb9c122bea4b5d1d351727eb4ea0bac</id>
<content type='text'>
This header is not needed, moreover it includes linux/mount.h which is
now in conflict[1] with glibc provided sys/mount.h from glibc 2.36 onwards

[1] https://sourceware.org/glibc/wiki/Release/2.36

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>nandflipbits: fix corrupted oob</title>
<updated>2022-06-27T05:58:48+00:00</updated>
<author>
<name>Christophe Kerello</name>
<email>christophe.kerello@foss.st.com</email>
</author>
<published>2022-06-16T07:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a315011bd3c237660436e0c796743d61acf4a7b6'/>
<id>urn:sha1:a315011bd3c237660436e0c796743d61acf4a7b6</id>
<content type='text'>
If a bit is flipped in block 1 or higher, the OOB is corrupted with the
OOB of block 0. Mtd_read_oob API has to take into account the block number
to be able to calculate the right offset.

Fixes: 9fc8db29cf62 ("mtd-utils: Add nandflipbits tool")
Signed-off-by: Christophe Kerello &lt;christophe.kerello@foss.st.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubinfo: Fix --vol_id return code for absent volume id</title>
<updated>2022-06-13T11:39:05+00:00</updated>
<author>
<name>Andrew Mellor</name>
<email>andrew.mellor@casa-systems.com</email>
</author>
<published>2022-06-06T06:38:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=9beb813521d23d7f957fc80c6603810893c8ee53'/>
<id>urn:sha1:9beb813521d23d7f957fc80c6603810893c8ee53</id>
<content type='text'>
When using --vol_id and that volume is missing, it should return
non-zero like the --name option does.

Signed-off-by: Andrew Mellor &lt;andrew.mellor@casa-systems.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
