diff options
author | Dan Williams <dcbw@redhat.com> | 2010-08-05 22:13:51 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-08-05 22:51:28 -0500 |
commit | 52f9c721d3f7201ca2f8ad6461cbb5fd8e50d822 (patch) | |
tree | 13cec955444fc1c098c4568c8af8041aceb1ac77 /libqcdm/src/commands.c | |
parent | b4d3ab014d5587b80858f314e53e596ed70ebdbf (diff) |
core: add SPC lock error
Diffstat (limited to 'libqcdm/src/commands.c')
-rw-r--r-- | libqcdm/src/commands.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libqcdm/src/commands.c b/libqcdm/src/commands.c index 11a1a38b..e4918617 100644 --- a/libqcdm/src/commands.c +++ b/libqcdm/src/commands.c @@ -119,6 +119,8 @@ bin2hexstr (const guint8 *bytes, int len) return result; } +/**********************************************************************/ + static gboolean check_command (const char *buf, gsize len, guint8 cmd, gsize min_len, GError **error) { @@ -154,6 +156,11 @@ check_command (const char *buf, gsize len, guint8 cmd, gsize min_len, GError **e "DM command %d not allowed in the current device mode", cmd); return FALSE; + case DIAG_CMD_BAD_SPC_MODE: + g_set_error (error, QCDM_COMMAND_ERROR, QCDM_COMMAND_SPC_LOCKED, + "DM command %d not allowed because the Service Programming Code is locked", + cmd); + return FALSE; default: break; } |