.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "SYSFS_WRITE_FILE" "" "06 October 2005" "" "" .SH NAME sysfs_write_file \- write an attribute. .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp ssize_t sysfs_write_file (struct file * \fIfile\fB, const char __user * \fIbuf\fB, size_t \fIcount\fB, loff_t * \fIppos\fB); \fR .SH "ARGUMENTS" .TP \fB\fIfile\fB\fR file pointer .TP \fB\fIbuf\fB\fR data to write .TP \fB\fIcount\fB\fR number of bytes .TP \fB\fIppos\fB\fR starting offset .SH "DESCRIPTION" .PP Similar to \fBsysfs_read_file\fR, though working in the opposite direction. We allocate and fill the data from the user in \fBfill_write_buffer\fR, then push it to the kobject in \fBflush_write_buffer\fR\&. 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. .SH "HINT" .PP if you're writing a value, first read the file, modify only the the value you're changing, then write entire buffer back.