#include <stdio.h> #include <string.h> #include <stdlib.h> int main( int argc, const char * argv [] ) { const char * varname; int i = 0; int c; int id = 0; if(argv[1] && strcmp(argv[1],"-i")==0) { argv++; argc--; id=1; } if(argc==1) { fprintf(stderr, "bin2hex: [-i] firmware\n"); exit(1); } varname = argv[1]; printf( "/* automatically generated by bin2hex */\n" ); printf( "static unsigned char %s [] %s =\n{\n", varname , id?"__initdata":""); while ( ( c = getchar( ) ) != EOF ) { if ( i != 0 && i % 10 == 0 ) printf( "\n" ); printf( "0x%02lx,", c & 0xFFl ); i++; } printf( "};\nstatic int %sLen = %d;\n", varname, i ); return 0; } go'/></a></td> <td class='main'><a href='/cgit.cgi/'>index</a> : <a href='/cgit.cgi/linux/net-next.git/'>net-next.git</a></td><td class='form'><form method='get'> <input type='hidden' name='id' value='1697599ee301a52cded6499a09bd609f7f63fd06'/><select name='h' onchange='this.form.submit();'> <option value='emaclite-cleanup'>emaclite-cleanup</option> <option value='master' selected='selected'>master</option> <option value='nds-private-remove'>nds-private-remove</option> <option value='packet-loop-back'>packet-loop-back</option> <option value='packet-rx-pump-back'>packet-rx-pump-back</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table> <table class='tabs'><tr><td> <a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=1697599ee301a52cded6499a09bd609f7f63fd06'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c?id=1697599ee301a52cded6499a09bd609f7f63fd06'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c?id=1697599ee301a52cded6499a09bd609f7f63fd06'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c?id=1697599ee301a52cded6499a09bd609f7f63fd06'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c'> <input type='hidden' name='id' value='1697599ee301a52cded6499a09bd609f7f63fd06'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=1697599ee301a52cded6499a09bd609f7f63fd06'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools?id=1697599ee301a52cded6499a09bd609f7f63fd06'>tools</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing?id=1697599ee301a52cded6499a09bd609f7f63fd06'>testing</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests?id=1697599ee301a52cded6499a09bd609f7f63fd06'>selftests</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/powerpc?id=1697599ee301a52cded6499a09bd609f7f63fd06'>powerpc</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/powerpc/ptrace?id=1697599ee301a52cded6499a09bd609f7f63fd06'>ptrace</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c?id=1697599ee301a52cded6499a09bd609f7f63fd06'>ptrace-tm-spd-vsx.c</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c?id=1697599ee301a52cded6499a09bd609f7f63fd06&showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>