Improved buffer overflow messages.

This commit is contained in:
Florian Pose 2017-12-13 15:39:13 +01:00
parent 606000bf40
commit ef9517e7c3
2 changed files with 3 additions and 3 deletions

View File

@ -4008,7 +4008,7 @@ static ATTRIBUTES int ec_ioctl_slave_foe_read(
ret = -EIO;
} else {
if (request.data_size > io.buffer_size) {
EC_MASTER_ERR(master, "Buffer too small.\n");
EC_SLAVE_ERR(slave, "%s(): Buffer too small.\n", __func__);
ec_foe_request_clear(&request);
return -EOVERFLOW;
}

View File

@ -3089,7 +3089,7 @@ int ecrt_master_sdo_upload(ec_master_t *master, uint16_t slave_position,
}
} else {
if (request.data_size > target_size) {
EC_MASTER_ERR(master, "Buffer too small.\n");
EC_SLAVE_ERR(slave, "%s(): Buffer too small.\n", __func__);
ret = -EOVERFLOW;
}
else {
@ -3247,7 +3247,7 @@ int ecrt_master_read_idn(ec_master_t *master, uint16_t slave_position,
ret = -EIO;
} else { // success
if (request.data_size > target_size) {
EC_MASTER_ERR(master, "Buffer too small.\n");
EC_SLAVE_ERR(slave, "%s(): Buffer too small.\n", __func__);
ret = -EOVERFLOW;
}
else { // data fits in buffer