<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/ubi-utils, branch v2.1.0</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.0</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.0'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2019-01-25T11:50:13+00:00</updated>
<entry>
<title>mtd-utils: avoid to create two UBI_LAYOUT_VOLUME_ID volume</title>
<updated>2019-01-25T11:50:13+00:00</updated>
<author>
<name>Yufen Yu</name>
<email>yuyufen@huawei.com</email>
</author>
<published>2019-01-25T07:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=4a5a10a3dfe13d3f546ee4acbe2a96054ae423f7'/>
<id>urn:sha1:4a5a10a3dfe13d3f546ee4acbe2a96054ae423f7</id>
<content type='text'>
When we create a ubi image by ubinize, a UBI_LAYOUT_VOLUME_ID
volume will be created by ubigen_write_layout_vol().
However, after the commit 4c00cf2c5816 (ubiformat: remove
no-volume-table option), ubiformat remove novtbl args in format().
As a result, it will also create a layout volume.

When we attempt to do ubiattach, it will fail for ubi_compare_lebs error:
ubi0 error: ubi_compare_lebs: unsupported on-flash UBI format
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd1, error -22

Signed-off-by: Yufen Yu &lt;yuyufen@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi-utils: ubimkvol: Initialize req to zero to make sure no flags are set by default</title>
<updated>2018-07-26T22:55:02+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@bootlin.com</email>
</author>
<published>2018-07-26T14:05:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=6922b87e1b5190fce4db6ecc5b416672a8a4d6ba'/>
<id>urn:sha1:6922b87e1b5190fce4db6ecc5b416672a8a4d6ba</id>
<content type='text'>
The program expects req.flags to be zero-initialized, but it's not
the case. Let's explicitly initialize req to zero at declaration time.

Fixes: 7b4a65a27d26 ("ubi-utils: ubimkvol: add support for skipping CRC check of a static volume when opening")
Reviewed-by: Quentin Schulz &lt;quentin.schulz@bootlin.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi-utils: ubinize: add support for skipping CRC check of a static volume when opening</title>
<updated>2018-06-28T08:23:23+00:00</updated>
<author>
<name>Quentin Schulz</name>
<email>quentin.schulz@bootlin.com</email>
</author>
<published>2018-06-28T07:43:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=9095d213f536aec0f3c37f6666177f3b907afde7'/>
<id>urn:sha1:9095d213f536aec0f3c37f6666177f3b907afde7</id>
<content type='text'>
Let's let the user configure static UBI volume with CRC checking at
opening disabled if desired.

Introduce the skip-check setting for vol_flags configuration of a
volume.

There is no point in having both autoresize and skip-check set as
skip-check is reserved for static volumes only and it's useless to have
a static volume's size set to autoresize.

Suggested-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Quentin Schulz &lt;quentin.schulz@bootlin.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi-utils: ubimkvol: add support for skipping CRC check of a static volume when opening</title>
<updated>2018-06-28T08:23:03+00:00</updated>
<author>
<name>Quentin Schulz</name>
<email>quentin.schulz@bootlin.com</email>
</author>
<published>2018-06-28T07:43:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=7b4a65a27d2621b58c634d02c6a068ed9562383c'/>
<id>urn:sha1:7b4a65a27d2621b58c634d02c6a068ed9562383c</id>
<content type='text'>
Let's let the user create static UBI volume with CRC checking at opening
disabled if desired.

Introduce the `--skipcheck` or `-k` option for such feature.

Suggested-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Quentin Schulz &lt;quentin.schulz@bootlin.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubiformat: remove no-volume-table option</title>
<updated>2018-05-12T20:17:16+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2018-05-12T20:17:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=4c00cf2c5816b69754bf7304edcd0e3eb604e3b3'/>
<id>urn:sha1:4c00cf2c5816b69754bf7304edcd0e3eb604e3b3</id>
<content type='text'>
Using the -n or --no-volume-table flags, ubiformat can format an mtd device
to a broken UBI that does not attach on recent kernel. Only very old UBIs
had no volume table.

This patch removes the option entirely from ubiformat.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubiformat: process command line arguments first</title>
<updated>2018-05-12T19:59:19+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2018-05-12T19:51:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=b7c71d8541bf5830afe36e3fa5a925c4b78df04a'/>
<id>urn:sha1:b7c71d8541bf5830afe36e3fa5a925c4b78df04a</id>
<content type='text'>
If libmtd_open fails, the program always exists with failure status
and prints "MTD subsystem is not present".

Even `ubiformat --help` produces the same result, which is definitely
undesired.

This patch moves command line option processing first to get the desired
behavior.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi-utils: ubiformat.c: convert to integer arithmetic</title>
<updated>2018-01-30T08:24:22+00:00</updated>
<author>
<name>Andrea Adami</name>
<email>andrea.adami@gmail.com</email>
</author>
<published>2018-01-29T22:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c75d1044ea8a04e6808e20814a92beb8657c8f95'/>
<id>urn:sha1:c75d1044ea8a04e6808e20814a92beb8657c8f95</id>
<content type='text'>
Do not cast percent to double, it is just used as upper limit.
Avoid floating point to fix compilation for aarch64 against klibc:

error: '-mgeneral-regs-only' is incompatible with floating-point code
|    int percent = ((double)si-&gt;ok_cnt)/si-&gt;good_cnt * 100;
|        ^~~~~~~

Notes:
* The checks in the code above this line ensure that si-&gt;good_cnt is not 0.

* The code assumes  si-&gt;good_cnt * 100  will not overflow, then we can use
  (si-&gt;ok_cnt * 100) safely because the former is bigger.

* The truncated result does not affect the logic:
  i.e. a value of 49.9 is truncated to 49 and is still &lt;50.

Signed-off-by: Andrea Adami &lt;andrea.adami@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi-utils: ubicrc32: process command line arguments first</title>
<updated>2017-11-03T18:41:32+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-09-21T12:18:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=3c54e4e46c2248ed9143c2f07670307185719331'/>
<id>urn:sha1:3c54e4e46c2248ed9143c2f07670307185719331</id>
<content type='text'>
When a command line option is used (e.g. --version), the tool
tries to open it as a file first, then *uppon success* attempts
to process the command line options (including what it assumed
to be an input file) which is obviously broken.

This patch moves command line processing first and then attempts
to open *the first unprocessed* argument.

Reported-by: Uwe Kleine-König &lt;ukleinek@debian.org&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Mark or fix switch cases that fall through</title>
<updated>2017-11-02T00:34:18+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-09-21T09:15:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=475bf707b958f37844534b7b45c905521c7401a2'/>
<id>urn:sha1:475bf707b958f37844534b7b45c905521c7401a2</id>
<content type='text'>
Now that C++17 introduced a special fallthrough keyword for
explicitly tagging switch cases that are supposed to fall
through, newer gcc versions also implement a feature request
from 2002 to warn about maybe unwanted fall-throughs in switch
cases in other languages (like C).

For C code, we can either add a gcc specific attribute at the
end of the switch case, or use a special comment that gcc checks
for, indicating that the fall-through behaviour is indeed
intended.

This patch adds a "/* fall-through */" comment at the end of
various case blocks to silence gcc warnings and in some cases
a break, where fall-through was probably not intended.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: ubinfo: add parameter check</title>
<updated>2017-08-10T09:46:49+00:00</updated>
<author>
<name>Aaron Marcher</name>
<email>me@drkhsh.at</email>
</author>
<published>2017-08-08T10:53:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=76a55b190c3b15f512c1daf5976249b38db916d6'/>
<id>urn:sha1:76a55b190c3b15f512c1daf5976249b38db916d6</id>
<content type='text'>
Adds a check if the UBI device number is specified when passing a volume
name as parameter.

This fixes an issue, where by default an inexistent UBI device named
"ubi-1" is selected because of missing checks.

Signed-off-by: Aaron Marcher &lt;me@drkhsh.at&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
