summaryrefslogtreecommitdiff
path: root/src/memfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/memfile.c')
-rw-r--r--src/memfile.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/memfile.c b/src/memfile.c
index e1a6b603b..bac84fed9 100644
--- a/src/memfile.c
+++ b/src/memfile.c
@@ -701,6 +701,23 @@ mf_sync(mfp, flags)
}
/*
+ * For all blocks in memory file *mfp that have a positive block number set
+ * the dirty flag. These are blocks that need to be written to a newly
+ * created swapfile.
+ */
+ void
+mf_set_dirty(mfp)
+ memfile_T *mfp;
+{
+ bhdr_T *hp;
+
+ for (hp = mfp->mf_used_last; hp != NULL; hp = hp->bh_prev)
+ if (hp->bh_bnum > 0)
+ hp->bh_flags |= BH_DIRTY;
+ mfp->mf_dirty = TRUE;
+}
+
+/*
* insert block *hp in front of hashlist of memfile *mfp
*/
static void