equal
deleted
inserted
replaced
1911 ec_master_t *master, /**< EtherCAT master. */ |
1911 ec_master_t *master, /**< EtherCAT master. */ |
1912 void *arg, /**< ioctl() argument. */ |
1912 void *arg, /**< ioctl() argument. */ |
1913 ec_ioctl_context_t *ctx /**< Private data structure of file handle. */ |
1913 ec_ioctl_context_t *ctx /**< Private data structure of file handle. */ |
1914 ) |
1914 ) |
1915 { |
1915 { |
|
1916 size_t sent_bytes; |
|
1917 |
1916 if (unlikely(!ctx->requested)) { |
1918 if (unlikely(!ctx->requested)) { |
1917 return -EPERM; |
1919 return -EPERM; |
1918 } |
1920 } |
1919 |
1921 |
1920 ecrt_master_send(master); |
1922 sent_bytes = ecrt_master_send(master); |
|
1923 |
|
1924 if (copy_to_user((void __user *) arg, &sent_bytes, sizeof(sent_bytes))) { |
|
1925 return -EFAULT; |
|
1926 } |
|
1927 |
1921 return 0; |
1928 return 0; |
1922 } |
1929 } |
1923 |
1930 |
1924 /*****************************************************************************/ |
1931 /*****************************************************************************/ |
1925 |
1932 |