Current structure includes no field to express the number of messages copied to user space, thus user space application needs to information out of the structure to parse the content of structure. This commit adds a field to express the number of messages copied to user space since It is more preferable to use self-contained structure. Kees Cook proposed an idea of annotation for bound of flexible arrays in his future improvement for flexible-length array in kernel. The additional field for message count is suitable to the idea as well.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -78,6 +78,7 @@ struct snd_firewire_event_motu_register_dsp_change { · 77 unmodified lines | |||
| 78 | * operating hardware knob. | 78 | * operating hardware knob. |
| 79 | * | 79 | * |
| 80 | * @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE. | 80 | * @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE. |
| 81 | * @message_count: The number of messages. | ||
| 81 | * @messages.message: The messages expressing hardware knob operation. | 82 | * @messages.message: The messages expressing hardware knob operation. |
| 82 | * @messages.tstamp: The isochronous cycle at which the request subaction of asynchronous | 83 | * @messages.tstamp: The isochronous cycle at which the request subaction of asynchronous |
| 83 | * transaction was sent to deliver the message. It has 16 bit unsigned integer | 84 | * transaction was sent to deliver the message. It has 16 bit unsigned integer |
| @@ -89,6 +90,7 @@ struct snd_firewire_event_motu_register_dsp_change { · 5 unmodified lines | |||
| 89 | */ | 90 | */ |
| 90 | struct snd_firewire_event_ff400_message { | 91 | struct snd_firewire_event_ff400_message { |
| 91 | unsigned int type; | 92 | unsigned int type; |
| 93 | unsigned int message_count; | ||
| 92 | struct { | 94 | struct { |
| 93 | __u32 message; | 95 | __u32 message; |
| 94 | __u32 tstamp; | 96 | __u32 tstamp; |