mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-09-08 17:18:05 -04:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
39
sound/oss/bin2hex.c
Normal file
39
sound/oss/bin2hex.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
#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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue