summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2004-12-15 15:16:21 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2004-12-15 15:16:21 +0000
commitff007523a7b770a24284a22af6719268021feef4 (patch)
treea6d55e150c65d6a9fa269943ff2deff0a56f934e
parentb99ac2271153bdcbf5d36b842a1750d7881a55e5 (diff)
downloaddrakx-backup-do-not-use-ff007523a7b770a24284a22af6719268021feef4.tar
drakx-backup-do-not-use-ff007523a7b770a24284a22af6719268021feef4.tar.gz
drakx-backup-do-not-use-ff007523a7b770a24284a22af6719268021feef4.tar.bz2
drakx-backup-do-not-use-ff007523a7b770a24284a22af6719268021feef4.tar.xz
drakx-backup-do-not-use-ff007523a7b770a24284a22af6719268021feef4.zip
On PowerPC platforms, byteswap product_code so that ids match MonitorsDB contents
-rw-r--r--tools/ddcprobe/of.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/ddcprobe/of.c b/tools/ddcprobe/of.c
index aab0632f1..f8fdc30dd 100644
--- a/tools/ddcprobe/of.c
+++ b/tools/ddcprobe/of.c
@@ -138,6 +138,9 @@ int vbe_get_edid_info(struct vbe_edid1_info * ret)
man = ntohs(man);
memcpy(&ret->manufacturer_name, &man, 2);
+ /* byteswap to match the contents of MonitorsDB */
+ ret->product_code = ((ret->product_code >> 8) & 0xff) | ((ret->product_code & 0xff) << 8);
+
free(mem);
return 1;
}