diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-05-25 16:29:36 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-05-25 16:29:36 +0900 |
commit | f1986b8b44e2e0c4ecf71dc0f2c09d29c45bdb17 (patch) | |
tree | 0b5cfebeda448f3706d02d23d9ac13b30c318862 | |
parent | 211abf424c05e392e298e3943d329f4d2ae9a3d2 (diff) | |
download | libhinoko-f1986b8b44e2e0c4ecf71dc0f2c09d29c45bdb17.tar.gz |
fw_iso_ctx_private: rename coded error generator
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | src/fw_iso_ctx_private.c | 20 | ||||
-rw-r--r-- | src/fw_iso_ctx_private.h | 2 | ||||
-rw-r--r-- | src/fw_iso_rx_multiple.c | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/fw_iso_ctx_private.c b/src/fw_iso_ctx_private.c index 73caa57..ddbe0d0 100644 --- a/src/fw_iso_ctx_private.c +++ b/src/fw_iso_ctx_private.c @@ -109,7 +109,7 @@ gboolean fw_iso_ctx_state_allocate(struct fw_iso_ctx_state *state, const char *p } if (state->fd >= 0) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_ALLOCATED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_ALLOCATED); return FALSE; } @@ -183,12 +183,12 @@ gboolean fw_iso_ctx_state_map_buffer(struct fw_iso_ctx_state *state, guint bytes g_return_val_if_fail(error == NULL || *error == NULL, FALSE); if (state->fd < 0) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); return FALSE; } if (state->addr != NULL) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_MAPPED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_MAPPED); return FALSE; } @@ -295,12 +295,12 @@ gboolean fw_iso_ctx_state_register_chunk(struct fw_iso_ctx_state *state, gboolea FALSE); if (state->fd < 0) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); return FALSE; } if (state->addr == NULL) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_NOT_MAPPED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_NOT_MAPPED); return FALSE; } @@ -471,12 +471,12 @@ gboolean fw_iso_ctx_state_start(struct fw_iso_ctx_state *state, const guint16 *c g_return_val_if_fail(error == NULL || *error == NULL, FALSE); if (state->fd < 0) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); return FALSE; } if (state->addr == NULL) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_NOT_MAPPED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_NOT_MAPPED); return FALSE; } @@ -506,7 +506,7 @@ gboolean fw_iso_ctx_state_start(struct fw_iso_ctx_state *state, const guint16 *c // Not prepared. if (state->data_length == 0) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_CHUNK_UNREGISTERED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_CHUNK_UNREGISTERED); return FALSE; } @@ -621,7 +621,7 @@ gboolean fw_iso_ctx_state_get_cycle_timer(struct fw_iso_ctx_state *state, gint c g_return_val_if_fail(error == NULL || *error == NULL, FALSE); if (state->fd < 0) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); return FALSE; } @@ -717,7 +717,7 @@ gboolean fw_iso_ctx_state_create_source(struct fw_iso_ctx_state *state, HinokoFw g_return_val_if_fail(error == NULL || *error == NULL, FALSE); if (state->fd < 0) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED); return FALSE; } diff --git a/src/fw_iso_ctx_private.h b/src/fw_iso_ctx_private.h index 879a368..09a3f40 100644 --- a/src/fw_iso_ctx_private.h +++ b/src/fw_iso_ctx_private.h @@ -11,7 +11,7 @@ // NOTE: make it public in future releases. void hinoko_fw_iso_ctx_error_to_label(HinokoFwIsoCtxError code, const char **label); -static inline void generate_local_error(GError **error, HinokoFwIsoCtxError code) +static inline void generate_fw_iso_ctx_error_coded(GError **error, HinokoFwIsoCtxError code) { const char *label; diff --git a/src/fw_iso_rx_multiple.c b/src/fw_iso_rx_multiple.c index 4a322f7..b023adb 100644 --- a/src/fw_iso_rx_multiple.c +++ b/src/fw_iso_rx_multiple.c @@ -385,7 +385,7 @@ gboolean hinoko_fw_iso_rx_multiple_allocate(HinokoFwIsoRxMultiple *self, const c hinoko_fw_iso_ctx_release(HINOKO_FW_ISO_CTX(self)); return FALSE; } else if (set.channels == 0) { - generate_local_error(error, HINOKO_FW_ISO_CTX_ERROR_NO_ISOC_CHANNEL); + generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_NO_ISOC_CHANNEL); hinoko_fw_iso_ctx_release(HINOKO_FW_ISO_CTX(self)); return FALSE; } |