SYSFS_WRITE_FILE

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

sysfs_write_file - write an attribute.  

SYNOPSIS

"SYNOPSIS"

ssize_t sysfs_write_file (struct file * file, const char __user * buf, size_t count, loff_t * ppos);  

ARGUMENTS

file
file pointer
buf
data to write
count
number of bytes
ppos
starting offset
 

DESCRIPTION

Similar to sysfs_read_file, though working in the opposite direction. We allocate and fill the data from the user in fill_write_buffer, then push it to the kobject in flush_write_buffer. There is no easy way for us to know if userspace is only doing a partial write, so we don't support them. We expect the entire buffer to come on the first write.  

HINT

if you're writing a value, first read the file, modify only the the value you're changing, then write entire buffer back.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
HINT

This document was created by man2html, using the manual pages.
Time: 05:31:00 GMT, October 06, 2005