vgabios: Report mode not supported getting mode informations
authorFrediano Ziglio <frediano.ziglio@citrix.com>
Mon, 7 May 2012 12:37:47 +0000 (13:37 +0100)
committerFrediano Ziglio <frediano.ziglio@citrix.com>
Mon, 7 May 2012 12:37:47 +0000 (13:37 +0100)
If you try to get mode information for an unsupported mode
interrupt should return error but not that the function is not
supported.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
tools/firmware/vgabios/vbe.c

index 04b1be48f54873c2d13bdcec1e2c546fec1a3b4e..dd795354a76e91e97131b6c213ac4b0975702a46 100644 (file)
@@ -909,7 +909,8 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
 void vbe_biosfn_return_mode_information(AX, CX, ES, DI)
 Bit16u *AX;Bit16u CX; Bit16u ES;Bit16u DI;
 {
-        Bit16u            result=0x0100;
+        // error by default is 0x014f which means supported but error
+        Bit16u                 result=0x014f;
         Bit16u            ss=get_SS();
         ModeInfoBlock     info;
         ModeInfoListItem  *cur_info;
@@ -953,7 +954,6 @@ Bit16u *AX;Bit16u CX; Bit16u ES;Bit16u DI;
 #ifdef DEBUG
                 printf("VBE *NOT* found mode %x\n",CX);
 #endif
-                result = 0x100;
         }
         
         if (result == 0x4f)