<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/board/digsy_mtc/cmd_mtc.c, branch v2011.06</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/board/digsy_mtc/cmd_mtc.c?h=v2011.06</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/board/digsy_mtc/cmd_mtc.c?h=v2011.06'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2010-07-24T18:43:57Z</updated>
<entry>
<title>cmd_usage(): simplify return code handling</title>
<updated>2010-07-24T18:43:57Z</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2010-07-16T23:06:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=47e26b1bf91ddef69f4a3892815c857db094cef9'/>
<id>urn:sha1:47e26b1bf91ddef69f4a3892815c857db094cef9</id>
<content type='text'>
Lots of code use this construct:

	cmd_usage(cmdtp);
	return 1;

Change cmd_usage() let it return 1 - then we can replace all these
ocurrances by

	return cmd_usage(cmdtp);

This fixes a few places with incorrect return code handling, too.

Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
</content>
</entry>
<entry>
<title>Make sure that argv[] argument pointers are not modified.</title>
<updated>2010-07-04T21:55:42Z</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2010-06-28T20:00:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=54841ab50c20d6fa6c9cc3eb826989da3a22d934'/>
<id>urn:sha1:54841ab50c20d6fa6c9cc3eb826989da3a22d934</id>
<content type='text'>
The hush shell dynamically allocates (and re-allocates) memory for the
argument strings in the "char *argv[]" argument vector passed to
commands.  Any code that modifies these pointers will cause serious
corruption of the malloc data structures and crash U-Boot, so make
sure the compiler can check that no such modifications are being done
by changing the code into "char * const argv[]".

This modification is the result of debugging a strange crash caused
after adding a new command, which used the following argument
processing code which has been working perfectly fine in all Unix
systems since version 6 - but not so in U-Boot:

int main (int argc, char **argv)
{
	while (--argc &gt; 0 &amp;&amp; **++argv == '-') {
/* ====&gt; */	while (*++*argv) {
			switch (**argv) {
			case 'd':
				debug++;
				break;
			...
			default:
				usage ();
			}
		}
	}
	...
}

The line marked "====&gt;" will corrupt the malloc data structures and
usually cause U-Boot to crash when the next command gets executed by
the shell.  With the modification, the compiler will prevent this with
an
	error: increment of read-only location '*argv'

N.B.: The code above can be trivially rewritten like this:

	while (--argc &gt; 0 &amp;&amp; **++argv == '-') {
		char *arg = *argv;
		while (*++arg) {
			switch (*arg) {
			...

Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
</entry>
<entry>
<title>ppc: Remove board-specific command table relocation fixups</title>
<updated>2009-10-03T08:17:56Z</updated>
<author>
<name>Peter Tyser</name>
<email>ptyser@xes-inc.com</email>
</author>
<published>2009-09-21T16:20:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b5650c5d8c99100144d8e4e9af910405f857bb7a'/>
<id>urn:sha1:b5650c5d8c99100144d8e4e9af910405f857bb7a</id>
<content type='text'>
Signed-off-by: Peter Tyser &lt;ptyser@xes-inc.com&gt;
</content>
</entry>
<entry>
<title>digsy_mtc: Add delay in SPI transfers to the companion controller.</title>
<updated>2009-08-09T21:01:07Z</updated>
<author>
<name>Detlev Zundel</name>
<email>dzu@denx.de</email>
</author>
<published>2009-08-05T16:37:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0b40bd439a33bde9e3cccf1acb5744225d0c6103'/>
<id>urn:sha1:0b40bd439a33bde9e3cccf1acb5744225d0c6103</id>
<content type='text'>
While at it, remove initialization of variables which will be set
before usage in all cases.

Signed-off-by: Detlev Zundel &lt;dzu@denx.de&gt;
</content>
</entry>
<entry>
<title>digsy_mtc: minor fixes for mtc command help</title>
<updated>2009-08-09T21:00:08Z</updated>
<author>
<name>Anatolij Gustschin</name>
<email>agust@denx.de</email>
</author>
<published>2009-08-05T16:37:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0bf00750e082a004e5fb058925622ae72890cc56'/>
<id>urn:sha1:0bf00750e082a004e5fb058925622ae72890cc56</id>
<content type='text'>
Add mtc state subcommand description to the
help of mtc command.

Remove some newlines in description of commands
for proper help formating.

Signed-off-by: Anatolij Gustschin &lt;agust@denx.de&gt;
</content>
</entry>
<entry>
<title>digsy_mtc: Add mtc state command.</title>
<updated>2009-08-09T20:59:27Z</updated>
<author>
<name>Grzegorz Bernacki</name>
<email>gjb@semihalf.com</email>
</author>
<published>2009-08-05T16:37:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5cc69084189bf49aa99d13d57515be72d1844bdf'/>
<id>urn:sha1:5cc69084189bf49aa99d13d57515be72d1844bdf</id>
<content type='text'>
Signed-off-by: Grzegorz Bernacki &lt;gjb@semihalf.com&gt;
</content>
</entry>
<entry>
<title>Coding style cleanup; update CHANGELOG</title>
<updated>2009-07-07T20:35:02Z</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2009-07-07T20:35:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8e5e9b940cdede0debe528cdd7edccccbb3ebf2a'/>
<id>urn:sha1:8e5e9b940cdede0debe528cdd7edccccbb3ebf2a</id>
<content type='text'>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
</content>
</entry>
<entry>
<title>digsy MTC: Add 'mtc' command.</title>
<updated>2009-06-14T21:04:37Z</updated>
<author>
<name>Grzegorz Bernacki</name>
<email>gjb@semihalf.com</email>
</author>
<published>2009-06-12T09:33:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=12304871bc7839145f2b4238923e9023616d7399'/>
<id>urn:sha1:12304871bc7839145f2b4238923e9023616d7399</id>
<content type='text'>
New command allows to:
     o check FW version
     o set LED status
     o set digital output status
     o get digital input status

Signed-off-by: Grzegorz Bernacki &lt;gjb@semihalf.com&gt;
</content>
</entry>
</feed>
