]> Joshua Wise's Git repositories - netwatch.git/blobdiff - aseg/vga-overlay.c
Don't necessarily wait for data.
[netwatch.git] / aseg / vga-overlay.c
index 913ebc2f4479aabc9c86d25f61ea651866f61371..7d107d71264f20d9ae430f2dd99bbb40b1f5c21d 100644 (file)
@@ -10,6 +10,7 @@
 
 static char logents[LOGLEN][41] = {{0}};
 static int prodptr = 0;
+static int flush_imm = 0;
 
 #define VRAM_BASE              0xA0000UL
 #define TEXT_CONSOLE_OFFSET    0x18000UL 
@@ -18,6 +19,11 @@ static int prodptr = 0;
 
 #define COLOR                  0x1F
 
+void vga_flush_imm(int imm)
+{
+       flush_imm = imm;
+}
+
 static unsigned char vga_read(unsigned char idx)
 {
        outb(CRTC_IDX_REG, idx);
@@ -75,7 +81,8 @@ void dolog(const char *s)
 {
        strcpy(logents[prodptr], s);
        prodptr = (prodptr + 1) % LOGLEN;
-       outlog();
+       if (flush_imm)
+               outlog();
 }
 void (*output)(const char *s) = dolog;
 
@@ -87,7 +94,8 @@ void dologf(const char *fmt, ...)
        vsnprintf(logents[prodptr], 40, fmt, va);
        va_end(va);
        prodptr = (prodptr + 1) % LOGLEN;
-       outlog();
+       if (flush_imm)
+               outlog();
 }
 void (*outputf)(const char *s, ...) = dologf;
 
This page took 0.026251 seconds and 4 git commands to generate.