NTFS_ATTR_SET

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

 

NAME

ntfs_attr_set - fill (a part of) an attribute with a byte  

SYNOPSIS

"SYNOPSIS"

int ntfs_attr_set (ntfs_inode * ni, const s64 ofs, const s64 cnt, const u8 val);  

ARGUMENTS

ni
ntfs inode describing the attribute to fill
ofs
offset inside the attribute at which to start to fill
cnt
number of bytes to fill
val
the unsigned 8-bit value with which to fill the attribute
 

DESCRIPTION

Fill cnt bytes of the attribute described by the ntfs inode ni starting at byte offset ofs inside the attribute with the constant byte val.

This function is effectively like memset 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 memset. Thus it relies on the vm dirty page write code paths to cause the modified pages to be written to the mft record/disk.

Return 0 on success and -errno on error. An error code of -ESPIPE means that ofs + cnt were outside the end of the attribute and no write was performed.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 00:02:33 GMT, October 09, 2005