.\" 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_MAPPING_PAIRS_DECOMPRESS" "9" "09 October 2005" "" ""
.SH NAME
ntfs_mapping_pairs_decompress \- convert mapping pairs array to runlist
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
runlist_element * ntfs_mapping_pairs_decompress (const ntfs_volume * \fIvol\fB, const ATTR_RECORD * \fIattr\fB, runlist_element * \fIold_rl\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIvol\fB\fR
ntfs volume on which the attribute resides
.TP
\fB\fIattr\fB\fR
attribute record whose mapping pairs array to decompress
.TP
\fB\fIold_rl\fB\fR
optional runlist in which to insert \fIattr\fR\&'s runlist
.SH "DESCRIPTION"
.PP
It is up to the caller to serialize access to the runlist \fIold_rl\fR\&.
.PP
Decompress the attribute \fIattr\fR\&'s mapping pairs array into a runlist. On
success, return the decompressed runlist.
.PP
If \fIold_rl\fR is not NULL, decompressed runlist is inserted into the
appropriate place in \fIold_rl\fR and the resultant, combined runlist is
returned. The original \fIold_rl\fR is deallocated.
.PP
On error, return -errno. \fIold_rl\fR is left unmodified in that case.
.SH "THE FOLLOWING ERROR CODES ARE DEFINED"
.PP
-ENOMEM - Not enough memory to allocate runlist array.
-EIO - Corrupt runlist.
-EINVAL - Invalid parameters were passed in.
-ERANGE - The two runlists overlap.
.SH "FIXME"
.PP
For now we take the conceptionally simplest approach of creating the
new runlist disregarding the already existing one and then splicing the
two into one, if that is possible (we check for overlap and discard the new
runlist if overlap present before returning ERR_PTR(-ERANGE)).