* Applied patch by Adrian that let the buffer size allocated vary with what

is needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29590 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-03-18 16:15:49 +00:00
parent 941b2f41ec
commit 7ce5cc5505
+5 -1
View File
@@ -153,7 +153,11 @@ compat_write(void *cookie, off_t position, const void *buffer,
//if_printf(ifp, "compat_write(%lld, %p, [%lu])\n", position,
// buffer, *numBytes);
mb = m_getcl(0, MT_DATA, M_PKTHDR);
if (*numBytes > MHLEN)
mb = m_getcl(0, MT_DATA, M_PKTHDR);
else
mb = m_gethdr(0, MT_DATA);
if (mb == NULL)
return ENOBUFS;