summaryrefslogtreecommitdiff
path: root/vgasrc
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-08-14 21:20:10 -0400
committerKevin O'Connor <kevin@koconnor.net>2012-09-02 16:00:03 -0400
commitb306459d2d9804e249cdded2f0967a74b685c684 (patch)
tree6f11498b5a7498d5c2c6a7c493ef69bd2de68730 /vgasrc
parent51755c3b5ed9dcdfdef8cee56631d68642bde416 (diff)
downloadqemu-seabios-b306459d2d9804e249cdded2f0967a74b685c684.tar.gz
Use cpu_to_be32() (and related) instead of htonl (and related).
Unify the syntax for byte swab calls. This also fixes a bug in coreboot due to the lack of a be64_to_cpu() call. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/vgafb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vgasrc/vgafb.c b/vgasrc/vgafb.c
index 233f3d5..3b2f367 100644
--- a/vgasrc/vgafb.c
+++ b/vgasrc/vgafb.c
@@ -8,6 +8,7 @@
#include "vgabios.h" // vgafb_scroll
#include "biosvar.h" // GET_BDA
#include "util.h" // memset_far
+#include "byteorder.h" // cpu_to_be16
#include "stdvga.h" // stdvga_planar4_plane
@@ -272,7 +273,7 @@ write_gfx_char_cga(struct vgamode_s *vmode_g
for (j = 0; j < 8; j++)
if (fontline & (1<<j))
pixels |= (ca.attr & 0x03) << (j*2);
- pixels = htons(pixels);
+ pixels = cpu_to_be16(pixels);
if (ca.attr & 0x80)
pixels ^= GET_FARVAR(SEG_GRAPH, *(u16*)dest_far);
SET_FARVAR(SEG_CTEXT, *(u16*)dest_far, pixels);