<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/ubi-utils, branch v2.0.2</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2018-01-30T08:24:22+00:00</updated>
<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>
<entry>
<title>ubi-utils: Return error code if command line option is unknown</title>
<updated>2017-06-14T09:00:30+00:00</updated>
<author>
<name>Daniel Wagner</name>
<email>daniel.wagner@siemens.com</email>
</author>
<published>2017-06-12T10:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=76e27a79eddb6279bbbc0ec840d66b753a9ba0f3'/>
<id>urn:sha1:76e27a79eddb6279bbbc0ec840d66b753a9ba0f3</id>
<content type='text'>
The tools in question will quit with an exit code 0 if the command
line option was not recognized. By returning an error code a calling
script has the possibility to distinguish between a real success and
an invalid invocation.

We need to return -1 instead of EXIT_FAILURE to be consistent with the
other exit code places.

Signed-off-by: Daniel Wagner &lt;daniel.wagner@siemens.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix libmtd behaviour if MTD is not present on the system</title>
<updated>2017-03-15T11:10:34+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-03-15T10:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a2eeedb0a7af1d8ebe8593cb9a9bb994d2854e63'/>
<id>urn:sha1:a2eeedb0a7af1d8ebe8593cb9a9bb994d2854e63</id>
<content type='text'>
The documentation of libmtd_open says, if it returns NULL and errno is
zero, MTD is not present. However, the current version always returns
a libmtd_t object. The function internally checks, if it can access the
MTD sysfs files and, if not, sets a flag to use the procfs fallback.

This patch adds an additional check to libmtd_open, to test if the
MTD procfs file can be read and fails with errno cleared if it does
not exist.

Furhtermore, mtd_get_info is documented to fail with errno set to ENODEV
if MTD is not present. First of all, this was broken in the original
version. It was implemented to specification for the sysfs code path,
but if MTD is not present, that won't be executed, because of the flag
set by libmtd_open. This makes the check not only redundant, but masks
an actual error (the sysfs paths suddenly not being readable anymore).
The legacy path that was used if the sysfs files are not avaible fails
with ENOENT if it cannot read the procfs file. With the above changes
in addition, we don't have a libmtd_t object if neither sysfs nor
procfs is readable, so this error status no longer makes sense.

This patch removes the documentation on the ENODEV errno, and
makes sure that mtd_get_info always returns with apropriate errno
on failure.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubirename: trivial fixes to the help text</title>
<updated>2017-02-20T13:16:38+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca@lucaceresoli.net</email>
</author>
<published>2017-02-12T21:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=e3e010c0241fece55485346c2e7d6e9133fca6bc'/>
<id>urn:sha1:e3e010c0241fece55485346c2e7d6e9133fca6bc</id>
<content type='text'>
Add a missing space after PROGRAM_NAME and fix a typo.

Signed-off-by: Luca Ceresoli &lt;luca@lucaceresoli.net&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Move ubi-utils libraries to common library location</title>
<updated>2016-11-17T10:36:56+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2016-09-01T13:52:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=db4146e84f3310a1e1de6f6d45f2ac35a0b0a604'/>
<id>urn:sha1:db4146e84f3310a1e1de6f6d45f2ac35a0b0a604</id>
<content type='text'>
Historically, the mtd-utils and ubi-utils were seperate packages. The
ubi-utils were at some point merged into the mtd-utils. They first
appeared in the release tar-ball in version 1.1.0 in their own
sub-hirarchy with their own buildsystem, readme, documentation, etc.
A lot of the duplicated stuff got centralized/removed over time.

This patch further cleans up the directory hirarchy duplication by
moving common libraries from the ubi-utils/ into the central lib/
and include/ directories in the top directory of the mtd-utils package.

This includes:
 - libuib.a &amp; libubigen.a used by the ubi utilities
 - libscan.a currently only used by ubiformat
 - libiniparser.a used by ubinize

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Merge rest of ubiutils-common into libmtd common</title>
<updated>2016-11-17T10:36:56+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2016-09-01T13:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f4ec4511d0729802e783b1757d6bcd556737510e'/>
<id>urn:sha1:f4ec4511d0729802e783b1757d6bcd556737510e</id>
<content type='text'>
This patch moves the remaining 3 functions from ubiutils-common.{c,h}
into libmtd common.{c,h}.

The functions are only generic utility functions that other mtd-utils
programs may also find usefull and every program that uses libubi links
against libmtd anyway so there is no real reason for keeping around a
seperate ubiutils-common with only generic helper functions.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Remove unused ubiutils_print_text from ubi-utils common</title>
<updated>2016-11-17T10:36:56+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2016-09-01T13:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=dbb13d2f0eba1770a96cac537218e7625556e172'/>
<id>urn:sha1:dbb13d2f0eba1770a96cac537218e7625556e172</id>
<content type='text'>
The function ubiutils_print_text was previously used by ubinize to
pretty-print parts of the help text. Since the help text has been
moved to a man page, the function is no longer used/needed.

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