patch-2.1.90 linux/drivers/sound/hex2hex.c

Next file: linux/drivers/sound/maui.c
Previous file: linux/drivers/sound/gus_card.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.89/linux/drivers/sound/hex2hex.c linux/drivers/sound/hex2hex.c
@@ -66,14 +66,27 @@
 
 int main( int argc, const char * argv [] )
 {
-	const char * varline = argv[1];
+	const char * varline;
 	int i,l;
+	int id=0;
 
+	if(argv[1] && strcmp(argv[1], "-i")==0)
+	{
+		argv++;
+		argc--;
+		id=1;
+	}
+	if(argv[1]==NULL)
+	{
+		fprintf(stderr,"hex2hex: [-i] filename\n");
+		exit(1);
+	}
+	varline = argv[1;
 	l = loadhex(stdin, buf);
 
 	printf("/*\n *\t Computer generated file. Do not edit.\n */\n");
         printf("static int %s_len = %d;\n", varline, l);
-	printf("static unsigned char %s[] = {\n", varline);
+	printf("static unsigned char %s[] %s = {\n", varline, id?"__initdata":"");
 
 	for (i=0;i<l;i++)
 	{

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov