.\" 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_RL_SPLIT" "9" "09 October 2005" "" ""
.SH NAME
ntfs_rl_split \- insert a runlist into the centre of a hole
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
runlist_element * ntfs_rl_split (runlist_element * \fIdst\fB, int \fIdsize\fB, runlist_element * \fIsrc\fB, int \fIssize\fB, int \fIloc\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIdst\fB\fR
original runlist to be worked on
.TP
\fB\fIdsize\fB\fR
number of elements in \fIdst\fR (including end marker)
.TP
\fB\fIsrc\fB\fR
new runlist to be inserted
.TP
\fB\fIssize\fB\fR
number of elements in \fIsrc\fR (excluding end marker)
.TP
\fB\fIloc\fB\fR
index in runlist \fIdst\fR at which to split and insert \fIsrc\fR
.SH "DESCRIPTION"
.PP
Split the runlist \fIdst\fR at \fIloc\fR into two and insert \fInew\fR in between the two
fragments. No merging of runlists is necessary. Adjust the size of the
holes either side.
.PP
It is up to the caller to serialize access to the runlists \fIdst\fR and \fIsrc\fR\&.
.PP
On success, return a pointer to the new, combined, runlist. Note, both
runlists \fIdst\fR and \fIsrc\fR are deallocated before returning so you cannot use
the pointers for anything any more. (Strictly speaking the returned runlist
may be the same as \fIdst\fR but this is irrelevant.)
.PP
On error, return -errno. Both runlists are left unmodified. The following
.SH "ERROR CODES ARE DEFINED"
.PP
-ENOMEM - Not enough memory to allocate runlist array.
-EINVAL - Invalid parameters were passed in.