<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/nandwrite.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>nandwrite: amendment to Mike's --input-* series</title>
<updated>2013-07-01T06:12:43+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2013-07-01T06:12:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=2bd7447e96e1c6cf8637713f9cbcec51b05e5aa1'/>
<id>urn:sha1:2bd7447e96e1c6cf8637713f9cbcec51b05e5aa1</id>
<content type='text'>
This is a delta between v1 and v2 of the patches. I pushed v1 instead of
picking v2, and this is a fixup.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>nandwrite: add --input-{skip,size} options</title>
<updated>2013-07-01T06:00:49+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2013-05-09T00:03:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=e77565ee458a7d6863f8434a97156a66547f2b98'/>
<id>urn:sha1:e77565ee458a7d6863f8434a97156a66547f2b98</id>
<content type='text'>
If you have a file image and want to copy sub-portions out and into
NAND, there's no easy way to do that.  You can use dd to extract it
to a temp file, or pipe it to nandwrite 1 page at a time.  Both suck.

Add two new flags to explicitly set the size and offset of the input
file.  Seeking stdin isn't currently supported as I'm not sure it's
necessary.  It wouldn't be hard to add though...

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>nandwrite: clean up length types</title>
<updated>2013-07-01T06:00:41+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2013-05-09T00:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=6d17edd24cfcf3595a7f302d70afcfaebfb45629'/>
<id>urn:sha1:6d17edd24cfcf3595a7f302d70afcfaebfb45629</id>
<content type='text'>
We use 'int' in many places to represent offsets/sizes.  That obviously
does not play well with larger NAND devices on 32bit systems.  Instead,
use the right type as needed:
 - long long to represent the length of the image
 - use fstat() rather than lseek();lseek(); to get the length of the image
 - use size_t/ssize_t when working with read()
 - tweak the printf formats as needed

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>nand{dump, test, write}: clean up --help handling</title>
<updated>2013-07-01T06:00:32+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2013-05-08T23:02:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f6b476ee29833e13c0285d49ebb75666176b2aa7'/>
<id>urn:sha1:f6b476ee29833e13c0285d49ebb75666176b2aa7</id>
<content type='text'>
We should send the output to stdout when the user passes -h/--help
and then exit(0), but otherwise the output should go to stderr and
then exit(1).

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>move _GNU_SOURCE to the main makefile</title>
<updated>2013-07-01T05:55:49+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2013-05-08T16:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=8b4786830174e06bc27810f15c76f72cb3e951d9'/>
<id>urn:sha1:8b4786830174e06bc27810f15c76f72cb3e951d9</id>
<content type='text'>
A bunch of utils are relying on _GNU_SOURCE already.  The new prompt code
uses getline() which is now part of POSIX, but in older versions of glibc,
it was behind _GNU_SOURCE as it was a GNU extension.

This change doesn't actually tie us to glibc.  Only code that uses GNU
extensions does that.  It just kills warning when using older versions of
glibc.

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>mtd-utils: Check mtdoffset is not larger than mtd.size in case of a bad block.</title>
<updated>2012-06-29T08:29:26+00:00</updated>
<author>
<name>Tomer Barletz</name>
<email>barletz@gmail.com</email>
</author>
<published>2012-06-26T21:46:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=d7f1b2f9abde75b88e69490d619857c82e7e3517'/>
<id>urn:sha1:d7f1b2f9abde75b88e69490d619857c82e7e3517</id>
<content type='text'>
mtdoffset is being tested against mtd.size in the outer two loops, but
the third nested one does not test against it.
In case of a bad block we'll try to access an out of bounds offset in
the next MEMGETBADBLOCK ioctl, which will fail with EINVAL.
In case mtdoffset is indeed larger than the partition size, we need to
bail, since there are not enough "good" blocks to complete the write.

Signed-off-by: Tomer Barletz &lt;barletz@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>nandwrite: minor cleanups</title>
<updated>2012-06-29T07:21:41+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-06-29T07:18:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=5625ce5e25bcdc04603a4e44f228fe4a3586e77a'/>
<id>urn:sha1:5625ce5e25bcdc04603a4e44f228fe4a3586e77a</id>
<content type='text'>
Remove extra brackets and some style changes to make it more readable for a
person who deals mostly with the kernel code.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>nandwrite: use common.h "errmsg" functions</title>
<updated>2011-09-11T13:11:41+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2011-08-31T20:00:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=0970bf408707d610e88abb069b123e267aeb42f8'/>
<id>urn:sha1:0970bf408707d610e88abb069b123e267aeb42f8</id>
<content type='text'>
Convert several forms of exit(), perror(), etc. to use common.h helper
functions.

Also, move one of our parameter checks inside the process_options()
function for consistency.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@intel.com&gt;
</content>
</entry>
<entry>
<title>nandwrite: re-implement `--autoplace' option</title>
<updated>2011-09-11T13:11:41+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2011-08-31T20:00:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=e3867cfa7cbfab9c2aa192ad6969afb438fc0136'/>
<id>urn:sha1:e3867cfa7cbfab9c2aa192ad6969afb438fc0136</id>
<content type='text'>
The restructuring of mtd_write() has allowed us to use `--autoplace'
somewhat successfully; it is supported by the new ioctl(MEMWRITE) as
well as some legacy code utilizing the deprecated ioctl(MEMGETOOBSEL).

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