[Mplayer-cvslog] CVS: main/libdha/kernelhelper test.c,1.1,1.2

Alex Beregszaszi alex at mplayer.dev.hu
Sat Feb 2 07:34:34 CET 2002


Update of /cvsroot/mplayer/main/libdha/kernelhelper
In directory mplayer:/var/tmp.root/cvs-serv16634

Modified Files:
	test.c 
Log Message:
added proper includes

Index: test.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/kernelhelper/test.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- test.c	2 Feb 2002 06:28:49 -0000	1.1
+++ test.c	2 Feb 2002 06:34:31 -0000	1.2
@@ -1,8 +1,11 @@
+#include <string.h>
+#include <stdio.h>
+#include <sys/ioctl.h>
 #include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <sys/mman.h>
-
+ 
 #include "dhahelper.h"
 
 int main(int argc, char *argv[])
@@ -19,13 +22,13 @@
 	printf("incompatible api!\n");
 
     {
-	dhahelper_memory_t mem;
+ 	dhahelper_memory_t mem;
 
 	mem.operation = MEMORY_OP_MAP;
 	//mem.start = 0xe0000000;
 	mem.start = 0xe4000008;
-	mem.offset = 0;
-	mem.size = 0x4000;
+ 	mem.offset = 0;
+ 	mem.size = 0x4000;
 	mem.ret = 0;
 
 	ret = ioctl(fd, DHAHELPER_MEMORY, &mem);
@@ -33,13 +36,13 @@
 	printf("ret: %s\n", strerror(errno));
 
 	mem.ret = (int)mmap(NULL, (size_t)mem.size, PROT_READ, MAP_SHARED, fd, (off_t)0);
-	printf("allocated to %p\n", mem.ret); 
+	printf("allocated to %x\n", mem.ret); 
 
 	if (argc > 1)
 	    if (mem.ret != 0)
 	    {
-    		int i;
-    
+ 		int i;
+ 
 		for (i = 0; i < 256; i++)
 		    printf("[%x] ", *(int *)(mem.ret+i));
 		printf("\n");
@@ -52,4 +55,6 @@
 
 	ioctl(fd, DHAHELPER_MEMORY, &mem);
     }
+
+    return(0);
 }




More information about the MPlayer-cvslog mailing list