patch-2.1.90 linux/drivers/sound/bin2hex.c
Next file: linux/drivers/sound/cs4232.c
Previous file: linux/drivers/sound/audio.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Thu Mar 12 10:52:09 1998
- Orig file:
v2.1.89/linux/drivers/sound/bin2hex.c
- Orig date:
Tue Dec 23 13:52:02 1997
diff -u --recursive --new-file v2.1.89/linux/drivers/sound/bin2hex.c linux/drivers/sound/bin2hex.c
@@ -2,12 +2,27 @@
int main( int argc, const char * argv [] )
{
- const char * varname = argv[1];
+ 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 [] =\n{\n", varname );
+ printf( "static unsigned char %s [] %s =\n{\n", varname , id?"__initdata":"");
while ( ( c = getchar( ) ) != EOF )
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov