.\" 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 "NTFS_ATTR_SET" "9" "09 October 2005" "" ""
.SH NAME
ntfs_attr_set \- fill (a part of) an attribute with a byte
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int ntfs_attr_set (ntfs_inode * \fIni\fB, const s64 \fIofs\fB, const s64 \fIcnt\fB, const u8 \fIval\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIni\fB\fR
ntfs inode describing the attribute to fill
.TP
\fB\fIofs\fB\fR
offset inside the attribute at which to start to fill
.TP
\fB\fIcnt\fB\fR
number of bytes to fill
.TP
\fB\fIval\fB\fR
the unsigned 8-bit value with which to fill the attribute
.SH "DESCRIPTION"
.PP
Fill \fIcnt\fR bytes of the attribute described by the ntfs inode \fIni\fR starting at
byte offset \fIofs\fR inside the attribute with the constant byte \fIval\fR\&.
.PP
This function is effectively like \fBmemset\fR applied to an ntfs attribute.
Note thie function actually only operates on the page cache pages belonging
to the ntfs attribute and it marks them dirty after doing the \fBmemset\fR\&.
Thus it relies on the vm dirty page write code paths to cause the modified
pages to be written to the mft record/disk.
.PP
Return 0 on success and -errno on error. An error code of -ESPIPE means
that \fIofs\fR + \fIcnt\fR were outside the end of the attribute and no write was
performed.