[gnome-color-manager] trivial: print a warning when there are extension blocks to parse
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: print a warning when there are extension blocks to parse
- Date: Fri, 27 Nov 2009 11:44:33 +0000 (UTC)
commit 09440f845810356e7634676b92094095cafaadd7
Author: Richard Hughes <richard hughsie com>
Date: Fri Nov 27 11:43:53 2009 +0000
trivial: print a warning when there are extension blocks to parse
src/gcm-edid.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-edid.c b/src/gcm-edid.c
index db56208..4e263f8 100644
--- a/src/gcm-edid.c
+++ b/src/gcm-edid.c
@@ -82,6 +82,7 @@ G_DEFINE_TYPE (GcmEdid, gcm_edid, G_TYPE_OBJECT)
#define GCM_EDID_OFFSET_GAMMA 0x17
#define GCM_EDID_OFFSET_DATA_BLOCKS 0x36
#define GCM_EDID_OFFSET_LAST_BLOCK 0x6c
+#define GCM_EDID_OFFSET_EXTENSION_BLOCK_COUNT 0x7e
#define GCM_DESCRIPTOR_DISPLAY_PRODUCT_NAME 0xfc
#define GCM_DESCRIPTOR_DISPLAY_PRODUCT_SERIAL_NUMBER 0xff
@@ -100,6 +101,7 @@ gcm_edid_parse (GcmEdid *edid, const guint8 *data, GError **error)
guint i;
GcmEdidPrivate *priv = edid->priv;
guint32 serial;
+ guint extension_blocks;
g_return_val_if_fail (GCM_IS_EDID (edid), FALSE);
g_return_val_if_fail (data != NULL, FALSE);
@@ -194,6 +196,11 @@ gcm_edid_parse (GcmEdid *edid, const guint8 *data, GError **error)
}
}
+ /* extension blocks */
+ extension_blocks = data[GCM_EDID_OFFSET_EXTENSION_BLOCK_COUNT];
+ if (extension_blocks > 0)
+ egg_warning ("%i extension blocks to parse", extension_blocks);
+
/* remove embedded newlines */
if (priv->monitor_name != NULL)
g_strdelimit (priv->monitor_name, "\n", '\0');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]