Use the correct length for unmap, msync

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23217 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-05-29 14:14:09 +00:00
parent ed34fe2309
commit 5a2f80dbaf

View File

@@ -610,7 +610,9 @@ copy_stream (FILE * from, FILE * to)
}
res = sec_write (fileno (to), chunk, len);
if (munmap (chunk, st.st_size) < 0)
if (msync (chunk, len, MS_ASYNC))
warn ("msync");
if (munmap (chunk, len) < 0)
warn ("munmap");
sec_fflush (to);
if (res != len)