mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-02-06 03:41:52 +08:00
Minor fix in VoE handler.
This commit is contained in:
@@ -142,7 +142,6 @@ ec_request_state_t ecrt_voe_handler_execute(ec_voe_handler_t *voe)
|
||||
|
||||
data.config_index = voe->config->index;
|
||||
data.voe_index = voe->index;
|
||||
data.size = 0;
|
||||
|
||||
if (ioctl(voe->config->master->fd, EC_IOCTL_VOE_EXEC, &data) == -1) {
|
||||
fprintf(stderr, "Failed to execute VoE handler: %s\n",
|
||||
|
||||
@@ -2347,6 +2347,8 @@ int ec_cdev_ioctl_voe_exec(
|
||||
data.state = ecrt_voe_handler_execute(voe);
|
||||
if (data.state == EC_REQUEST_SUCCESS && voe->dir == EC_DIR_INPUT)
|
||||
data.size = ecrt_voe_handler_data_size(voe);
|
||||
else
|
||||
data.size = 0;
|
||||
|
||||
if (copy_to_user((void __user *) arg, &data, sizeof(data)))
|
||||
return -EFAULT;
|
||||
|
||||
Reference in New Issue
Block a user