Lines Matching defs:count

259 static ssize_t command_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
268 if (count == 0 || count > IBMASM_CMD_MAX_BUFFER_SIZE)
286 len = min(count, cmd->buffer_size);
296 static ssize_t command_file_write(struct file *file, const char __user *ubuff, size_t count, loff_t *offset)
304 if (count == 0 || count > IBMASM_CMD_MAX_BUFFER_SIZE)
313 cmd = ibmasm_new_command(command_data->sp, count);
317 if (copy_from_user(cmd->buffer, ubuff, count)) {
334 return count;
368 static ssize_t event_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
378 if (count == 0 || count > IBMASM_EVENT_MAX_SIZE)
395 if (count < reader->data_size) {
411 static ssize_t event_file_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
417 if (count != 1)
452 static ssize_t r_heartbeat_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
460 if (count == 0 || count > 1024)
480 static ssize_t r_heartbeat_file_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
486 if (count != 1)
502 static ssize_t remote_settings_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
512 return simple_read_from_buffer(buf, count, offset, lbuf, len);
515 static ssize_t remote_settings_file_write(struct file *file, const char __user *ubuff, size_t count, loff_t *offset)
523 if (count == 0 || count > 1024)
528 buff = kzalloc (count + 1, GFP_KERNEL);
533 if (copy_from_user(buff, ubuff, count)) {
542 return count;