1
0
Fork 0

ignore EINVAL error for ftruncate on /dev/zero

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@768 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 12 years ago
parent fcf274966f
commit 1ef6c24da0

@ -187,7 +187,7 @@ static XC_SHM_INIT(xc_mmap_init) /* {{{ */
}
}
if (ftruncate(fd, size) != 0) {
if (ftruncate(fd, size) != 0 && errno != EINVAL) {
perror(shm->name);
errstr = "Failed to ftruncate the file";
goto err;

Loading…
Cancel
Save