Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions isobusfs/isobusfs_cli_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion isobusfs/isobusfs_cli_dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion isobusfs/isobusfs_cli_fa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions isobusfs/isobusfs_cli_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions isobusfs/isobusfs_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
3 changes: 2 additions & 1 deletion isobusfs/isobusfs_cmn.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion isobusfs/isobusfs_srv_cm_fss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion isobusfs/isobusfs_srv_dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions isobusfs/isobusfs_srv_fa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -847,7 +847,7 @@ static int isobusfs_srv_fa_rf_req(struct isobusfs_srv_priv *priv,
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:
Expand Down
Loading