Isobus logformat updates (#636)

just some missing cleanups and fixing from the LLM session
This commit is contained in:
Oleksij Rempel
2026-10-14 21:27:43 +02:00
committed by GitHub
9 changed files with 18 additions and 16 deletions
+4 -3
View File
@@ -2,6 +2,7 @@
// SPDX-FileCopyrightText: 2023 Oleksij Rempel <linux@rempel-privat.de>
#include <errno.h>
#include <inttypes.h>
#include <string.h>
#include <unistd.h>
@@ -95,7 +96,7 @@ int isobusfs_cli_ccm_send(struct isobusfs_priv *priv)
}
if (time_diff < -ISOBUSFS_CM_F_FS_STATUS_RATE_JITTER) {
pr_warn("too late to send next fs status message: %ld ms",
pr_warn("too late to send next fs status message: %" PRId64 " ms",
time_diff);
}
@@ -152,7 +153,7 @@ static int isobusfs_cli_rx_fs_status(struct isobusfs_priv *priv,
int ret = 0;
if (msg->len != sizeof(*fs_status)) {
pr_warn("wrong message length: %d", msg->len);
pr_warn("wrong message length: %zd", msg->len);
return -EINVAL;
}
@@ -178,7 +179,7 @@ static int isobusfs_cli_rx_fs_property_res(struct isobusfs_priv *priv,
}
if (msg->len != sizeof(*fs_prop)) {
pr_warn("wrong message length: %d", msg->len);
pr_warn("wrong message length: %zd", msg->len);
return -EINVAL;
}
+1 -1
View File
@@ -21,7 +21,7 @@ int isobusfs_cli_ccd_req(struct isobusfs_priv *priv, const char *name,
int ret;
if (name_len > ISOBUSFS_MAX_PATH_NAME_LENGTH) {
pr_warn("path name too long: %i, max is %i", name_len,
pr_warn("path name too long: %zu, max is %i", name_len,
ISOBUSFS_MAX_PATH_NAME_LENGTH);
return -EINVAL;
}
+1 -1
View File
@@ -286,7 +286,7 @@ int isobusfs_cli_fa_of_req(struct isobusfs_priv *priv, const char *name,
int ret;
if (name_len > ISOBUSFS_MAX_PATH_NAME_LENGTH) {
pr_warn("path name too long: %i, max is %i", name_len,
pr_warn("path name too long: %zu, max is %i", name_len,
ISOBUSFS_MAX_PATH_NAME_LENGTH);
return -EINVAL;
}
+4 -4
View File
@@ -547,9 +547,9 @@ isobusfs_cli_ls_handle_seek_dir_sent(struct isobusfs_priv *priv,
if (isobusfs_cli_int_is_error(priv, 0, res->error_code, res->tan))
goto error;
if (res->position != ctx->offset) {
pr_int("Failed to seek to position %zu, got %zu\n",
ctx->offset, res->position);
if (le32toh(res->position) != ctx->offset) {
pr_int("Failed to seek to position %zu, got %u\n",
ctx->offset, le32toh(res->position));
goto error;
}
@@ -868,7 +868,7 @@ static void isobusfs_cli_process_ls_command(struct isobusfs_priv *priv,
ctx->handle, NULL, NULL);
}
pr_int("Entries found: %i\n", ctx->entry_count);
pr_int("Entries found: %zu\n", ctx->entry_count);
priv->int_busy = false;
isobusfs_cli_ls_free_ctx(ctx);
isobusfs_cli_promt(priv);
+2 -2
View File
@@ -443,8 +443,8 @@ void isobusfs_dump_tx_data(const struct isobusfs_buf_log *buffer)
for (j = 0; j < ISOBUSFS_MIN_TRANSFER_LENGH; ++j)
snprintf(data_str + j * 3, 4, "%02X ", entry->data[j]);
pr_debug("Entry %u: %s Timestamp: %ld.%09ld\n", i, data_str,
entry->ts.tv_sec, entry->ts.tv_nsec);
pr_debug("Entry %u: %s Timestamp: %lld.%09ld\n", i, data_str,
(long long)entry->ts.tv_sec, entry->ts.tv_nsec);
}
}
+2 -1
View File
@@ -322,7 +322,8 @@ typedef enum {
} log_level_t;
void isobusfs_log_level_set(log_level_t level);
void isobusfs_log(log_level_t level, const char *fmt, ...);
void isobusfs_log(log_level_t level, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));
void isobusfs_set_interactive(bool interactive);
void isobusfs_print_log_buffer(void);
+1 -1
View File
@@ -97,7 +97,7 @@ int isobusfs_srv_fss_send(struct isobusfs_srv_priv *priv)
}
if (time_diff < -ISOBUSFS_CM_F_FS_STATUS_RATE_JITTER) {
pr_warn("too late to send next fs status message: %ld ms",
pr_warn("too late to send next fs status message: %" PRId64 " ms",
time_diff);
}
+1 -1
View File
@@ -132,7 +132,7 @@ int isobusfs_check_current_dir_access(struct isobusfs_srv_priv *priv,
return ret;
pr_debug("convert ISOBUS FS path to linux path: %.*s -> %s",
path_size, path, linux_path);
(int)path_size, path, linux_path);
ret = isobusfs_cmn_dh_validate_dir_path(linux_path, false);
if (ret < 0)
+2 -2
View File
@@ -287,7 +287,7 @@ static int isobusfs_srv_fa_open_file(struct isobusfs_srv_priv *priv,
return ret;
pr_debug("convert ISOBUS FS path to linux path: %.*s -> %s",
path_len, path, linux_path);
(int)path_len, path, linux_path);
/* Determine open flags based on the requested access type */
switch (flags & ISOBUSFS_FA_OPEN_MASK) {
@@ -847,7 +847,7 @@ send_response:
goto free_res;
}
pr_debug("> tx: Read File Response. Error code: %d (%s), read size: %d",
pr_debug("> tx: Read File Response. Error code: %d (%s), read size: %zd",
error_code, isobusfs_error_to_str(error_code), readed_size);
free_res: