<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/mkfs.ubifs/mkfs.ubifs.c, 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>2015-11-11T22:38:40+00:00</updated>
<entry>
<title>mtd-utils: Restructure the mtd-utils source.</title>
<updated>2015-11-11T22:38:40+00:00</updated>
<author>
<name>Dongsheng Yang</name>
<email>yangds.fnst@cn.fujitsu.com</email>
</author>
<published>2015-10-31T03:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=7d81790ced345585b1e647ca9d0f6678e7062fa4'/>
<id>urn:sha1:7d81790ced345585b1e647ca9d0f6678e7062fa4</id>
<content type='text'>
* There is no code modification in this commit, only moving
* the files to proper place.

The user tools looks a little messy as we place almost
the all tools in the root directory of mtd-utils. To make
it more clear, I propose to introduce the following structure
for our source code.

mtd-utils/
	|-- lib
	|-- include
	|-- misc-utils
	|-- jffsX-utils
	|-- nand-utils
	|-- nor-utils
	|-- ubi-utils
	|-- ubifs-utils
	`-- tests

Signed-off-by: Dongsheng Yang &lt;yangds.fnst@cn.fujitsu.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mkfs.ubifs: start using common code</title>
<updated>2014-10-20T10:47:09+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2014-10-20T10:47:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=dd183c2c8000d42073d19fefc2740dc50bafd287'/>
<id>urn:sha1:dd183c2c8000d42073d19fefc2740dc50bafd287</id>
<content type='text'>
Several commonly used macros are now defined in 'common.h', let's start using
them in mkfs.ubifs, instead of duplicating them.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mkfs.ubifs: correct and improve LEB size error prints</title>
<updated>2014-03-31T09:49:39+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2014-03-22T06:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=4f291fbfa3ea677fd476466c82492a69ce6e562d'/>
<id>urn:sha1:4f291fbfa3ea677fd476466c82492a69ce6e562d</id>
<content type='text'>
The error message is incorrect for "too small LEB size" -- we were
printing the minimum I/O size instead of the LEB size.

At the same time, let's print the max LEB size along with the message
for "too large LEB size", to be consistent and more helpful.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>use xstrdup in a few more places</title>
<updated>2013-07-01T05:56:04+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2013-05-08T23:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=450e9cb17d3d86e3e45fd427c85644ac64ec60a4'/>
<id>urn:sha1:450e9cb17d3d86e3e45fd427c85644ac64ec60a4</id>
<content type='text'>
These call sites either assume there is no failure (they deref the
pointer right away), or the exit themselves.  Use xstrdup() instead.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mkfs.ubifs: allow reformatting of devices</title>
<updated>2013-07-01T05:56:00+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2013-05-08T16:27:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=1075562c9e34153b43c12ec5c0b173a1a593b92a'/>
<id>urn:sha1:1075562c9e34153b43c12ec5c0b173a1a593b92a</id>
<content type='text'>
Sometimes I want to re-initialize an existing ubifs, but the tool
currently bails out if the volume is already formatted.  Prompt the
user instead so they can decide.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mkfs.ubifs: Improve error handling of is_contained()</title>
<updated>2012-10-26T13:55:57+00:00</updated>
<author>
<name>Marcus Prebble</name>
<email>marcus.prebble@axis.com</email>
</author>
<published>2012-10-16T11:51:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=334221cf5a94ec3a75c7620661eb5b7b5332256c'/>
<id>urn:sha1:334221cf5a94ec3a75c7620661eb5b7b5332256c</id>
<content type='text'>
The is_contained() function returns -1 if an error occurs when
canonicalizing the output file path/root directory. This resulted in the
confusing error message 'Error: The output file cannot be in the UBIFS
root' when specifying a non-existent directory for the output.
This patch changes the error handling to display a different error
message for the case when is_contained() returns -1.
Additionally it frees all memory allocated by is_contained().

Signed-off-by: Marcus Prebble &lt;marcus.prebble@axis.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mkfs.ubifs: rewrite path checking</title>
<updated>2012-10-11T07:56:58+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-10-10T11:23:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=17f66065837415e0b1b4d619f12a2219af987c80'/>
<id>urn:sha1:17f66065837415e0b1b4d619f12a2219af987c80</id>
<content type='text'>
We use the 'in_path()' function to check whether the output image is
withing the mkfs.ubifs root directory or not. However, this function
is not correct and it fails for the following situation, as
Marcus Prebble &lt;marcus.prebble@axis.com&gt; reports:

1. We have our root file-system mounted at / and want to build an image
   out of it.
2. We have tmpfs mounted at /tmp
3. We mount the root file-system under /tmp/newroot
4. We run mkfs.ubifs with -r /tmp/newroot -o /tmp/image

And this fails. It fails because 'in_path()' misses this use-case.

This patch re-implements the check completely. Now we use 'realpath()'
to find canonical paths and just check that the output file is not
under the root mkfs.ubifs directory.

Reported-by: Marcus Prebble &lt;marcus.prebble@axis.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Tested-by: Marcus Prebble &lt;marcus.prebble@axis.com&gt;
</content>
</entry>
<entry>
<title>consistency between u_int32_t / off_t / off64_t</title>
<updated>2012-09-25T15:06:50+00:00</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@gmail.com</email>
</author>
<published>2012-09-12T14:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f3f3a208048eac5f8b5752a17ebcd44db9230fd8'/>
<id>urn:sha1:f3f3a208048eac5f8b5752a17ebcd44db9230fd8</id>
<content type='text'>
We should use the off_t type instead of off64_t or u_int32_t as its
length is controlled by the WITHOUT_LARGEFILE flag.

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: sync ubi-user.h with kernel v3.6-rc1</title>
<updated>2012-08-22T10:20:49+00:00</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@gmail.com</email>
</author>
<published>2012-08-22T09:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=312e784fb06eaafff4cfebe29c74b8d0ecc09167'/>
<id>urn:sha1:312e784fb06eaafff4cfebe29c74b8d0ecc09167</id>
<content type='text'>
Also remove the eraseblock type support, because kernel commit
a65a0eb6d198e058687a9214683bd1c418f20d39 set the dtype
parameter as obsolete.

Also adjust to some renames:
* 'UBI_PROP_DIRECT_WRITE' -&gt; 'UBI_VOL_PROP_DIRECT_WRITE'
* 'struct ubi_set_prop_req' -&gt; 'struct ubi_set_vol_prop_req'.
* 'UBI_IOCSETPROP' -&gt; 'UBI_IOCSETVOLPROP'

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mkfs.ubifs: do not ignore --max-leb-cnt when formatting an UBI volume</title>
<updated>2012-03-07T14:08:30+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-03-07T14:08:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c36e0067ffdae9ca83abae89f2d22dc9013d9734'/>
<id>urn:sha1:c36e0067ffdae9ca83abae89f2d22dc9013d9734</id>
<content type='text'>
When the output file is an UBI volume - mkfs.ubifs just sets --max-leb-cnt
to the volume size and ignores the user-supplied --max-leb-cnt value, which
is wrong. Let's set it to the volume size only if the user did not supply
--max-leb-cnt.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
</feed>
