<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/lib, branch v2.1.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.1.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2018-10-02T12:00:28+00:00</updated>
<entry>
<title>mtd-utils: Instead of doing preprocessor magic, just output off_t as long long</title>
<updated>2018-10-02T12:00:28+00:00</updated>
<author>
<name>Thorsten Glaser</name>
<email>tg@mirbsd.org</email>
</author>
<published>2018-09-20T23:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=64667fe63ba9dd78adb9c4abf04bc3e4e25a0fd7'/>
<id>urn:sha1:64667fe63ba9dd78adb9c4abf04bc3e4e25a0fd7</id>
<content type='text'>
Fix warnings abot PRIdoff_t in libmtd.c, in mtd_read (and mtd_write):

In file included from ../git/lib/libmtd.c:40:0:
../git/lib/libmtd.c: In function 'mtd_read':
../git/include/common.h:110:18: warning: format '%ld' expects argument of
 type 'long int', but argument 5 has type 'off_t {aka long long int}'
 [-Wformat=]

../git/include/common.h:120:2: note: in expansion of macro 'errmsg'
  errmsg(fmt, ##__VA_ARGS__);                                         \
  ^~~~~~
../git/lib/libmtd.c:1082:10: note: in expansion of macro 'sys_errmsg'
   return sys_errmsg("cannot seek mtd%d to offset %"PRIdoff_t,
          ^~~~~~~~~~

/usr/lib/klibc/include/inttypes.h:28:17: note: format string is defined here
 #define PRId32 "d"

Signed-off-by: Thorsten Glaser &lt;tg@mirbsd.org&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libmtd: don't print an error message for devices without ecc support</title>
<updated>2018-09-20T09:27:01+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2018-09-12T07:40:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a63a209d8ee8f21722a3b07d01d904bca5dbbc31'/>
<id>urn:sha1:a63a209d8ee8f21722a3b07d01d904bca5dbbc31</id>
<content type='text'>
The libmtd library tries to obtain the available OOB size via the sysfs
with a fallback to the ECCGETLAYOUT ioctl. For some devices (e.g. plat-ram),
the fallback path is always taken and prints an error message to stderr
since the ioctl fails.

This patch fixes the fallback path by suppressing the error message if
errno is set to EOPNOTSUPP (i.e. the device simply doesn't support that).

Fixes: a10353584f93 ("libmtd: Add support to access OOB available size")
Reported-by: Chris Packham &lt;Chris.Packham@alliedtelesis.co.nz&gt;
Reviewed-by: Xiaolei Li &lt;xiaolei.li@mediatek.com&gt;
Tested-by: Chris Packham &lt;Chris.Packham@alliedtelesis.co.nz&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libubi: add volume flags to ubi_mkvol_request</title>
<updated>2018-06-28T08:21:51+00:00</updated>
<author>
<name>Quentin Schulz</name>
<email>quentin.schulz@bootlin.com</email>
</author>
<published>2018-06-28T07:43:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=5e9bc0daa41d84ce5de81c4a1665d65f51893c10'/>
<id>urn:sha1:5e9bc0daa41d84ce5de81c4a1665d65f51893c10</id>
<content type='text'>
Now that we have per-UBI volume flags (for instance for skipping CRC
check when opening it) from the Linux header, let's add it to the
ubi_mkvol_request in libubi and assign the flags to ubi_mkvol_req from
the Linux header from ubi_mkvol.

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>Revert "Return correct error number in ubi_get_vol_info1"</title>
<updated>2018-06-09T16:09:39+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2018-06-09T14:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=0f833ac73ad631248826386e2918d8571ecf0347'/>
<id>urn:sha1:0f833ac73ad631248826386e2918d8571ecf0347</id>
<content type='text'>
This reverts commit dede98ffb706676309488d7cc660f569548d5930.

The original commit tried to fix a descrepancy between the implementation
and the documentation by making the implementation comply.

When making the change, it was overlooked, that ubinfo and ubirename were
written against the implementation instead of the behaviour specified by
the documentation. So were further internal functions like
ubi_get_vol_info1_nm which further breaks ubirmvol.

A report with an outline of a resulting problem can be read on
the mailing list:

http://lists.infradead.org/pipermail/linux-mtd/2018-June/081562.html

From the report:

steps to reproduce: have mtd-utils 2.0.1 or 2.0.2

0. make a bunch of ubi volumes in sequential order

ubimkvol /dev/ubi0 -s 64KiB -N test1
ubimkvol /dev/ubi0 -s 64KiB -N test2
ubimkvol /dev/ubi0 -s 64KiB -N test3
ubimkvol /dev/ubi0 -s 64KiB -N test4
..

1. delete the test1 volume, making a hole in the volume table

ubirmvol /dev/ubi0 -N test1

2. try an affected tool (i.e. "ubirmvol /dev/ubi0 -N test4" )

 |root at mr24:/# ubirmvol /dev/ubi0 -N test4
 |ubirmvol: error!: cannot find UBI volume "test4"
 |         error 19 (No such device)

or "ubinfo -a"

 | root at mr24:/# ubinfo -a
 | UBI version:                    1
 | Count of UBI devices:           1
 | UBI control device major/minor: 10:59
 | Present UBI devices:            ubi0
 |
 | ubi0
 | Volumes count:                           11
 | Logical eraseblock size:                 15872 bytes, 15.5 KiB
 | Total amount of logical eraseblocks:     1952 (30982144 bytes, 29.5 MiB)
 | Amount of available logical eraseblocks: 75 (1190400 bytes, 1.1 MiB)
 | Maximum count of volumes                 92
 | Count of bad physical eraseblocks:       0
 | Count of reserved physical eraseblocks:  40
 | Current maximum erase counter value:     984
 | Minimum input/output unit size:          512 bytes
 | Character device major/minor:            251:0
 | ubinfo: error!: libubi failed to probe volume 5 on ubi0
 |        error 19 (No such device)
 | Present volumes:                         0, 1, 2, 3, 4root at mr24:/#

Reported-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libmtd_legacy: Fix some function description mismatches</title>
<updated>2018-04-10T13:38:59+00:00</updated>
<author>
<name>Xiaolei Li</name>
<email>xiaolei.li@mediatek.com</email>
</author>
<published>2018-04-10T07:36:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=165f2cd9f5d63fb3b3200d2ad202cf3e4f820fc4'/>
<id>urn:sha1:165f2cd9f5d63fb3b3200d2ad202cf3e4f820fc4</id>
<content type='text'>
Signed-off-by: Xiaolei Li &lt;xiaolei.li@mediatek.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libmtd: Add support to access OOB available size</title>
<updated>2018-04-10T13:38:56+00:00</updated>
<author>
<name>Xiaolei Li</name>
<email>xiaolei.li@mediatek.com</email>
</author>
<published>2018-04-10T07:36:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a10353584f93334b5687c598a15260c0fc5b8d3e'/>
<id>urn:sha1:a10353584f93334b5687c598a15260c0fc5b8d3e</id>
<content type='text'>
This patch exposes OOB available size to user. Then user can use
OOB free area according to OOB available size.

Steps to get OOB available size:
First, access /sys/class/mtd/mtdX/oobavail. If not exist, then
try to get ecc layout by ioctl "ECCGETLAYOUT". If none of them
work, set OOB available size to 0.

Signed-off-by: Xiaolei Li &lt;xiaolei.li@mediatek.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: common.c: convert to integer arithmetic</title>
<updated>2018-01-30T08:24:19+00:00</updated>
<author>
<name>Andrea Adami</name>
<email>andrea.adami@gmail.com</email>
</author>
<published>2018-01-29T22:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=61afcc6f46368caf4b8eb64612decebb05fadba7'/>
<id>urn:sha1:61afcc6f46368caf4b8eb64612decebb05fadba7</id>
<content type='text'>
We use floating point just to print out KiB, MiB, GiB.
Avoid that to be klibc friendly.

Fixes compilation for aarch64 against klibc:

error: '-mgeneral-regs-only' is incompatible with floating-point argument
|    printf("%s%.1f GiB", p, (double)bytes / (1024 * 1024 * 1024));
etc.

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>libmtd: fix a comment typo in dev_node2num</title>
<updated>2017-11-14T23:14:02+00:00</updated>
<author>
<name>Rock Lee</name>
<email>rockdotlee@gmail.com</email>
</author>
<published>2017-11-13T07:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=7086393891df77b31d346b051fa1ecfa0aa4d66a'/>
<id>urn:sha1:7086393891df77b31d346b051fa1ecfa0aa4d66a</id>
<content type='text'>
Signed-off-by: Rock Lee &lt;rockdotlee@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Remove self-assignments of unused paramters</title>
<updated>2017-11-02T00:14:34+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-11-01T23:50:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=81fd176a6b4958147302ef900f2651c476a3d4e7'/>
<id>urn:sha1:81fd176a6b4958147302ef900f2651c476a3d4e7</id>
<content type='text'>
Use casts to void instead. Clang generates warnings about that by
default.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Silence warnings about unused arguments</title>
<updated>2017-06-28T09:43:03+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-06-22T11:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a7c8cb36d1fb972082ef4f0039300d051ade2de9'/>
<id>urn:sha1:a7c8cb36d1fb972082ef4f0039300d051ade2de9</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
