Matthew Garrett wrote:
> On Fri, May 16, 2008 at 11:19:31PM +0200, Till Maas wrote:
> 
>> Thank you very much that you announced this here, otherwise I guess I would 
>> have never noticed that this is not the correct upstream url for vbetool:
>> http://www.srcf.ucam.org/~mjg59/vbetool/
>> I guess it would be helpful for others, too, when you add some information 
>> about the new location for vbetool there.
> 
> I've added a link.

While packaging it up, i fixed one new serious compilerwarning in the external
ROM code and a few less serious (they were always there, but while i was at
it... ;-) "cast from pointer to integer of different size"-warnings. I'm not
too sure that those are 100% correct, so better have a look at them before
applying ;)

Have fun,

        Stefan
-- 
btefan Seyfried
R&D Team Mobile Devices            |              "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."

This footer brought to you by insane German lawmakers:
SUSE Linux Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Index: b/vbetool.c
===================================================================
--- a/vbetool.c
+++ b/vbetool.c
@@ -117,8 +117,8 @@ int main(int argc, char *argv[])
 			void *rc;
 			int romfd = open (argv[2], O_RDWR);
 
-			munmap(0xc0000, 64*1024);
-			rc = mmap(0xc0000, 64*1024,
+			munmap((void *)0xc0000, 64*1024);
+			rc = mmap((void *)0xc0000, 64*1024,
 				  PROT_READ|PROT_WRITE|PROT_EXEC,
 				  MAP_FIXED|MAP_PRIVATE, romfd, 0);
 		}
Index: b/vbetool.h
===================================================================
--- a/vbetool.h
+++ b/vbetool.h
@@ -15,5 +15,5 @@ void text_mode(void);
 int check_console(void);
 int enable_vga(void);
 int disable_vga(void);
-int do_get_panel_id();
+int do_get_panel_id(int);
 
Index: b/vbetool.c
===================================================================
--- a/vbetool.c
+++ b/vbetool.c
@@ -254,8 +254,8 @@ void restore_state_from(char *data)
 	r.eax = 0x4f04;
 	r.ecx = 0xf;		/* all states */
 	r.edx = 2;		/* restore state */
-	r.es = (unsigned int) (data - LRMI_base_addr()) >> 4;
-	r.ebx = (unsigned int) (data - LRMI_base_addr()) & 0xf;
+	r.es = (unsigned short int) (((long)(data - LRMI_base_addr())) >> 4);
+	r.ebx = (unsigned int) (((long)(data - LRMI_base_addr())) & 0xf);
 	r.ds = 0x0040;
 
 	if (!LRMI_int(0x10, &r)) {
@@ -329,15 +329,15 @@ char *__save_state(int *psize)
 
 	memset(&r, 0, sizeof(r));
 
-	fprintf(stderr, "Allocated buffer at %p (base is 0x%x)\n", buffer,
+	fprintf(stderr, "Allocated buffer at %p (base is 0x%zx)\n", buffer,
 			LRMI_base_addr());
 
 	r.eax = 0x4f04;
 	r.ecx = 0xf;		/* all states */
 	r.edx = 1;		/* save state */
 	
-	r.es = (unsigned int) (buffer - LRMI_base_addr()) >> 4;
-	r.ebx = (unsigned int) (buffer - LRMI_base_addr()) & 0xf;
+	r.es = (unsigned short int) (((long)(buffer - LRMI_base_addr())) >> 4);
+	r.ebx = (unsigned int) (((long)(buffer - LRMI_base_addr())) & 0xf);
 	r.ds = 0x0040;
 
 	fprintf(stderr, "ES: 0x%04X EBX: 0x%04X\n", r.es, r.ebx);
@@ -525,7 +525,7 @@ int do_get_panel_id(int just_dimensions)
     .ebx = 0x0001
   };
   struct panel_id *id = LRMI_alloc_real(sizeof(struct panel_id));
-  r.es = (unsigned short)(((int)(id-LRMI_base_addr()) >> 4) & 0xffff);
+  r.es = (unsigned short)(((long)(id-LRMI_base_addr()) >> 4) & 0xffff);
   r.edi = (unsigned long)(id-LRMI_base_addr()) & 0xf;
 
   if(sizeof(struct panel_id) != 32)
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to